# Top tree

Last updated

A top tree is a data structure based on a binary tree for unrooted dynamic trees that is used mainly for various path-related operations. It allows simple divide-and-conquer algorithms. It has since been augmented to maintain dynamically various properties of a tree such as diameter, center and median.

## Contents

A top tree ${\displaystyle \Re }$ is defined for an underlying tree${\displaystyle {\mathcal {T}}}$ and a set ${\displaystyle \partial {T}}$ of at most two vertices called as External Boundary Vertices

## Glossary

### Boundary Vertex

A vertex in a connected subtree is a Boundary Vertex if it is connected to a vertex outside the subtree by an edge.

#### External Boundary Vertices

Up to a pair of vertices in the top tree ${\displaystyle \Re }$ can be called as External Boundary Vertices, they can be thought of as Boundary Vertices of the cluster which represents the entire top tree.

### Cluster

A cluster is a connected subtree with at most two Boundary Vertices. The set of Boundary Vertices of a given cluster ${\displaystyle {\mathcal {C}}}$ is denoted as ${\displaystyle \partial {C}.}$ With each cluster ${\displaystyle {\mathcal {C}}}$ the user may associate some meta information ${\displaystyle I({\mathcal {C}}),}$ and give methods to maintain it under the various internal operations.

#### Path Cluster

If ${\displaystyle \pi ({\mathcal {C}})}$ contains at least one edge then ${\displaystyle {\mathcal {C}}}$ is called a Path Cluster.

See Leaf Cluster

#### Leaf Cluster

If ${\displaystyle \pi ({\mathcal {C}})}$ does not contain any edge i.e. ${\displaystyle {\mathcal {C}}}$ has only one Boundary Vertex then ${\displaystyle {\mathcal {C}}}$ is called a Leaf Cluster.

#### Edge Cluster

A Cluster containing a single edge is called an Edge Cluster.

##### Leaf Edge Cluster

A Leaf in the original Cluster is represented by a Cluster with just a single Boundary Vertex and is called a Leaf Edge Cluster.

##### Path Edge Cluster

Edge Clusters with two Boundary Nodes are called Path Edge Cluster.

### Internal Node

A node in ${\displaystyle {\mathcal {C}}}$\${\displaystyle \partial {C}}$ is called an Internal Node of ${\displaystyle {\mathcal {C}}.}$

### Cluster Path

The path between the Boundary Vertices of ${\displaystyle {\mathcal {C}}}$ is called the cluster path of ${\displaystyle {\mathcal {C}}}$ and it is denoted by ${\displaystyle \pi ({\mathcal {C}}).}$

### Mergeable Clusters

Two Clusters ${\displaystyle {\mathcal {A}}}$ and ${\displaystyle {\mathcal {B}}}$ are Mergeable if ${\displaystyle {\mathcal {A}}\cap {\mathcal {B}}}$ is a singleton set (they have exactly one node in common) and ${\displaystyle {\mathcal {A}}\cup {\mathcal {B}}}$ is a Cluster.

## Introduction

Top trees are used for maintaining a Dynamic forest (set of trees) under link and cut operations.

The basic idea is to maintain a balanced Binary tree ${\displaystyle \Re }$ of logarithmic height in the number of nodes in the original tree ${\displaystyle {\mathcal {T}}}$( i.e. in ${\displaystyle {\mathcal {O}}(\log n)}$ time) ; the top tree essentially represents the recursive subdivision of the original tree ${\displaystyle {\mathcal {T}}}$ into clusters .

In general the tree ${\displaystyle {\mathcal {T}}}$ may have weight on its edges.

There is a one-to-one correspondence with the edges of the original tree ${\displaystyle {\mathcal {T}}}$ and the leaf nodes of the top tree ${\displaystyle \Re }$ and each internal node of ${\displaystyle \Re }$ represents a cluster that is formed due to the union of the clusters that are its children.

