A gentle tutorial on Bock's algorithm for minimum directed spanning trees with a structured reformulation
Organizations: UBC, Canada · KAIST, South Korea
Abstract
Bock's 1971 algorithm is an exact primal--dual method for the minimum-cost arborescence problem, but its Algol presentation obscures the interaction of its maintained arrays and label-directed control flow. We provide a self-contained tutorial comprising the original listing, a line-mapped explanation, a circuit-forming three-node example, and a complete trace of Bock's ten-node instance. We also present a structured reformulation that replaces temporary span-label changes with explicit component and trace state. Local tightness and contraction-progress results, together with an operational-correspondence theorem, establish that the reformulation preserves Bock's candidate choices, transfers, and final solution.
Figures & tables
| BEGIN | INTEGER EX, N, I, J, J0, I1 , J1, I2, J2, K, H, H1, SS, M, DU, Z; |
| INTEGER ARRAY U1, I STAR, I BAR, J BAR, SPAN[1:50], C[1:50, 1:50]; | |
| PROCEDURE INPUT; PROCEDURE OUTPUT; | |
| L1: | INPUT (EX, N, J0, M); |
| FOR I := 1 STEP 1 UNTIL N DO FOR J := 1 STEP 1 UNTIL N DO INPUT (C[I, J]); | |
| GO TO L97; | |
| L2: | FOR J:=1 STEP 1 UNTIL N DO |
| Symbol | Role in Bock’s procedure |
|---|---|
| Amount subtracted from the costs of links entering . The reduced cost of is . The procedure changes when the span containing is adjusted. | |
| Initial node of the link currently starred into . The equality records the provisional link , while records the absence of a starred link entering . | |
| Candidate link whose backward trace passed through . If a subsequent transfer stars a new link into and displaces its existing star, the stored pair identifies the next candidate to be starred. The pair means that no candidate is stored. | |
| Label of the span containing . Equal positive labels identify nodes treated as one contracted span. A negative label temporarily marks a span encountered during a backward trace. |
| Bock’s representation | Readable representation | Role |
|---|---|---|
| U1[J] | Cumulative adjustment of column | |
| parents[J] | Current provisional link entering | |
| candidate_edges[J] | Candidate reference used during transfer | |
| components[J] | Component containing | |
| Negative labels | cycle_trace | Components visited by the current trace |
| Not required | Fresh labels are replaced by the active label |
Combinatorial Optimization
Combinatorial optimization finds the best feasible choices among discrete alternatives in routing, scheduling, graph problems, and resource allocation.
See all 382 papers