Kruskal pondered upon the string artwork put up on the wall years ago by his dad when he was just ten. The strings were pure solid gold wires, bright and deep golden color. The pegs were precious gemstones, of bluish tone, with intricate carving, hand carved by his dad when the old man was still alive.
Fortune reversed since his dad passing away, and he needed the wires now, just the wires for him and his younger brother to get through the months to come. He could not take away the peg, and he needed to ensure that all the pegs were always interconnected by the wires, a strange precondition set by his dad, a famed astrologist. If any of the pegs was removed or disconnected, worst fate would await them, his dad had warned. The current misfortune - a shortage of money - was to be thought off as just a temporary malady, to be weathered, mild in comparison to the tone of that threat.
He stared for long minutes, at the intricate heritance, his stare accompanied by hopeless resign at his financial situation. No, he must sell it - the whole thing -, he thought. But then, that would a clear violation of his dad's will, and even though the man was no longer around, his words bore eternal weight upon Kruskal.
And so he racked and shook his brain, trying his utmost best to think out of his hollow box. And finally, yes, he thought of something.. why not take some of the wires out, maintaining just a minimal set of wires that interconnect the pegs.
Kruskal noted down in his book of ideas (his notebook) the list of pegs he had to maintain. His goal would be to find the minimal set of wires that interconnect all of the pegs - none of the pegs should be isolated from the rest. He put each peg in its own set (marked by the curly brackets); in other words, initially, each was isolated from all others. They were like trees, he thought, those pegs. But now they were separate trees, each an individual tree oblivious, unconnected to the other.
So the question now is: which wire should he consider first to maintain in the artifact? He went for the cheapest one - the one with the shortest length. That will be CD, with a length of 3, endpoints at C and D.
C and D now are a single brunch of trees, kind of a poly-embryonic variation.
Kruskal went on now to select another wire, choosing the next shortest one. That would be GE, the length of which is 4.
G and E now in the same set, replanted to the same pot.
He went on to choose the next shortest edge, taking care not to select an edge that would form a cycle with edges already selected. A cycle - an interconnection that goes around in a loop - would imply an excess wire; there should be none, for he needed every wire that he can salvage. BC now selected.
Followed next by GD.
Then FE.
His forest now looks as follows, with 5 trees now in the same pot - those interconnected pegs.
He added one more edge, AB, and it's done. He looked at the set of wires that he had set to be maintained on the artifact: AB, BC, CD, DG, GE and FE, the total length of which would be 6 plus 5 plus 3 plus 5 plus 4 plus 5 equals to 28. He looked harder at the artifact. Is there any other possibility? A lesser set of wires that maintain the connectivity of the pegs.
It seemed to him there's none. He had found the minimum spanning tree for the original graph he was given, a set of links that covered all the pegs with no cycle, and with a minimal total length.