The top tree data structure can be initialized in ${\displaystyle {\mathcal {O}}(n)}$ time.

Therefore the top tree ${\displaystyle \Re }$ over (${\displaystyle {\mathcal {T}},}$${\displaystyle \partial {T}}$) is a binary tree such that

• The nodes of ${\displaystyle \Re }$ are clusters of (${\displaystyle {\mathcal {T}},}$${\displaystyle \partial {T}}$ );
• The leaves of ${\displaystyle \Re }$ are the edges of ${\displaystyle {\mathcal {T}};}$
• Sibling clusters are neighbours in the sense that they intersect in a single vertex, and then their parent cluster is their union.
• Root of ${\displaystyle \Re }$ is the tree ${\displaystyle {\mathcal {T}}}$ itself, with a set of at most two External Boundary Vertices.

A tree with a single vertex has an empty top tree, and one with just an edge is just a single node.

These trees are freely augmentable allowing the user a wide variety of flexibility and productivity without going into the details of the internal workings of the data structure, something which is also referred to as the Black Box.

## Dynamic Operations

The following three are the user allowable Forest Updates.

• Link(v, w): Where ${\displaystyle v}$ and ${\displaystyle w}$ are vertices in different trees ${\displaystyle {\mathcal {T}}}$1 and ${\displaystyle {\mathcal {T}}}$2. It returns a single top tree representing ${\displaystyle \Re }$v${\displaystyle \cup }$${\displaystyle \Re }$w${\displaystyle \cup {(v,w)}}$
• Cut(v, w): Removes the edge ${\displaystyle {(v,w)}}$ from a tree ${\displaystyle {\mathcal {T}}}$ with top tree ${\displaystyle \Re ,}$ thereby turning it into two trees ${\displaystyle {\mathcal {T}}}$v and ${\displaystyle {\mathcal {T}}}$w and returning two top trees ${\displaystyle \Re }$v and ${\displaystyle \Re }$w.
• Expose(S): Is called as a subroutine for implementing most of the queries on a top tree. ${\displaystyle S}$ contains at most 2 vertices. It makes original external vertices to be normal vertices and makes vertices from ${\displaystyle S}$ the new External Boundary Vertices of the top tree. If ${\displaystyle S}$ is nonempty it returns the new Root cluster ${\displaystyle {\mathcal {C}}}$ with ${\displaystyle \partial {C}=S.}$Expose({v,w}) fails if the vertices are from different trees.

## Internal Operations

The Forest updates are all carried out by a sequence of at most ${\displaystyle {\mathcal {O}}(\log n)}$ Internal Operations, the sequence of which is computed in further ${\displaystyle {\mathcal {O}}(\log n)}$ time. It may happen that during a tree update, a leaf cluster may change to a path cluster and the converse. Updates to top tree are done exclusively by these internal operations.

The ${\displaystyle I({\mathcal {C}})}$ is updated by calling a user defined function associated with each internal operation.

• Merge${\displaystyle ({\mathcal {A}},{\mathcal {B}}){:}}$ Here ${\displaystyle {\mathcal {A}}}$ and ${\displaystyle {\mathcal {B}}}$ are Mergeable Clusters, it returns ${\displaystyle {\mathcal {C}}}$ as the parent cluster of ${\displaystyle {\mathcal {A}}}$ and ${\displaystyle {\mathcal {B}}}$ and with boundary vertices as the boundary vertices of ${\displaystyle {\mathcal {A}}\cup {\mathcal {B}}.}$ Computes ${\displaystyle I({\mathcal {C}})}$ using ${\displaystyle I({\mathcal {A}})}$ and ${\displaystyle I({\mathcal {B}}).}$
• Split${\displaystyle ({\mathcal {C}}){:}}$ Here ${\displaystyle {\mathcal {C}}}$ is the root cluster ${\displaystyle {\mathcal {A}}\cup {\mathcal {B}}.}$ It updates ${\displaystyle I({\mathcal {A}})}$ and ${\displaystyle I({\mathcal {B}})}$ using ${\displaystyle I({\mathcal {C}})}$ and than it deletes the cluster ${\displaystyle {\mathcal {C}}}$ from ${\displaystyle \Re }$.

