[Verse 1]
Graph sprawled before me, edges tangled wild
Minimum spanning tree's my goal, vertices compiled
Kruskal's method calls for discipline and care
Sort all edges by their weight, ascending everywhere
Union-find beside me, disjoint sets aligned
Cycles are the enemy that blur my perfect mind
[Chorus]
Sort the edges, check the weight
Union-find will seal their fate
If components differ true
Add that edge, we're breaking through
Kruskal builds with greedy eyes
Minimum cost, maximum prize
[Verse 2]
Disjoint set forest guards against the loops
Find with path compression, union by their groups
Every edge I scrutinize through weighted lens so keen
Lightest first, then heavier, methodical machine
Parent pointers guide me through the labyrinth of nodes
Representatives whisper where each vertex explodes
[Chorus]
Sort the edges, check the weight
Union-find will seal their fate
If components differ true
Add that edge, we're breaking through
Kruskal builds with greedy eyes
Minimum cost, maximum prize
[Bridge]
Rank by height or size, collapse the telescoping chains
Path compression flattens what the recursion strains
Greedy choice is optimal when spanning trees unfold
Total weight diminished, worth more than digital gold
[Verse 3]
Algorithm terminates when vertices unite
Forest becomes singular, connected and tight
Time complexity hinges on the sorting phase's speed
Union-find near-constant, fulfills my every need
Ackermann inverse creeps but barely slows the race
Kruskal conquers networks with algorithmic grace
[Outro]
MST discovered, no cycle left behind
Kruskal's greedy wisdom, weight and union combined