Exercise 1: Kruskal's Algorithm on P-Q-R-S — Possible Solution ==================================================================== GIVEN ------------------------------ Edges: P-Q(3), P-R(1), Q-R(4), Q-S(2), R-S(5) STEP 1: SORT EDGES BY WEIGHT, ASCENDING ------------------------------ P-R(1), Q-S(2), P-Q(3), Q-R(4), R-S(5) STEP 2: PROCESS EACH EDGE IN ORDER ------------------------------ P-R(1): P and R are in different components (each still its own component) -> ADD. Components now: {P,R}, {Q}, {S} Q-S(2): Q and S are in different components -> ADD. Components now: {P,R}, {Q,S} P-Q(3): P is in {P,R}, Q is in {Q,S} - different components -> ADD. Components now: {P,R,Q,S} (all one component) Q-R(4): Q and R are now BOTH in the same merged component -> SKIP (would create a cycle) R-S(5): R and S are now BOTH in the same merged component -> SKIP (would create a cycle) RESULT ------------------------------ MST edges: P-R(1), Q-S(2), P-Q(3) Total weight: 1 + 2 + 3 = 6 This uses exactly 3 edges for 4 vertices (V-1 = 3), matching this chapter's own spanning-tree definition, and connects every vertex - P and R directly, Q and S directly, and the two pairs joined together through P-Q. WHY THIS WORKS AS AN ANSWER ------------------------------ Every edge is checked against the Union-Find components exactly as this chapter's own method specifies - the two skipped edges are correctly identified as connecting vertices already joined through earlier additions, not merely because they were expensive.