Split is usually implemented using Clean${\displaystyle ({\mathcal {C}})}$ method which calls user method for updates of ${\displaystyle I({\mathcal {A}})}$ and ${\displaystyle I({\mathcal {B}})}$ using ${\displaystyle I({\mathcal {C}})}$ and updates ${\displaystyle I({\mathcal {C}})}$ such that it's known there is no pending update needed in its children. Than the ${\displaystyle {\mathcal {C}}}$ is discarded without calling user defined functions. Clean is often required for queries without need to Split. If Split does not use Clean subroutine, and Clean is required, its effect could be achieved with overhead by combining Merge and Split.

The next two functions are analogous to the above two and are used for base clusters.

• Create${\displaystyle (v,w){:}}$ Creates a cluster ${\displaystyle {\mathcal {C}}}$ for the edge ${\displaystyle (v,w).}$ Sets ${\displaystyle \partial {C}=\partial }$${\displaystyle (v,w).}$${\displaystyle I({\mathcal {C}})}$ is computed from scratch.
• Eradicate${\displaystyle ({\mathcal {C}}){:}}$${\displaystyle {\mathcal {C}}}$ is the edge cluster ${\displaystyle (v,w).}$ User defined function is called to process ${\displaystyle I({\mathcal {C}})}$ and than the cluster ${\displaystyle {\mathcal {C}}}$ is deleted from the top tree.

User can define Choose${\displaystyle ({\mathcal {C}}){:}}$ operation which for a root (nonleaf) cluster selects one of its child clusters. The top tree blackbox provides Search${\displaystyle ({\mathcal {C}}){:}}$ routine, which organizes Choose queries and reorganization of the top tree (using the Internal operations) such that it locates the only edge in intersection of all selected clusters. Sometimes the search should be limited to a path. There is a variant of nonlocal search for such purposes. If there are two external boundary vertices in the root cluster ${\displaystyle {\mathcal {C}}}$, the edge is searched only on the path ${\displaystyle \pi ({\mathcal {C}})}$. It is sufficient to do following modification: If only one of root cluster children is path cluster, it is selected by default without calling the Choose operation.

Finding i-th edge on longer path from ${\displaystyle v}$ to ${\displaystyle w}$ could be done by ${\displaystyle {\mathcal {C}}}$=Expose({v,w}) followed by Search(${\displaystyle {\mathcal {C}}}$) with appropriate Choose. To implement the Choose we use global variable representing ${\displaystyle v}$ and global variable representing ${\displaystyle i.}$ Choose selects the cluster ${\displaystyle {\mathcal {A}}}$ with ${\displaystyle v\in \partial {A}}$ iff length of ${\displaystyle \pi ({\mathcal {A}})}$ is at least ${\displaystyle i}$. To support the operation the length must be maintained in the ${\displaystyle I}$.

Similar task could be formulated for graph with edges with nonunit lengths. In that case the distance could address an edge or a vertex between two edges. We could define Choose such that the edge leading to the vertex is returned in the latter case. There could be defined update increasing all edge lengths along a path by a constant. In such scenario these updates are done in constant time just in root cluster. Clean is required to distribute the delayed update to the children. The Clean should be called before the Choose is invoked. To maintain length in ${\displaystyle I}$ would in that case require to maintain unitlength in ${\displaystyle I}$ as well.

Finding center of tree containing vertex ${\displaystyle v}$ could be done by finding either bicenter edge or edge with center as one endpoint. The edge could be found by ${\displaystyle {\mathcal {C}}}$=Expose({v}) followed by Search(${\displaystyle {\mathcal {C}}}$) with appropriate Choose. The choose selects between children ${\displaystyle {\mathcal {A}},}$${\displaystyle {\mathcal {B}}}$ with ${\displaystyle a\in \partial {A}\cap \partial {B}}$ the child with higher maxdistance${\displaystyle (a)}$. To support the operation the maximal distance in the cluster subtree from a boundary vertex should be maintained in the ${\displaystyle I}$. That requires maintenance of the cluster path length as well.

