Event-Driven Fragment-Phase Gallager–Humblet–Spira (GHS) Distributed MST Protocol #
This module formalizes an event-driven fragment-phase execution and seven-type message accounting
model (fragLTS) as a milestone step toward #7508, after [GHS83]
(Sections 2–4 and Appendix, pp. 68–77).
Model scope and relationship to [GHS83] #
In [GHS83], nodes communicate asynchronously over reliable FIFO links using
local state variables (SN, SE(j), FN, LN, best-edge, best-wt, test-edge, in-branch,
find-count) and per-node incoming message queues (Appendix rules (1)–(12), pp. 75–77), where
adjacent endpoints may temporarily hold asymmetric SE(j) edge states and re-queue premature
Connect, Test, and Report messages.
Here FragState, FragAction, fragStep?, and fragLTS model the protocol at the event-driven
fragment-phase level while retaining the exact level/phase synchronization guards and seven-message
breakdown of Sections 3–4:
- edges of
Gare classified intoEdgeState.basic,EdgeState.branch(s.branchEdges), andEdgeState.rejected(s.rejectedEdges); - fragments
(verts, level, core, phase)progress throughFragPhase.sleeping(initial level-0singletons),FragPhase.searching(Find),FragPhase.found e(Found, waiting to combine along minimum-weight outgoing edgee), andFragPhase.halted; FragAction.rejectChordrejects an internalBasicchord of a searching fragment either byTest+Reject(1 + 1messages) or simultaneous dualTest(2messages, §3, p. 71);FragAction.completeSearchenforces the GHSTest-delay rule (allNodeMOEsAccepted, §3, p. 71 and Appendix rule (6), p. 76): a fragment at levelLcompletes itsTest/Accept/Report/Change-root/Connectsweep only when every vertex's minimum-weight outgoing probe targets a fragment of level at leastL;FragAction.absorb(F₁.level < F₂.levelinto either asearchingorfoundrecipientF₂, §3, p. 72) andFragAction.merge(F₁.level = F₂.level = Lalong a shared mutual MOEe, forming coresome eat levelL + 1, §3, p. 72) broadcastInitiatemessages across the newly joined vertices;FragAction.haltSearchcompletes the finalReport(∞)sweep once a single fragment spansVand all internal chords have been rejected.
Refining the Appendix per-node asynchronous FIFO message-queue state machine onto fragLTS, as well
as the nondistinct-weight Connect-cancellation modification (§3, p. 73) and synchronous-awakening
5 N log₂ N time bound (§5, p. 74), remains open in #7508.
Main definitions #
Cslib.Distributed.MinimumSpanningTree.EdgeState: GHS edge classification (basic,branch,rejected).Cslib.Distributed.MinimumSpanningTree.FragPhase: fragment protocol phase (sleeping,searching,found,halted).Cslib.Distributed.MinimumSpanningTree.Fragment: fragment record(verts, level, core, phase).Cslib.Distributed.MinimumSpanningTree.MsgCount,Cslib.Distributed.MinimumSpanningTree.MsgCount.total: per-type and total message counters forconnect,initiate,test,accept,reject,report, andchangeRoot.Cslib.Distributed.MinimumSpanningTree.FragState,Cslib.Distributed.MinimumSpanningTree.initFragState: global fragment-phase configuration and initial all-sleeping singleton state.Cslib.Distributed.MinimumSpanningTree.FragAction,Cslib.Distributed.MinimumSpanningTree.FragAction.isCombine,Cslib.Distributed.MinimumSpanningTree.fragStep?,Cslib.Distributed.MinimumSpanningTree.runFragTrace?,Cslib.Distributed.MinimumSpanningTree.fragLTS,Cslib.Distributed.MinimumSpanningTree.FragReachable: executable transition function, deterministicCslib.LTS, and reachability predicate frominitFragState.
Main results #
Cslib.Distributed.MinimumSpanningTree.FragReachable.branchGraph_le_of_isMST,Cslib.Distributed.MinimumSpanningTree.FragReachable.branchGraph_isAcyclic,Cslib.Distributed.MinimumSpanningTree.FragReachable.fragment_induce_isTree,Cslib.Distributed.MinimumSpanningTree.FragReachable.rejected_internal_chord,Cslib.Distributed.MinimumSpanningTree.FragReachable.rejected_notMem_isMST,Cslib.Distributed.MinimumSpanningTree.FragReachable.rejected_not_isMOE: MST-subtree, per-fragment spanning-tree, and internal-chord rejection invariants.Cslib.Distributed.MinimumSpanningTree.FragReachable.two_pow_level_le_card,Cslib.Distributed.MinimumSpanningTree.FragReachable.level_le_log_card: exponential fragment size2 ^ F.level ≤ F.verts.cardand logarithmic level boundF.level ≤ Nat.log 2 (Fintype.card V)(step toward#7508, after §3, p. 72).Cslib.Distributed.MinimumSpanningTree.FragReachable.exists_absorb_or_merge_of_minLevel_found,Cslib.Distributed.MinimumSpanningTree.FragReachable.exists_step_of_not_halted,Cslib.Distributed.MinimumSpanningTree.FragReachable.isTerminal_iff_halted: deadlock-freedom via minimum-level smallest-MOE progress (step toward#7508, after §3, pp. 72–73).Cslib.Distributed.MinimumSpanningTree.FragReachable.halted_branchGraph_isMST,Cslib.Distributed.MinimumSpanningTree.FragReachable.exists_mTr_halted,Cslib.Distributed.MinimumSpanningTree.fragLTS_combineSteps_le,Cslib.Distributed.MinimumSpanningTree.fragLTS_completeTrace_combineSteps_eq,Cslib.Distributed.MinimumSpanningTree.FragReachable.msgs_total_le: termination of every maximal fragment-phase execution at the exact unique MST in|V| - 1combine steps with total messages at most5 * Fintype.card V * Nat.log 2 (Fintype.card V) + 2 * G.edgeFinset.card(step toward#7508, after §4, p. 73).
References #
- R. G. Gallager, P. A. Humblet, and P. M. Spira, A Distributed Algorithm for Minimum-Weight Spanning Trees, Sections 2–4 and Appendix (pp. 68–77).
Edge states, fragments, and seven-type message accounting #
Protocol phase of a fragment in the event-driven fragment-merging GHS model (corresponding to
Sleeping, Find, Found waiting on Connect(L), and halted termination in
[GHS83], §3 & Appendix, pp. 69–77).
A fragment (verts, level, core, phase) in the event-driven GHS protocol
([GHS83], §§2–3, pp. 68–72).
Cumulative counts of the seven message types of [GHS83] (§§3–4, pp. 69–73).
- connect : ℕ
Connect(L)messages sent across minimum-weight outgoing edges. - initiate : ℕ
Initiate(L, F, S)messages broadcast outward along fragment branches. - test : ℕ
Test(L, F)probes sent acrossBasicedges. - accept : ℕ
Acceptreplies certifying outgoingBasicedges. - reject : ℕ
Rejectreplies on internal chordBasicedges. - report : ℕ
Report(W)convergecast messages sent inward along fragment branches. - changeRoot : ℕ
Change-root(Change-core) messages sent from the core toward the MOE endpoint.
Instances For
Total messages exchanged across all seven GHS message types.
Global configuration of the event-driven fragment-phase GHS protocol on vertex type V.
Active partition of
Vinto fragments.Undirected edges currently classified as
Branch.Undirected edges currently classified as
Rejected.- msgs : MsgCount
Cumulative per-type message counters.
Edge classification of e in s : FragState V.
Spanning subgraph of V formed by s.branchEdges.
A configuration s has halted once there is a halted fragment in s.fragments (which by the
reachable invariant implies s.fragments is a single spanning fragment on Finset.univ).
Instances For
Initial quiescent configuration ([GHS83], §3, p. 69 & Appendix, p. 75):
each vertex v : V forms a level-0 sleeping singleton fragment, all edges are basic, and all
message counters are zero.
Symmetry-preserving cut helpers and BFS Change-root hop counter #
Computable Boolean check testing whether both endpoints of e belong to S.
Computable Boolean check testing whether e has one endpoint in S₁ and one in S₂.
Whether all internal edges of S in G are non-Basic (Branch or Rejected).
Number of vertices in S incident to at least one outgoing edge of S in G (each such
vertex transmits one successful Test and receives one Accept during a non-final search cycle,
[GHS83], §4, p. 73).
GHS Test/Accept level-delay guard ([GHS83], §3, p. 71 and Appendix rule
(6), p. 76): every minimum-weight outgoing edge incident to any vertex u ∈ F.verts leads to a
fragment in s.fragments whose level is at least F.level.
Transition labels of the event-driven fragment-phase GHS protocol.
- wakeupSingleton {V : Type u_1} (v : V) : FragAction V
Wake up the sole vertex in a
1-vertex graph (0outgoing edges, immediate halt). - wakeup {V : Type u_1} (v : V) (e : Sym2 V) : FragAction V
Wake up sleeping singleton
{v}and sendConnect(0)over its minimum-weight incident edgee(Appendix rules (1)–(2), p. 75). - rejectChord {V : Type u_1} (F : Fragment V) (e : Sym2 V) (dual : Bool) : FragAction V
Reject an internal
Basicchordeof searching fragmentFviaTest+Reject(dual = false) or simultaneous dualTest(dual = true, §3, p. 71). - completeSearch {V : Type u_1} (F : Fragment V) (e : Sym2 V) : FragAction V
Complete the
Test/Accept/Report/Change-root/Connectsearch cycle of non-spanning fragmentF, discovering minimum-weight outgoing edgee(§3, pp. 71–72). - haltSearch {V : Type u_1} (F : Fragment V) : FragAction V
Complete the final
Report(∞)convergecast and halt onceFspansFinset.univand all internalBasicchords are rejected (§3, p. 71 & Appendix rule (10), p. 76). - absorb {V : Type u_1} (F₁ F₂ : Fragment V) : FragAction V
- merge {V : Type u_1} (F₁ F₂ : Fragment V) (e : Sym2 V) : FragAction V
Executable single-step transition function of the fragment-phase GHS protocol.
Executable multi-step trace runner for fragStep?.
Labelled transition system of the event-driven fragment-phase GHS protocol.
Instances For
fragLTS is deterministic since fragStep? is a function into Option (FragState V).
Reachability from initFragState V in fragLTS G w.
Remaining message budget and inductive state invariant #
Shared fragment-partition and transition frame lemmas #
Per-action preservation of FragInv #
MST subtree invariant, fragment trees, and chord rejection #
Fragment-phase protocol step toward #7508 (after [GHS83], §§2–3,
pp. 68–72; modeling atomic fragment-level phases rather than Appendix per-node FIFO message
queues): at every reachable FragState, s.branchGraph is a subgraph of every MST of (G, w)
when edge weights are injective on G.edgeSet.
Fragment-phase protocol step toward #7508 (after [GHS83], §§2–3,
pp. 68–72): on a finite connected graph with injective edge weights, s.branchGraph is acyclic at
every reachable FragState.
Fragment-phase protocol step toward #7508 (after [GHS83], §3, pp. 69–72):
at every reachable FragState on a connected graph with injective edge weights, every fragment
F ∈ s.fragments induces a connected tree in s.branchGraph.
Fragment-phase protocol step toward #7508 (after [GHS83], §3, p. 71):
every Rejected edge belongs to G and has both endpoints inside a single fragment.
Fragment-phase protocol step toward #7508 (after [GHS83], §3, p. 71):
on a finite connected graph with injective edge weights, no Rejected edge belongs to any MST of
(G, w).
Fragment-phase protocol step toward #7508 (after [GHS83], §3, p. 71):
on a finite connected graph with injective edge weights, no Rejected edge is ever a cut-MOE across
any cut S : Finset V.
Exponential fragment size and logarithmic level bound #
Fragment-phase protocol step toward #7508 (after [GHS83], §3, p. 72):
every reachable fragment at level L contains at least 2 ^ L vertices.
Fragment-phase protocol step toward #7508 (after [GHS83], §3, p. 72):
every reachable fragment has level at most Nat.log 2 (Fintype.card V).
Deadlock-freedom and minimum-level smallest-MOE progress #
Fragment-phase protocol step toward #7508 (after [GHS83], §3, pp. 72–73):
under injective edge weights, whenever every fragment of minimum level L_min is in phase found
(and at least one fragment has level L_min), some minimum-level fragment has an enabled absorb
or mutual merge transition in fragLTS G w (no waiting cycle can occur).
Fragment-phase protocol step toward #7508 (after [GHS83], §3, pp. 72–73):
on a finite connected graph with injective edge weights, every non-halted reachable FragState has
at least one enabled transition in fragLTS G w.
Fragment-phase protocol step toward #7508 (after [GHS83], §3, pp. 72–73):
a reachable FragState is terminal in fragLTS G w if and only if s.Halted holds.
Exact MST termination, combine-step bound, and 5 N log₂ N + 2 E message complexity #
Fragment-phase protocol step toward #7508 (after [GHS83], §§2–3,
pp. 68–73): at every halted reachable FragState, s.branchGraph is the unique minimum-weight
spanning tree of (G, w) and s.rejectedEdges = G.edgeFinset \ s.branchEdges.
Fragment-phase protocol step toward #7508 (after [GHS83], §§2–3,
pp. 68–73): every finite execution trace from initFragState V performs at most
Fintype.card V - 1 fragment-combining (absorb or merge) steps (when Nonempty V, and 0
when IsEmpty V).
Fragment-phase protocol step toward #7508 (after [GHS83], §§2–3,
pp. 68–73): every complete execution trace (μs ∈ (fragLTS G w).completeTraces (initFragState V))
on a finite connected graph with injective edge weights reaches a halted state whose branchGraph
is the unique MST of (G, w) after exact Fintype.card V - 1 combine steps.
Fragment-phase protocol step toward #7508 (after [GHS83], §3, pp. 72–73):
from every reachable FragState on a finite connected graph with injective edge weights, a
multi-step execution reaches a halted state whose branchGraph is the unique MST of (G, w).
Fragment-phase protocol step toward #7508 (after [GHS83], §4, p. 73;
counting the seven message types of fragStep?): at every reachable FragState (including
termination), total messages exchanged satisfy
s.msgs.total ≤ 5 * Fintype.card V * Nat.log 2 (Fintype.card V) + 2 * G.edgeFinset.card.
Fragment-phase protocol step toward #7508 (after [GHS83], §4, p. 73;
sharpened halted-state message bound for 2 ≤ Fintype.card V, tight at s.msgs.total = 6 on
K₂): s.msgs.total + 4 * Fintype.card V ≤ 5 * Fintype.card V * Nat.log 2 (Fintype.card V) +
2 * G.edgeFinset.card + 2.