0% found this document useful (0 votes)
23 views4 pages

Latex Assignment

The document discusses minimum spanning trees (MSTs), which are subsets of edges in a connected, edge-weighted undirected graph that connect all vertices with the minimum total edge weight. It outlines properties of MSTs, various algorithms for finding them (including Borůvka's, Prim's, and Kruskal's algorithms), and mentions the existence of multiple MSTs in certain cases. Additionally, it provides insights into parallel and distributed algorithms and includes references and formulas related to the topic.

Uploaded by

venit66896
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views4 pages

Latex Assignment

The document discusses minimum spanning trees (MSTs), which are subsets of edges in a connected, edge-weighted undirected graph that connect all vertices with the minimum total edge weight. It outlines properties of MSTs, various algorithms for finding them (including Borůvka's, Prim's, and Kruskal's algorithms), and mentions the existence of multiple MSTs in certain cases. Additionally, it provides insights into parallel and distributed algorithms and includes references and formulas related to the topic.

Uploaded by

venit66896
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Minimum spanning tree

LATEXAssignment

September 2019

1
There are quite a few use cases for minimum span-
ning trees. One example would be a telecommuni-
cations company trying to lay cable in a new neigh-
Contents borhood. If it is constrained to bury the cable only
along certain paths (e.g. roads), then there would be
1 Properties 1 a graph containing the points (e.g. houses) connected
1.1 Possible multiplicity . . . . . . . . . . 1 by those paths. Some of the paths might be more ex-
1.2 Uniqueness . . . . . . . . . . . . . . . 2 pensive, because they are longer, or require the cable
1.3 Minimum-cost subgraph . . . . . . . . 2 to be buried deeper; these paths would be represented
by edges with larger weights. Currency is an accept-
2 Algorithms 2 able unit for edge weight – there is no requirement for
2.1 Classic algorithms . . . . . . . . . . . 2 edge lengths to obey normal rules of geometry such
2.2 Parallel and distributed algorithms . . 3 as the triangle inequality. A spanning tree for that
2.3 Pseudocode implementation . . . . . . 3 graph would be a subset of those paths that has no
cycles but still connects every house; there might be
3 MST on complete graphs 3 several spanning trees possible. A minimum span-
ning tree would be one with the lowest total cost,
4 Formulas 4 representing the least expensive path for laying the
cable.

Abstract
A minimum spanning tree (MST) or minimum weight
spanning tree is a subset of the edges of a connected, 1 Properties
edge-weighted undirected graph that connects all the
vertices together, without any cycles and with the
minimum possible total edge weight. That is, it is a 1.1 Possible multiplicity
spanning tree whose sum of edge weights is as small
as possible. More generally, any edge-weighted undi-
If there are n vertices in the graph, then each span-
rected graph (not necessarily connected) has a min-
ning tree has n-1 edges.
imum spanning forest, which is a union of the mini-
There may be several minimum spanning trees of the
mum spanning trees for its connected components.
same weight; in particular, if all the edge weights of
1 This paper is compiled using the following Wikipedia page: a given graph are the same, then every spanning tree
[Link] of that graph is minimum.

1
one but not the other. Among such edges, let
e1 be the one with least weight; this choice is
unique because the edge weights are all distinct.
Without loss of generality, assume e1 is in A.
3. As B is an MST, e1 ∪ B must contain a cycle C
with e1 .
4. As a tree, A contains no cycles, therefore C must
have an edge e2 that is not in A.
5. Since e1 was chosen as the unique lowest-weight
edge among those belonging to exactly one of A
and B, the weight of e2 must be greater than the
weight of e1 .
6. As e1 and e2 are part of the cycle C, replacing
e2 with e1 in B therefore yields a spanning tree
with a smaller weight.
7. This contradicts the assumption that B is a
MST.
More generally, if the edge weights are not all dis-
tinct then only the (multi-)set of weights in minimum
spanning trees is certain to be unique; it is the same
Figure 1: representation of some graphs
for all minimum spanning trees.

Figure 1 shows there may be more than one mini-


mum spanning tree in a graph. In the figure, the two 1.3 Minimum-cost subgraph
trees below the graph are two possibilities of mini- If the weights are positive, then a minimum spanning
mum spanning tree of the given graph. tree is in fact a minimum-cost subgraph connecting
all vertices, since subgraphs containing cycles neces-
1.2 Uniqueness sarily have more total weight.

If each edge has a distinct weight then there will


be only one, unique minimum spanning tree. This 2 Algorithms
is true in many realistic situations, such as the
telecommunications company example above, where 2.1 Classic algorithms
it’s unlikely any two paths have exactly the same
The first algorithm for finding a minimum span-
cost. This generalizes to spanning forests as well.
ning tree was developed by Czech scientist Otakar
Borůvka in 1926 (see Borůvka’s algorithm). Its pur-
Proof:
pose was an efficient electrical coverage of Moravia.
1. Assume the contrary, that there are two different The algorithm proceeds in a sequence of stages. In
MSTs A and B. each stage, called Boruvka step, it identifies a for-
est F consisting of the minimum-weight edge inci-
2. Since A and B differ despite containing the same dent to each vertex in the graph G, then forms the
nodes, there is at least one edge that belongs to graph G1 = G/F as the input to the next step. Here

2
G/F denotes the graph derived from G by contract- little as 2 to 5 times slower than a traditional in-
ing edges in F (by the Cut property, these edges memory algorithm. They rely on efficient external
belong to the MST). Each Boruvka step takes lin- storage sorting algorithms and on graph contraction
ear time. Since the number of vertices is reduced by techniques for reducing the graph’s size efficiently.
at least half in each step, Boruvka’s algorithm takes The problem can also be approached in a dis-
O(m log n) time.[3] tributed manner. If each node is considered a com-
A second algorithm is Prim’s algorithm, which was puter and no node knows anything except its own
invented by Vojtěch Jarnı́k in 1930 and rediscovered connected links, one can still calculate the distributed
by Prim in 1957 and Dijkstra in 1959. Basically, it minimum spanning tree.
grows the MST (T) one edge at a time. Initially,
T contains an arbitrary vertex. In each step, T is
2.3 Pseudocode implementation
augmented with a least-weight edge (x,y) such that
x is in T and y is not yet in T. By the Cut property, An approach would be to modify the original algo-
all edges added to T are in the MST. Its run-time is rithm by growing T more aggressively. This idea was
either O(m log n) or O(m + n log n), depending on presented by Osipov et al.[2] The basic idea behind
the data-structures used. Filter-Kruskal is to partition the edges in a similar
A third algorithm commonly in use is Kruskal’s way to quicksort and filter out edges that connect
algorithm, which also takes O(m log n) time. vertices that belong to the same tree in order to re-
A fourth algorithm, not as commonly used, is duce the cost of sorting. A high-level pseudocode
the reverse-delete algorithm, which is the reverse of representation is provided below.
Kruskal’s algorithm. Its runtime is O(m log n (log
log n)3). procedure filterKruskal(G)
All these four are greedy algorithms. Since they
run in polynomial time, the problem of finding such if m < KruskalThreshhold
trees is in FP, and related decision problems such as return kruskal(G)
determining whether a particular edge is in the MST pivot = chooseRandom(E)
or determining if the minimum total weight exceeds (E<,E>) <- partition(E, pivot)
a certain value are in P. A <- filterKruskal(E<)
E> <- filter(E>)
2.2 Parallel and distributed algo- A <- A u filterKruskal(E>)
return A
rithms
2
Research has also considered parallel algorithms for
the minimum spanning tree problem. With a lin-
ear number of processors it is possible to solve the
problem in O(log n) time. [1] Bader & Cong (2006) 3 MST on complete graphs
demonstrate an algorithm that can compute MSTs
5 times faster on 8 processors than an optimized se- Alan M. Frieze showed that given a complete graph
quential algorithm. on n vertices, with edge weights that are independent
Other specialized algorithms have been designed identically distributed random variables with distri-
for computing minimum spanning trees of a graph so bution function F satisfying F 0 (0) > 0, then as n
large that most of it must be stored on disk at all approaches +∞ the expected weight of the MST ap-
times. These external storage algorithms, for exam- proaches ζ(3)/F 0 (0), where ζ is the Riemann zeta
ple as described in ”Engineering an External Memory function. Frieze and Steele also proved convergence
Minimum Spanning Tree Algorithm” by Roman, De- 2 Pseudocode is from [Link]

mentiev et al., can operate, by authors’ claims, as Parallel_algorithms_for_minimum_spanning_trees

3
in probability. Svante Janson proved a central limit [3] Seth Pettie and Vijaya Ramachandran. Minimiz-
theorem for weight of the MST. ing randomness in minimum spanning tree, par-
For uniform random weights in [0, 1], the exact ex- allel connectivity, and set maxima algorithms. In
pected size of the minimum spanning tree has been Proceedings of the Thirteenth Annual ACM-SIAM
computed for small complete graphs showing in Table Symposium on Discrete Algorithms, SODA ’02,
1. pages 713–722, Philadelphia, PA, USA, 2002. So-
ciety for Industrial and Applied Mathematics.
Vertices Expected size Expected size
2 1/2 0.5
3 3/4 0.75
4 31 / 35 0.8857143
5 893 / 924 0.9664502
6 278 / 273 1.0183151
7 30739 / 29172 1.053716
8 199462271 / 184848378 1.0790588

Table 1: exact expected size of the minimum span-


ning tree

4 Formulas
Equation (1), (2) and (3) are examples of
LATEXequations.
s
ln N (s)
U CT (s, a) = Q(s, a) + C ∗ (1)
N (s, a)

Z b Z b Z b
(αf +βg)(x)dx = α f (x)dx+β b(x)dx (2)
a a a

d
R(→

X
p = hp1 , ..., pd i) ≈ Ri (pi ) (3)
i=1

References
[1] Ka Wong Chong, Yijie Han, and Tak Wah
Lam. Concurrent threads and optimal parallel
minimum spanning trees algorithm. J. ACM,
48(2):297–323, March 2001.

[2] Vitaly Osipov, Peter Sanders, and Johannes Sin-


gler. The filter-kruskal minimum spanning tree
algorithm, 2009.

You might also like