## Interesting Results and Applications

A number of interesting applications originally implemented by other methods have been easily implemented using the top tree's interface. Some of them include

• ([SLEATOR AND TARJAN 1983]). We can maintain a dynamic collection of weighted trees in ${\displaystyle {\mathcal {O}}(\log n)}$ time per link and cut, supporting queries about the maximum edge weight between any two vertices in ${\displaystyle O(\log n)}$ time.
• Proof outline: It involves maintaining at each node the maximum weight (max_wt) on its cluster path, if it is a point cluster then max_wt(${\displaystyle {\mathcal {C}}}$) is initialised as ${\displaystyle -\infty .}$ When a cluster is a union of two clusters then it is the maximum value of the two merged clusters. If we have to find the max wt between ${\displaystyle v}$ and ${\displaystyle w}$ then we do ${\displaystyle {\mathcal {C}}=}$ Expose${\displaystyle (v,w),}$ and report max_wt${\displaystyle ({\mathcal {C}}).}$
• ([SLEATOR AND TARJAN 1983]). In the scenario of the above application we can also add a common weight ${\displaystyle x}$ to all edges on a given path ${\displaystyle v}$ · · ·${\displaystyle w}$ in ${\displaystyle {\mathcal {O}}(\log n)}$ time.
• Proof outline: We introduce a weight called extra(${\displaystyle {\mathcal {C}}}$) to be added to all the edges in ${\displaystyle \pi ({\mathcal {C}}).}$ Which is maintained appropriately ; split(${\displaystyle {\mathcal {C}}}$) requires that, for each path child ${\displaystyle {\mathcal {A}}}$ of ${\displaystyle {\mathcal {C}},}$ we set max_wt(A) := max_wt(${\displaystyle {\mathcal {A}}}$) + extra(${\displaystyle {\mathcal {C}}}$) and extra(${\displaystyle {\mathcal {A}}}$) := extra(${\displaystyle {\mathcal {A}}}$) + extra(${\displaystyle {\mathcal {C}}}$). For ${\displaystyle {\mathcal {C}}}$ := join(${\displaystyle {\mathcal {A}},}$${\displaystyle {\mathcal {B}}}$), we set max_wt(${\displaystyle {\mathcal {C}}}$) := max {max_wt(${\displaystyle {\mathcal {A}}}$), max_wt(${\displaystyle {\mathcal {B}}}$)} and extra(${\displaystyle {\mathcal {C}}}$) := 0. Finally, to find the maximum weight on the path ${\displaystyle v}$ · · ·${\displaystyle w,}$ we set ${\displaystyle {\mathcal {C}}}$ := Expose${\displaystyle (v,w)}$ and return max_wt(${\displaystyle {\mathcal {C}}}$).
• ([GOLDBERG ET AL. 1991]). We can ask for the maximum weight in the underlying tree containing a given vertex ${\displaystyle v}$ in ${\displaystyle {\mathcal {O}}(\log n)}$ time.
• Proof outline: This requires maintaining additional information about the maximum weight non cluster path edge in a cluster under the Merge and Split operations.
• The distance between two vertices ${\displaystyle v}$ and ${\displaystyle w}$ can be found in ${\displaystyle {\mathcal {O}}(\log n)}$ time as length(Expose${\displaystyle (v,w)}$).
• Proof outline:We will maintain the length length(${\displaystyle {\mathcal {C}}}$) of the cluster path. The length is maintained as the maximum weight except that, if ${\displaystyle {\mathcal {C}}}$ is created by a join(Merge), length(${\displaystyle {\mathcal {C}}}$) is the sum of lengths stored with its path children.
• Queries regarding diameter of a tree and its subsequent maintenance takes ${\displaystyle {\mathcal {O}}(\log n)}$ time.
• The Center and Median can me maintained under Link(Merge) and Cut(Split) operations and queried by non local search in ${\displaystyle {\mathcal {O}}(\log n)}$ time.
• The graph could be maintained allowing to update the edge set and ask queries on edge 2-connectivity. Amortized complexity of updates is ${\displaystyle O(\log ^{4}n)}$. Queries could be implemented even faster. The algorithm is not trivial, ${\displaystyle I({\mathcal {C}})}$ uses ${\displaystyle \Theta (\log ^{2}n)}$ space ([HOLM, LICHTENBERG, THORUP 2000]).
• The graph could be maintained allowing to update the edge set and ask queries on vertex 2-connectivity. Amortized complexity of updates is ${\displaystyle O(\log ^{5}n)}$. Queries could be implemented even faster. The algorithm is not trivial, ${\displaystyle I({\mathcal {C}})}$ uses ${\displaystyle \Theta (\log ^{2}n)}$ space ([HOLM, LICHTENBERG, THORUP 2001]).
• Top trees can be used to compress trees in a way that is never much worse than DAG compression, but may be exponentially better. [1]

