Local Evolution of Prim's Algorithm
- Local evolution of Prim’s algorithm is a framework that studies intermediate states—such as branch–chord exchanges and vertex insertion orders—beyond finding a single MST.
- It leverages the algorithm’s inherent ordering to extract subtree decompositions, biased rank statistics, and dynamic local limits in both deterministic and random graph settings.
- The approach extends to implementation-level innovations like Bloom filter enhancements, reducing memory usage while preserving the greedy backbone for practical MST computations.
Searching arXiv for the cited Prim-related papers to ground the article. arXiv search query: all:"Local limit of Prim's algorithm" Local evolution of Prim’s algorithm denotes a family of viewpoints in which Prim’s classical greedy MST construction is not treated as a single terminal computation, but as a process whose intermediate states, induced orderings, local perturbations, or implementation-level state transitions are themselves the primary object of study. Across the literature, this notion includes stepwise enumeration of increasingly costly spanning trees from an initial MST, recursive recovery of subtree structure from the vertex insertion order generated by Prim’s algorithm, asymptotic analysis of rank-dependent statistics in random graphs, process-level local limits on the time scale, and memory-oriented augmentations that preserve the greedy backbone while altering the state representation (Biswas et al., 2012, Zhu et al., 2019, Kahane et al., 21 Jan 2026, Corsini et al., 7 Jul 2025, Bhalla, 2023).
1. Classical Prim dynamics and the meaning of locality
Prim’s algorithm is described in the cited work in its standard incremental form. Starting from a seed vertex or root, it maintains a connected tree fragment and repeatedly adds the minimum-weight edge crossing from the current fragment to an outside vertex. In the notation used for rooted weighted graphs, the process begins with
and, given , chooses the edge of minimum weight among all edges with exactly one endpoint in , then adds that edge and the new vertex to obtain . For a finite graph on vertices, is exactly the MST (Zhu et al., 2019, Corsini et al., 7 Jul 2025).
Within this framework, “local” has several distinct technical meanings. In combinatorial enumeration, locality refers to a one-edge modification of a current spanning tree along a fundamental circuit. In clustering, it refers to the fact that Prim’s algorithm produces a vertex insertion order whose threshold structure identifies subtrees after a cut. In probability, it refers either to statistics of the early Prim ranks or to convergence of rooted neighborhoods in the local metric . In systems-oriented work, it refers to preserving the control structure of Prim’s method while replacing exact state with compact probabilistic state. A plausible implication is that the phrase “local evolution” is not a single established formalism, but a unifying description for several process-centric extensions of Prim’s algorithm.
| Context | Local object | Representative paper |
|---|---|---|
| Ordered spanning-tree generation | Branch–chord exchange from a current MST | (Biswas et al., 2012) |
| Single linkage clustering | Prim’s order and recursive subtree recovery | (Zhu et al., 2019) |
| Random graph asymptotics | Colour composition of early Prim ranks | (Kahane et al., 21 Jan 2026) |
| Dynamic local limits | Rooted neighborhood process at time | (Corsini et al., 7 Jul 2025) |
| Memory-constrained computation | Bloom-filter visited state with Prim control flow | (Bhalla, 2023) |
2. Ordered tree evolution by local branch–chord exchange
A direct interpretation of local evolution appears in the ordered enumeration method "A combinatorial algorithm to generate all spanning trees of a weighted graph in order of increasing cost" (Biswas et al., 2012). The paper does not replace Prim’s or Kruskal’s algorithm as a method for finding a single MST. Instead, it explicitly begins from an MST obtained by Prim’s or Kruskal’s algorithm and then generates the “next best” spanning trees by repeated local exchanges.
The central device is the Difference Weighted Circuit Matrix (DWCM), described as a modification of the Fundamental Circuit Matrix (FCM). If a graph has vertices and 0 edges, then a spanning tree has 1 branches and 2 chords. The DWCM is an 3 matrix with current-tree branches as columns and chords as rows. For a chord 4 and branch 5,
6
when 7 lies on the fundamental circuit created by adding 8 to the current tree, and otherwise
9
Each positive entry therefore represents the cost increase produced by replacing a branch with a chord along the corresponding fundamental circuit (Biswas et al., 2012).
The OMST (Ordered Minimal Spanning Trees) algorithm first computes an MST, stores its tree edges, constructs the DWCM, and then selects the minimum positive entry. That entry identifies the smallest local exchange producing a heavier spanning tree. The new tree is formed by replacing the relevant branch with the corresponding chord, and its total cost is updated by adding the selected positive difference. The procedure then repeats, considering positive entries from the relevant rows and columns and always selecting the next tree of minimum cost among the available candidates. The paper claims two ordering guarantees: that spanning trees are generated sequentially in increasing order of cost, and that the algorithm “always generates minimal spanning trees in increasing order” (Biswas et al., 2012).
This formulation is one of the clearest instances of a local evolution of Prim’s algorithm. Prim’s original local choice adds the cheapest edge that expands the tree to a new vertex; OMST instead starts from an already optimal tree and evolves the existing tree by swapping one branch for one chord. The locality is therefore not constructive growth from scratch, but local perturbation of an existing optimal tree. The paper explicitly emphasizes that only a small number of trees need to be stored at any time, and that previously generated trees with smaller cost are deleted once a better next stage is found. The complexity summary given in the paper is an initial MST construction cost of 0 using Prim’s algorithm, DWCM construction cost 1 with 2, minimum-positive-entry search cost 3, and overall time roughly
4
where 5 is the total number of spanning trees; the paper notes that the method is exponential in the worst case because 6 can be exponential (Biswas et al., 2012).
A recurring misconception is that such a method is simply another MST algorithm. The paper is explicit that it is not. Prim’s algorithm constructs one MST by continuously adding the cheapest connecting edge, whereas OMST uses an initial MST and then systematically generates the next spanning trees by local branch–chord exchanges guided by the DWCM (Biswas et al., 2012).
3. Prim’s order as a local separator for recursive MST splitting
A second notion of local evolution appears in single linkage clustering. In "A Simple and Efficient Method to Compute a Single Linkage Dendrogram" (Zhu et al., 2019), the MST is used as the substrate for recursively removing the longest edge and thereby building the binary hierarchy underlying the dendrogram. The paper’s key claim is that Prim’s algorithm produces not only the MST edges but also a vertex insertion order—called the Prim’s order—which can be reused to recover the vertex and edge sets of the subtrees created when the MST is split.
With a seed vertex 7, the algorithm starts from
8
and repeatedly adds the minimum-weight edge 9 satisfying 0 and 1. The order in which vertices are added is denoted by 2, with 3, and it induces an order on MST edges by
4
for 5. In the distinct-weight case, both the MST and the insertion order are unique for a fixed seed (Zhu et al., 2019).
The local mechanism becomes explicit when the longest MST edge 6 is removed. If that removal splits the tree into subtrees 7 and 8, then the paper states that the partition can be read directly from Prim’s order: 9
0
Intuitively, the endpoint of 1 with the larger Prim index is the first vertex that enters the right subtree, so all earlier vertices lie on one side of the cut and all later vertices lie on the other (Zhu et al., 2019).
The paper’s proof strategy reduces the argument from the original graph to the MST itself. A lemma states that, when edge weights are distinct and the same seed is used, Prim’s order on the original graph is the same as Prim’s order on the MST. If the seed lies in 2, then every edge in 3 has weight less than 4, and the only edge connecting 5 to 6 is 7. Consequently, Prim’s algorithm completes the left subtree before ever crossing the split edge. This is a local temporal statement: the “time of arrival” generated by Prim’s exploration already encodes the subtree separation structure (Zhu et al., 2019).
The same reasoning supports recursive splitting. The resulting trees 8 and 9 are themselves MSTs for their own vertex sets, and the paper formulates this through inherited orderings: 0 and, for the right subtree,
1
This allows a dendrogram node to be represented by a range of Prim orders rather than a full member list. The practical significance emphasized by the paper is that the dendrogram can be built recursively without any additional computational cost, and without storing the full interpoint distance matrix (Zhu et al., 2019).
4. Local rank statistics and colour bias in random bipartite graphs
A probabilistic version of local evolution is studied in "Colour ratio in Prim’s ranking of bipartite graphs" (Kahane et al., 21 Jan 2026). The setting is the complete bipartite graph
2
with vertex set 3, where vertices are labelled black and white and the edge weights are i.i.d. uniform on 4. Because the weights are almost surely distinct, Prim’s algorithm yields an almost surely unique MST and, crucially, an ordering of the vertices
5
called the Prim sequence. The paper studies the proportion of black vertices among the first 6 ranks,
7
The central message is that the initial Prim order is biased and, in general, does not reflect the global proportion 8. Under the balanced scaling assumption
9
the paper identifies two asymptotic regimes. In the sublinear regime, for any 0 with 1,
2
It also proves the stronger uniform statement
3
Thus, at mesoscopic scales, the black count grows linearly with slope 4 (Kahane et al., 21 Jan 2026).
In the linear regime, with 5 for fixed 6, the limit is parameterized through percolation. Writing
7
and defining 8 by the fixed-point system
9
the theorem states
0
As 1, this limit approaches 2, while as 3 it approaches 4. The interpretation given in the paper is that early Prim ranks are systematically biased, but the full sequence eventually averages out to the true global black proportion (Kahane et al., 21 Jan 2026).
The mechanism is a coupling with bond percolation on the bipartite graph. For 5, the graph 6 is formed by retaining edges with 7, and a key structural fact is that the connected components of this percolated graph are intervals in Prim order: 8 This makes Prim’s ranking a graph exploration order for the percolated graph. The paper’s explanation of the bias is that Prim’s algorithm does not sample vertices uniformly: it always selects the next vertex through the lightest edge crossing the current explored set, so in the sparse or critical regime the exploration resembles a two-type branching process. Several special cases are spelled out. If 9, then 0 and the sublinear limit is 1. If 2, the early ratio lies strictly between 3 and 4, so the early Prim ranking pulls the observed colour ratio toward balance (Kahane et al., 21 Jan 2026).
5. Dynamic local limits on the 5 time scale
The most explicit large-scale process formulation is given in "Local limit of Prim’s algorithm" (Corsini et al., 7 Jul 2025). The paper studies a sequence of finite graphs 6 with 7, each equipped with a standard extension consisting of a uniformly chosen root 8 and i.i.d. 9 edge weights. The rooted weighted graph is
0
and the sequence is assumed to converge locally in probability to a rooted weighted infinite graph 1. Using the local metric 2, this convergence means
3
for every bounded continuous test function 4 on the rooted weighted graph space (Corsini et al., 7 Jul 2025).
The dynamic theorem concerns the process at times
5
Here 6 corresponds to sublinear time, 7 to an intermediate linear-time regime, and 8 to completion of the full MST. The local object is the rooted neighborhood around a typical vertex, viewed as a stochastic process in the local topology. The central limiting structure is the expanded invasion percolation cluster
9
defined by
00
with the connected component containing the root retained. In this notation, 01 is the invasion percolation cluster obtained by running Prim forever on the infinite graph, and 02 is the subgraph of the minimum spanning forest 03 consisting of edges of weight at most 04 (Corsini et al., 7 Jul 2025).
Under three assumptions—local percolation of a giant, smooth percolation, and percolation giant is almost local—the paper proves
05
in the sense of local process convergence, where
06
and
07
This gives a precise interpolation statement. At 08,
09
so the local picture is invasion percolation. At 10,
11
so the process converges to the local limit of the minimum spanning forest. For 12, the local structure is the union of the early invasion cluster and the part of the MSF consisting of edges with weight up to 13 (Corsini et al., 7 Jul 2025).
The proof is organized around three steps. First, the paper identifies the correct one-time limit by showing that after about
14
steps, Prim’s algorithm locally matches 15, where
16
Second, it converts this into finite-dimensional convergence using the approximation
17
Third, it verifies the dynamic local convergence criteria: finite-dimensional local convergence, continuity of the limit at 18, and a no-large-jump condition (Corsini et al., 7 Jul 2025).
The paper also describes model classes where the theorem applies, including large grids, the complete graph or Erdős–Rényi setting, many configuration-model sequences, and preferential-attachment graphs. It further notes that when some assumptions fail, especially in “union graphs,” the dynamic local limit may still exist but can require a modified interpolation formula and may depend sensitively on the global construction rather than only the local limit (Corsini et al., 7 Jul 2025).
6. Implementation-level evolution under memory constraints
A different but related use of local evolution appears in "Memory-Efficient Solutions to Large-Graph MST Problems" (Bhalla, 2023). The paper does not change the greedy selection rule of Prim’s algorithm. Instead, it proposes an augmentation in which the standard visited set is replaced by a Bloom filter 19, and the chosen MST edges are recorded in a compact bitarray edge map 20. The author explicitly characterizes this as a “slight modification” or “augmented” Prim’s algorithm because the control structure remains the same: a starting vertex, a priority queue of candidate edges, repeated extraction of the smallest edge, and expansion to unseen vertices.
The workflow presented as Algorithm 1: Bloom MST initializes
21, an empty Bloom filter 22, an empty bitarray edgemap 23, an arbitrary starting node 24, a cost accumulator, and an empty priority queue 25. All neighbors of 26 are pushed into the queue. The main loop repeatedly pops the minimum-cost candidate; if not B.contains(s.SinkNode), the algorithm adds the sink node to the Bloom filter, increases the cost, sets the corresponding edge bit in 27, and pushes outgoing neighbors whose targets are not in the Bloom filter. The output is 28 (Bhalla, 2023).
The paper’s correctness discussion is intentionally informal. Because Bloom filters have false positives but no false negatives, a vertex may be incorrectly treated as already visited, but a genuinely visited vertex will not be missed. The paper therefore states that the estimated graph “will never have duplicate nodes or add edges that would not otherwise be in the deterministic MST,” and also claims that the resulting tree cost will be “less than or equal to the true cost” provided all edge weights are non-negative. This is not exact deterministic MST computation in the strict sense; the paper explicitly frames it as approximate correctness under bounded false-positive risk (Bhalla, 2023).
The theoretical time bounds reported are classical Prim with a priority queue at
29
and the Bloom-filter version at
30
where 31 is the number of hash functions. The Bloom filter parameters are given by
32
The main benefit is reduced auxiliary memory rather than improved asymptotic running time (Bhalla, 2023).
The empirical results reported in the paper use synthetic RMAT graphs generated by PaRMAT with parameters
33
on graph sizes from 1,000,000 to 10,000,000 nodes. The baseline is a standard Prim implementation using a hash set for visited nodes. The paper reports an Average 95.19% decrease in auxiliary memory usage for the visited-state computation and an Average error rate 0.18%. It also states that when total memory including the graph is counted, the modified algorithm uses about 57.8% of the classical Prim total in the reported experiments (Bhalla, 2023).
This line of work clarifies an important boundary in the meaning of local evolution. Here the locality does not concern local weak limits, rank statistics, or branch–chord exchanges. It concerns the state transition of Prim’s greedy loop under compressed membership structure. A common misconception would be to read the method as an exact reformulation of Prim’s algorithm; the paper is explicit that Bloom-filter false positives can cause skipped nodes, can be more problematic on sparse graphs, and make the method most suitable when memory is the bottleneck and a small approximate error is acceptable (Bhalla, 2023).
7. Conceptual synthesis and scope
Taken together, these works show that the local evolution of Prim’s algorithm is best understood as a multi-layered research theme rather than a single theorem or algorithm. At the combinatorial level, local evolution means moving from one spanning tree to the next by a smallest-cost branch–chord exchange on a fundamental circuit. At the structural level, it means that Prim’s insertion order encodes threshold information sufficient to recover recursive subtree decompositions after longest-edge cuts. At the stochastic-process level, it means that the rooted neighborhood of a typical vertex evolves on the 34 time scale from the invasion percolation cluster to the minimum spanning forest local limit. At the probabilistic-statistical level, it means that early Prim ranks on random bipartite graphs exhibit a nontrivial colour bias before converging toward the global proportion. At the implementation level, it means that the greedy backbone can be preserved while the visited-state mechanism is altered for memory efficiency (Biswas et al., 2012, Zhu et al., 2019, Kahane et al., 21 Jan 2026, Corsini et al., 7 Jul 2025, Bhalla, 2023).
These viewpoints are complementary rather than interchangeable. The OMST literature is about ordered enumeration beyond the first MST; the dendrogram literature is about reusing Prim-generated order information; the random-graph literature is about distributional properties of the Prim sequence; the local-limit literature is about convergence of the rooted process in a local topology; and the memory-efficient literature is about engineering the state representation of the Prim loop. This suggests that “local evolution of Prim’s algorithm” functions as a cross-cutting conceptual label for studies that treat Prim not merely as a static MST output procedure, but as an evolving process whose intermediate local structure carries independent combinatorial, probabilistic, and algorithmic content.