Kruskal's algorithm scans edges from cheapest to most expensive. The key check is local and exact: accept an edge only when it does not create a cycle in the current forest.

highlighted = computed this step

Sorted edge scan

Kruskal accepts 5 edges and rejects 4. Motivation: scanning from cheap to expensive makes each decision local while the forest records what is already connected.

accepted=5rejected=4\text{accepted}=5\quad \text{rejected}=4
Kruskal logedgewdecisioncycle witnessA-B1accept-B-C2accept-C-D3accept-B-D4rejectB-C-DC-E5accept-A-C6rejectA-B-CD-E7rejectD-C-ED-F8accept-E-F9rejectE-C-D-F

First rejected edge

The first rejected edge has weight 4 and its existing path is B-C-D. Why: adding that edge would close a cycle, so the rejection is explained by an exact path witness.

BD rejected by path BCDB-D\text{ rejected by path }B-C-D
Kruskal logedgewdecisioncycle witnessA-B1accept-B-C2accept-C-D3accept-B-D4rejectB-C-DC-E5accept-A-C6rejectA-B-CD-E7rejectD-C-ED-F8accept-E-F9rejectE-C-D-F

Later cycle witnesses

The other reject witnesses are A-B-C, D-C-E, and E-C-D-F. Interpretation: every rejected edge is explained by the path already present in the forest, not by a visual guess.

reject means connected already\text{reject means connected already}
Kruskal logedgewdecisioncycle witnessA-B1accept-B-C2accept-C-D3accept-B-D4rejectB-C-DC-E5accept-A-C6rejectA-B-CD-E7rejectD-C-ED-F8accept-E-F9rejectE-C-D-F

Diagram note

Certificate note: every accept or reject entry is recomputed from union-find and the current forest. Pixel positions are rounded for layout; every number shown is exact.

cycle witnesses make the rejections checkable\text{cycle witnesses make the rejections checkable}
Kruskal logedgewdecisioncycle witnessA-B1accept-B-C2accept-C-D3accept-B-D4rejectB-C-DC-E5accept-A-C6rejectA-B-CD-E7rejectD-C-ED-F8accept-E-F9rejectE-C-D-F