## Implementation

Top trees have been implemented in a variety of ways, some of them include implementation using a Multilevel Partition (Top-trees and dynamic graph algorithms Jacob Holm and Kristian de Lichtenberg. Technical Report), and even by using Sleator-Tarjan s-t trees (typically with amortized time bounds), Frederickson's Topology Trees (with worst case time bounds) (Alstrup et al. Maintaining Information in Fully Dynamic Trees with Top Trees).

Amortized implementations are more simple, and with small multiplicative factors in time complexity. On the contrary the worst case implementations allow speeding up queries by switching off unneeded info updates during the query (implemented by persistence techniques). After the query is answered the original state of the top tree is used and the query version is discarded.

### Using Multilevel Partitioning

Any partitioning of clusters of a tree ${\displaystyle {\mathcal {T}}}$ can be represented by a Cluster Partition Tree CPT${\displaystyle ({\mathcal {T}}),}$ by replacing each cluster in the tree ${\displaystyle {\mathcal {T}}}$ by an edge. If we use a strategy P for partitioning ${\displaystyle {\mathcal {T}}}$ then the CPT would be CPTP${\displaystyle {\mathcal {T}}.}$ This is done recursively till only one edge remains.

We would notice that all the nodes of the corresponding top tree ${\displaystyle \Re }$ are uniquely mapped into the edges of this multilevel partition. There may be some edges in the multilevel partition that do not correspond to any node in the top tree, these are the edges which represent only a single child in the level below it, i.e. a simple cluster. Only the edges that correspond to composite clusters correspond to nodes in the top tree ${\displaystyle \Re .}$

A partitioning strategy is important while we partition the Tree ${\displaystyle {\mathcal {T}}}$ into clusters. Only a careful strategy ensures that we end up in an ${\displaystyle {\mathcal {O}}(\log n)}$ height Multilevel Partition ( and therefore the top tree).

• The number of edges in subsequent levels should decrease by a constant factor.
• If a lower level is changed by an update then we should be able to update the one immediately above it using at most a constant number of insertions and deletions.

The above partitioning strategy ensures the maintenance of the top tree in ${\displaystyle {\mathcal {O}}(\log n)}$ time.

## Related Research Articles

A minimum spanning tree (MST) or minimum weight spanning tree is a subset of the edges of a connected, 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 spanning tree whose sum of edge weights is as small as possible. More generally, any edge-weighted undirected graph has a minimum spanning forest, which is a union of the minimum spanning trees for its connected components.

Dijkstra's algorithm is an algorithm for finding the shortest paths between nodes in a graph, which may represent, for example, road networks. It was conceived by computer scientist Edsger W. Dijkstra in 1956 and published three years later.

