Papers
Topics
Authors
Recent
Search
2000 character limit reached

Local Evolution of Prim's Algorithm

Updated 6 July 2026
  • 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 tn+o(n)tn+o(n) 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

T1=({o},),T_1=(\{o\},\varnothing),

and, given Tk1=(Vk1,Ek1)T_{k-1}=(V_{k-1},E_{k-1}), chooses the edge of minimum weight among all edges with exactly one endpoint in Tk1T_{k-1}, then adds that edge and the new vertex to obtain TkT_k. For a finite graph on nn vertices, Pn(G)P_n(G) 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 dd. 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 tn+o(n)tn+o(n) (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 nn vertices and T1=({o},),T_1=(\{o\},\varnothing),0 edges, then a spanning tree has T1=({o},),T_1=(\{o\},\varnothing),1 branches and T1=({o},),T_1=(\{o\},\varnothing),2 chords. The DWCM is an T1=({o},),T_1=(\{o\},\varnothing),3 matrix with current-tree branches as columns and chords as rows. For a chord T1=({o},),T_1=(\{o\},\varnothing),4 and branch T1=({o},),T_1=(\{o\},\varnothing),5,

T1=({o},),T_1=(\{o\},\varnothing),6

when T1=({o},),T_1=(\{o\},\varnothing),7 lies on the fundamental circuit created by adding T1=({o},),T_1=(\{o\},\varnothing),8 to the current tree, and otherwise

T1=({o},),T_1=(\{o\},\varnothing),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 Tk1=(Vk1,Ek1)T_{k-1}=(V_{k-1},E_{k-1})0 using Prim’s algorithm, DWCM construction cost Tk1=(Vk1,Ek1)T_{k-1}=(V_{k-1},E_{k-1})1 with Tk1=(Vk1,Ek1)T_{k-1}=(V_{k-1},E_{k-1})2, minimum-positive-entry search cost Tk1=(Vk1,Ek1)T_{k-1}=(V_{k-1},E_{k-1})3, and overall time roughly

Tk1=(Vk1,Ek1)T_{k-1}=(V_{k-1},E_{k-1})4

where Tk1=(Vk1,Ek1)T_{k-1}=(V_{k-1},E_{k-1})5 is the total number of spanning trees; the paper notes that the method is exponential in the worst case because Tk1=(Vk1,Ek1)T_{k-1}=(V_{k-1},E_{k-1})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 Tk1=(Vk1,Ek1)T_{k-1}=(V_{k-1},E_{k-1})7, the algorithm starts from

Tk1=(Vk1,Ek1)T_{k-1}=(V_{k-1},E_{k-1})8

and repeatedly adds the minimum-weight edge Tk1=(Vk1,Ek1)T_{k-1}=(V_{k-1},E_{k-1})9 satisfying Tk1T_{k-1}0 and Tk1T_{k-1}1. The order in which vertices are added is denoted by Tk1T_{k-1}2, with Tk1T_{k-1}3, and it induces an order on MST edges by

Tk1T_{k-1}4

for Tk1T_{k-1}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 Tk1T_{k-1}6 is removed. If that removal splits the tree into subtrees Tk1T_{k-1}7 and Tk1T_{k-1}8, then the paper states that the partition can be read directly from Prim’s order: Tk1T_{k-1}9

TkT_k0

Intuitively, the endpoint of TkT_k1 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 TkT_k2, then every edge in TkT_k3 has weight less than TkT_k4, and the only edge connecting TkT_k5 to TkT_k6 is TkT_k7. 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 TkT_k8 and TkT_k9 are themselves MSTs for their own vertex sets, and the paper formulates this through inherited orderings: nn0 and, for the right subtree,

nn1

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

nn2

with vertex set nn3, where vertices are labelled black and white and the edge weights are i.i.d. uniform on nn4. Because the weights are almost surely distinct, Prim’s algorithm yields an almost surely unique MST and, crucially, an ordering of the vertices

nn5

called the Prim sequence. The paper studies the proportion of black vertices among the first nn6 ranks,

nn7

The central message is that the initial Prim order is biased and, in general, does not reflect the global proportion nn8. Under the balanced scaling assumption

nn9

the paper identifies two asymptotic regimes. In the sublinear regime, for any Pn(G)P_n(G)0 with Pn(G)P_n(G)1,

Pn(G)P_n(G)2

It also proves the stronger uniform statement

Pn(G)P_n(G)3

Thus, at mesoscopic scales, the black count grows linearly with slope Pn(G)P_n(G)4 (Kahane et al., 21 Jan 2026).

In the linear regime, with Pn(G)P_n(G)5 for fixed Pn(G)P_n(G)6, the limit is parameterized through percolation. Writing

Pn(G)P_n(G)7

and defining Pn(G)P_n(G)8 by the fixed-point system

Pn(G)P_n(G)9

the theorem states

dd0

As dd1, this limit approaches dd2, while as dd3 it approaches dd4. 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 dd5, the graph dd6 is formed by retaining edges with dd7, and a key structural fact is that the connected components of this percolated graph are intervals in Prim order: dd8 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 dd9, then tn+o(n)tn+o(n)0 and the sublinear limit is tn+o(n)tn+o(n)1. If tn+o(n)tn+o(n)2, the early ratio lies strictly between tn+o(n)tn+o(n)3 and tn+o(n)tn+o(n)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 tn+o(n)tn+o(n)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 tn+o(n)tn+o(n)6 with tn+o(n)tn+o(n)7, each equipped with a standard extension consisting of a uniformly chosen root tn+o(n)tn+o(n)8 and i.i.d. tn+o(n)tn+o(n)9 edge weights. The rooted weighted graph is

nn0

and the sequence is assumed to converge locally in probability to a rooted weighted infinite graph nn1. Using the local metric nn2, this convergence means

nn3

for every bounded continuous test function nn4 on the rooted weighted graph space (Corsini et al., 7 Jul 2025).

The dynamic theorem concerns the process at times

nn5

Here nn6 corresponds to sublinear time, nn7 to an intermediate linear-time regime, and nn8 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

nn9

defined by

T1=({o},),T_1=(\{o\},\varnothing),00

with the connected component containing the root retained. In this notation, T1=({o},),T_1=(\{o\},\varnothing),01 is the invasion percolation cluster obtained by running Prim forever on the infinite graph, and T1=({o},),T_1=(\{o\},\varnothing),02 is the subgraph of the minimum spanning forest T1=({o},),T_1=(\{o\},\varnothing),03 consisting of edges of weight at most T1=({o},),T_1=(\{o\},\varnothing),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

T1=({o},),T_1=(\{o\},\varnothing),05

in the sense of local process convergence, where

T1=({o},),T_1=(\{o\},\varnothing),06

and

T1=({o},),T_1=(\{o\},\varnothing),07

This gives a precise interpolation statement. At T1=({o},),T_1=(\{o\},\varnothing),08,

T1=({o},),T_1=(\{o\},\varnothing),09

so the local picture is invasion percolation. At T1=({o},),T_1=(\{o\},\varnothing),10,

T1=({o},),T_1=(\{o\},\varnothing),11

so the process converges to the local limit of the minimum spanning forest. For T1=({o},),T_1=(\{o\},\varnothing),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 T1=({o},),T_1=(\{o\},\varnothing),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

T1=({o},),T_1=(\{o\},\varnothing),14

steps, Prim’s algorithm locally matches T1=({o},),T_1=(\{o\},\varnothing),15, where

T1=({o},),T_1=(\{o\},\varnothing),16

Second, it converts this into finite-dimensional convergence using the approximation

T1=({o},),T_1=(\{o\},\varnothing),17

Third, it verifies the dynamic local convergence criteria: finite-dimensional local convergence, continuity of the limit at T1=({o},),T_1=(\{o\},\varnothing),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 T1=({o},),T_1=(\{o\},\varnothing),19, and the chosen MST edges are recorded in a compact bitarray edge map T1=({o},),T_1=(\{o\},\varnothing),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 T1=({o},),T_1=(\{o\},\varnothing),21, an empty Bloom filter T1=({o},),T_1=(\{o\},\varnothing),22, an empty bitarray edgemap T1=({o},),T_1=(\{o\},\varnothing),23, an arbitrary starting node T1=({o},),T_1=(\{o\},\varnothing),24, a cost accumulator, and an empty priority queue T1=({o},),T_1=(\{o\},\varnothing),25. All neighbors of T1=({o},),T_1=(\{o\},\varnothing),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 T1=({o},),T_1=(\{o\},\varnothing),27, and pushes outgoing neighbors whose targets are not in the Bloom filter. The output is T1=({o},),T_1=(\{o\},\varnothing),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

T1=({o},),T_1=(\{o\},\varnothing),29

and the Bloom-filter version at

T1=({o},),T_1=(\{o\},\varnothing),30

where T1=({o},),T_1=(\{o\},\varnothing),31 is the number of hash functions. The Bloom filter parameters are given by

T1=({o},),T_1=(\{o\},\varnothing),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

T1=({o},),T_1=(\{o\},\varnothing),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 T1=({o},),T_1=(\{o\},\varnothing),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.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Local Evolution of Prim's Algorithm.