In computer science, Prim'salgorithm is a greedy algorithm that finds a minimum spanning tree for a weighted undirected graph. This means it finds a subset of the edges that forms a tree that includes every vertex, where the total weight of all the edges in the tree is minimized. The algorithm operates by building this tree one vertex at a time, from an arbitrary starting vertex, at each step adding the cheapest possible connection from the tree to another vertex.

Breadth-first search (BFS) is an algorithm for traversing or searching tree or graph data structures. It starts at the tree root, and explores all of the neighbor nodes at the present depth prior to moving on to the nodes at the next depth level.

Depth-first search (DFS) is an algorithm for traversing or searching tree or graph data structures. The algorithm starts at the root node and explores as far as possible along each branch before backtracking.

In mathematics, a hypergraph is a generalization of a graph in which an edge can join any number of vertices. In contrast, in an ordinary graph, an edge connects exactly two vertices.

In computer science, a topological sort or topological ordering of a directed graph is a linear ordering of its vertices such that for every directed edge uv from vertex u to vertex v, u comes before v in the ordering. For instance, the vertices of the graph may represent tasks to be performed, and the edges may represent constraints that one task must be performed before another; in this application, a topological ordering is just a valid sequence for the tasks. A topological ordering is possible if and only if the graph has no directed cycles, that is, if it is a directed acyclic graph (DAG). Any DAG has at least one topological ordering, and algorithms are known for constructing a topological ordering of any DAG in linear time. Topological sorting has many applications especially in ranking problems such as feedback arc set.

In computer science, a disjoint-set data structure, also called a union–find data structure or merge–find set, is a data structure that stores a collection of disjoint (non-overlapping) sets. Equivalently, it stores a partition of a set into disjoint subsets. It provides operations for adding new sets, merging sets, and finding a representative member of a set. The last operation allows to find out efficiently if any two elements are in the same or different sets.

Johnson's algorithm is a way to find the shortest paths between all pairs of vertices in an edge-weighted, directed graph. It allows some of the edge weights to be negative numbers, but no negative-weight cycles may exist. It works by using the Bellman–Ford algorithm to compute a transformation of the input graph that removes all negative weights, allowing Dijkstra's algorithm to be used on the transformed graph. It is named after Donald B. Johnson, who first published the technique in 1977.

In graph theory, a bridge, isthmus, cut-edge, or cut arc is an edge of a graph whose deletion increases the graph's number of connected components. Equivalently, an edge is a bridge if and only if it is not contained in any cycle. For a connected graph, a bridge can uniquely determine a cut. A graph is said to be bridgeless or isthmus-free if it contains no bridges.

In graph theory, a maximal independent set (MIS) or maximal stable set is an independent set that is not a subset of any other independent set. In other words, there is no vertex outside the independent set that may join it because it is maximal with respect to the independent set property.

In graph theory, reachability refers to the ability to get from one vertex to another within a graph. A vertex can reach a vertex if there exists a sequence of adjacent vertices which starts with and ends with .

In computer science, fractional cascading is a technique to speed up a sequence of binary searches for the same value in a sequence of related data structures. The first binary search in the sequence takes a logarithmic amount of time, as is standard for binary searches, but successive searches in the sequence are faster. The original version of fractional cascading, introduced in two papers by Chazelle and Guibas in 1986, combined the idea of cascading, originating in range searching data structures of Lueker (1978) and Willard (1978), with the idea of fractional sampling, which originated in Chazelle (1983). Later authors introduced more complex forms of fractional cascading that allow the data structure to be maintained as the data changes by a sequence of discrete insertion and deletion events.

In graph theory, a random geometric graph (RGG) is the mathematically simplest spatial network, namely an undirected graph constructed by randomly placing N nodes in some metric space and connecting two nodes by a link if and only if their distance is in a given range, e.g. smaller than a certain neighborhood radius, r.

In graph theory, the planar separator theorem is a form of isoperimetric inequality for planar graphs, that states that any planar graph can be split into smaller pieces by removing a small number of vertices. Specifically, the removal of vertices from an -vertex graph can partition the graph into disjoint subgraphs each of which has at most vertices.

The Kernighan–Lin algorithm is a heuristic algorithm for finding partitions of graphs. The algorithm has important applications in the layout of digital circuits and components in VLSI.

In computer science, the method of contraction hierarchies is a speed-up technique for finding the shortest-path in a graph. The most intuitive applications are car-navigation systems: A user wants to drive from to using the quickest possible route. The metric optimized here is the travel time. Intersections are represented by vertices, the road sections connecting them by edges. The edge weights represent the time it takes to drive along this segment of the road. A path from to is a sequence of edges ; the shortest path is the one with the minimal sum of edge weights among all possible paths. The shortest path in a graph can be computed using Dijkstra's algorithm; but given that road networks consist of tens of millions of vertices, this is impractical. Contraction hierarchies is a speed-up method optimized to exploit properties of graphs representing road networks. The speed-up is achieved by creating shortcuts in a preprocessing phase which are then used during a shortest-path query to skip over "unimportant" vertices. This is based on the observation that road networks are highly hierarchical. Some intersections, for example highway junctions, are "more important" and higher up in the hierarchy than for example a junction leading into a dead end. Shortcuts can be used to save the precomputed distance between two important junctions such that the algorithm doesn't have to consider the full path between these junctions at query time. Contraction hierarchies do not know about which roads humans consider "important", but they are provided with the graph as input and are able to assign importance to vertices using heuristics.

In mathematics, a minimum bottleneck spanning tree (MBST) in an undirected graph is a spanning tree in which the most expensive edge is as cheap as possible. A bottleneck edge is the highest weighted edge in a spanning tree. A spanning tree is a minimum bottleneck spanning tree if the graph does not contain a spanning tree with a smaller bottleneck edge weight. For a directed graph, a similar problem is known as Minimum Bottleneck Spanning Arborescence (MBSA).

In computing and graph theory, a dynamic connectivity structure is a data structure that dynamically maintains information about the connected components of a graph.

A central problem in algorithmic graph theory is the shortest path problem. One of the generalizations of the shortest path problem is known as the single-source-shortest-paths (SSSP) problem, which consists of finding the shortest path between every pair of vertices in a graph. There are classical sequential algorithms which solve this problem, such as Dijkstra's algorithm. In this article, however, we present two parallel algorithms solving this problem.

## References

• Stephen Alstrup, Jacob Holm, Kristian De Lichtenberg, and Mikkel Thorup, Maintaining information in fully dynamic trees with top trees, ACM Transactions on Algorithms (TALG), Vol. 1 (2005), 243–264, doi : 10.1145/1103963.1103966
• Stephen Alstrup, Jacob Holm, Kristian De Lichtenberg, and Mikkel Thorup, Poly-logarithmic deterministic fully-dynamic algorithms for connectivity, minimum spanning tree, 2-edge, and biconnectivity, Journal of the ACM, Vol. 48 Issue 4(July 2001), 723–760, doi : 10.1145/502090.502095
• Donald Knuth. The Art of Computer Programming: Fundamental Algorithms, Third Edition. Addison-Wesley, 1997. ISBN   0-201-89683-4 . Section 2.3: Trees, pp. 308–423.
• Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein. Introduction to Algorithms , Second Edition. MIT Press and McGraw-Hill, 2001. ISBN   0-262-03293-7 . Section 10.4: Representing rooted trees, pp. 214–217. Chapters 12–14 (Binary Search Trees, Red-Black Trees, Augmenting Data Structures), pp. 253–320.
1. Tree Compression with Top Trees. BILLE, GOERTZ, LANDAU, WEIMANN 2013 arXiv:1304.5702 [cs.DS]