Informatica 36 (2012) 185-200 185 Graph Theory Algorithms for Mobile Ad Hoc Networks Natarajan Meghanathan Department of Computer Science, Jackson State University Jackson, MS 39217, USA E-mail: natarajan.meghanathan@jsums.edu Keywords: mobile ad hoc networks, routing protocols, graph algorithms, unicast, multi-path, multicast and broadcast Received: April 22, 2011 Various simulators (e.g., ns-2 and GloMoSim) are available to implement and study the behavior of the routing protocols for mobile ad hoc networks (MANETs). But, students and investigators who are new to this area often get perplexed in the complexity of these simulators and lose the focus in designing and analyzing the characteristics of the network and the protocol. Most of the time would be spent in learning the existing code modules of the simulator and the logical flow between the different code modules. The purpose of this paper would be to illustrate the applications of Graph Theory algorithms to study, analyze and simulate the behavior of routing protocols for MANETs. Specifically, we focus on the applications of Graph Theory algorithms to determine paths, trees and connected dominating sets for simulating and analyzing respectively unicast (single-path and multi-path), multicast and broadcast communication in mobile ad hoc networks (MANETs). We will discuss the (i) Dijkstra's shortest path algorithm and its modifications for finding stable paths and bottleneck paths; (ii) Prim's minimum spanning tree algorithm and its modification for finding all pairs smallest and largest bottleneck paths; (iii) Minimum Steiner tree algorithm to connect a source node to all the receivers of a multicast group; (iv) A node-degree based algorithm to construct an approximate minimum connected dominating set (CDS) for sending information from one node to all other nodes in the network; and (v) Algorithms to find a sequence of link-disjoint, node-disjoint and zone-disjoint multi-path routes in MANETs. Povzetek: Prispevek opisuje algoritme za mobilna omrežja. 1 Introduction A Mobile Ad hoc Network (MANET) is a dynamically changing infrastructureless and resource-constrained network of wireless nodes that may move arbitrarily, independent of each other. The transmission range of the wireless nodes is often limited, necessitating multi-hop routing to be a common phenomenon for communication between any two nodes in a MANET. Various routing protocols for unicast, multicast, multi-path and broadcast communication have been proposed for MANETs. The communication structures that are often determined include: a path (for unicast - single-path and multi-path routing), a tree (for multicast routing) and a connected dominating set - CDS (for broadcast routing). Within a particular class, it is almost impossible to find a single routing protocol that yields an optimal communication structure with respect to different route selection metrics and operating conditions. Various simulators such as ns-2 [5] and GloMoSim [20] are available to implement and study the behavior of the routing protocols. But, students and investigators who are new to this area often get perplexed in the complexity of these simulators and lose the focus in designing and analyzing the characteristics of the network and the protocol. Most of the time would be spent in learning the existing code modules of the simulator and the logical flow between the different code modules. The purpose of this paper would be to illustrate the applications of Graph Theory algorithms to study, analyze and simulate the behavior of routing protocols for MANETs. We will discuss the applications of Graph Theory algorithms for unicast (single-path and multi-path), multicast and broadcast communication in MANETs. An ad hoc network is often approximated as a unit disk graph [10]. In this graph, the vertices represent the wireless nodes and an edge exists between two vertices u and v if the normalized Euclidean distance (i.e., the physical Euclidean distance divided by the transmission range) between u and v is at most 1. Two nodes can communicate only if each node lies within (or on the edge of) the unit disk of the other node. The unit disk graph model neatly captures the behavior of many practical ad hoc networks and would be used in the rest of this paper for discussing the algorithms to simulate the MANET routing protocols. Most of the contemporary routing protocols proposed in the MANET literature adopt a Least Overhead Routing Approach (LORA) according to which a communication structure (route, tree or CDS) discovered through a global flooding procedure would be used as long as the communication structure exist, irrespective of the structure becoming sub-optimal since the time of its discovery in the MANET. We will also 186 Informatica 36 (2012) 185-200 N. Meghanathan adopt a similar strategy and focus only on discovering a communication structure on a particular network graph taken as a snapshot during the functioning of the MANET. Such a graph snapshot would be hereafter referred to as a 'Static Graph' and a sequence of such static graphs over the duration of the MANET simulation session would be called a 'Mobile Graph'. A communication structure determined on a particular static graph would be then validated for its existence in the subsequent static graphs and once the structure breaks, the appropriate graph algorithm can be invoked on the static graph corresponding to that particular time instant and the above procedure would be continued for the rest of the static graphs in the mobile graph. We use the big-O notation to express the theoretical worst-case run-time complexity of the algorithms discussed in this paper. Given a problem size x, where x is usually the number of items, we say f(x) = O(g(x)), when there exists positive constants c and k such that 0 < f(x) < cg(x), for all x > k [4]. The rest of this paper is organized as follows: Section 2 reviews related work on unicast, multicast, broadcast and multi-path communication in MANETs. In the subsequent sections, we discuss graph theory algorithms for unicast communication (Section 3), the tree-based algorithms for multicast communication (Section 4), a maximum density-based CDS algorithm for broadcast communication (Section 5) and multi-path algorithms for determining link-disjoint, node-disjoint and zone-disjoint routes (Section 6) in MANETs. Section 7 concludes the paper and Section 8 discuss future research directions in this area. Throughout the paper, the terms 'route' and 'path', 'link' and 'edge', 'message' and 'packet' are used interchangeably. They mean the same. 2 Background Work 2.1 Unicast Communication in MANETs There are two broad classifications of unicast routing protocols: minimum-weight based routing and stability-based routing. Routing protocols under the minimum-weight category have been primarily designed to optimize the hop count of source-destination (s-d) routes. Some of the well-known minimum-hop based routing protocols include the Dynamic Source Routing (DSR) protocol [8] and the Ad hoc On-demand Distance Vector (AODV) routing protocol [16]. The stability-based routing protocols aim to minimize the number of route failures and in turn reduce the number of flooding-based route discoveries. Some of the well-known stability-based routing protocols include the Flow-Oriented Routing Protocol [18] and the Node Velocity-based Stable Path (NVSP) routing protocol [12]. In [13] and [14], it was observed that there exists a stability-hop count tradeoff and it is not possible to simultaneously optimize both the hop count as well as the number of route discoveries. The DSR protocol is a source routing protocol that requires the entire route information to be included in the header of every data packet. However, because of this feature, intermediate nodes do not need to store up-to-date routing information in their routing tables. Route discovery is by means of the broadcast query-reply cycle. The Route Request (RREQ) packet reaching a node contains the list of intermediate nodes through which it has propagated from the source node. After receiving the first RREQ packet, the destination node waits for a short time period for any more RREQ packets, then chooses a path with the minimum hop count and sends a Route Reply (RREP) along the selected path. Later, if any new RREQ is received through a path with hop count less than that of the selected path, another RREP would be sent on the latest minimum hop path discovered. The AODV protocol, like DSR, is also a shortest path based routing protocol. However, it is table-driven. Upon receiving an unseen RREQ packet (with the highest sequence number seen so far), an intermediate node records the upstream node (sender) of the RREQ packet in its routing table entry for the source-destination route. The intermediate node then forwards the RREQ packet by incrementing the hop count of the path from the source node. The destination node receives RREQ packets on several routes and selects that RREQ packet that traversed on the minimum-hop path to the destination node. The RREP packet is then sent on the reverse of this minimum-hop path towards the source node. The destination node includes the upstream node from which the RREQ was received as the downstream node on the path from the destination node to the source node. An intermediate node upon receiving the RREP packet will check whether it has been listed as the downstream node ID. In that case, the intermediate node processes the RREP packet and completes its routing table by including the sender of the RREP packet as the next hop node on the path from the source node towards the destination node. The intermediate node then replaces its own ID in the RREP downstream node entry with the ID of the upstream node that it has in its routing table for the path from the source node to the destination node. The FORP protocol has been observed to discover the sequence of most stable routes among the contemporary stable path routing protocols [13]. FORP utilizes the mobility and location information of the nodes to approximately predict the expiration time (LET) of a wireless link. The minimum of LET values of all wireless links on a path is termed as the route expiration time (RET). The route with the maximum RET value is selected as the desired route. Each node is assumed to be able to predict the LET values of the links with its neighboring nodes based on the information regarding the current position of the nodes, velocity, the direction of movement, and transmission range. FORP assumes the availability of location-update mechanisms like Global Positioning System (GPS) [6] to identify the location of the nodes and also requires each node to periodically broadcast its location and mobility information to its neighbors through beacons. The NVSP protocol is the only beaconless routing protocol that can discover long-living stable routes without significant increase in the hop count per path. GRAPH THEORY ALGHORITHMS FOR... Informatica 36 (2012) 185-200 187 FORP discovers routes that have a significantly larger hop count than the minimum value. NVSP only requires each intermediate node to include its velocity in the RREQ packets propagated via flooding from the source node to the destination node. With flooding, each intermediate node forwards the RREQ packet exactly once, the first time the node sees the packet as part of a particular route discovery session. The destination node receives the RREQ packets through several paths and determines the bottleneck velocity of each of those paths. The bottleneck velocity of a path is the maximum among the velocities of the intermediate nodes on the path. The destination node chooses the path with the minimum bottleneck velocity and sends a RREP packet along that path. In case of a tie, the destination node chooses the path with the lowest hop count and if the tie could not be still broken, the destination node chooses an arbitrary path among the contending paths. 2.2 Multicast Communication in MANETs The Multicast communication refers to sending messages from one source node to a set of receiver nodes in a network. The receiver nodes form the multicast group and we typically find a tree that connects the source node to the multicast group members such that there is exactly one path from the source node to each receiver node. The tree could be constructed based on either one of the following two objectives: (i) Shortest path tree - the tree would have the minimum hop count paths from the source node to each receiver node and (ii) Steiner tree -the tree would have the minimum number of links spanning the source node and the multicast group members. Both these trees cannot be simultaneously built and there would always be a tradeoff between the above two objectives [14]. The Multicast Extension of the Ad hoc On-demand Distance Vector (MAODV) protocol and the Bandwidth Efficient Multicast Routing Protocol (BEMRP) are respectively examples of the minimum hop and minimum link based multicast protocols. MAODV [15] is the multicast extension of the AODV unicast routing protocol. Here, a receiver node joins the multicast tree through a member node that lies on the minimum-hop path to the source node. A potential receiver node wishing to join the multicast group broadcasts a RREQ message. If a node receives the RREQ message and is not part of the multicast tree, the node broadcasts the message in its neighborhood and also establishes the reverse path by storing the state information consisting of the group address, requesting node id and the sender node id in a temporary cache. If a node receiving the RREQ message is a member of the multicast tree and has not seen the RREQ message earlier, the node waits to receive several RREQ messages and sends back a RREP message on the shortest path to the receiver node. The member node also informs in the RREP message, the number of hops from itself to the source node. The potential receiver node receives several RREP messages and selects the member node which lies on the shortest path to the source node. The receiver node sends a Multicast Activation (MACT) message to the selected member node along the chosen route. The route from the source node to the receiver node is set up when the member node and all the intermediate nodes in the chosen path update their multicast table with state information from the temporary cache. According to BEMRP [17], a newly joining node to the multicast group opts for the nearest forwarding node in the existing tree, rather than choosing a minimum-hop count path from the source node of the multicast group. As a result, the number of links in the multicast tree is reduced leading to savings in the network bandwidth. Multicast tree construction is receiver-initiated. When a node wishes to join the multicast group as a receiver node, it initiates the flooding of Join control packets targeted towards the nodes that are currently members of the multicast tree. On receiving the first Join control packet, the member node waits for a certain time before sending a Reply packet. The member node sends a Reply packet on the path, traversed by the Join control packet, with the minimum number of intermediate forwarding nodes. The newly joining receiver node collects the Reply packets from different member nodes and would send a Reserve packet on the path that has the minimum number of forwarding nodes from the member node to itself. 2.3 Broadcast Communication in MANETs Broadcast communication refers to sending a message from one node to all the other nodes in the network. Since MANET topology is not fully connected as nodes operate with a limited transmission range, multi-hop communication is a common phenomenon in routing. As a result, a message has to be broadcast by more than one node (in its neighborhood) so that the message can reach all the nodes in the network. An extreme case of broadcasting is called flooding wherein each node broadcasts the message among its neighbors, exactly once, when the message is seen for the first time. This ensures that the message is received by all the nodes in the network. However, flooding would cause unnecessary retransmissions, exhausting the network bandwidth and the energy reserves at the nodes. Connected Dominating Sets (CDS) are considered to be very efficient for broadcasting a message from one node to all the nodes in the network. A CDS is a sub graph of a given undirected connected graph such that all nodes in the graph are included in the CDS or directly attached to a node (i.e., covered by a node) in the CDS. A Minimum Connected Dominating Set (MCDS) is the smallest CDS (in terms of the number of nodes in the CDS) for the entire graph. For a virtual backbone-based route discovery, the smaller the size of the CDS, the smaller is the number of unnecessary retransmissions. If the RREQ packets of a broadcast route discovery process get forwarded only by the nodes in the MCDS, we will have the minimum number of retransmissions. Unfortunately, the problem of determining the MCDS in an undirected graph, like that of the unit disk graph considered for modeling MANETs, is NP-complete. In 188 Informatica 36 (2012) 185-200 N. Meghanathan [1], [2] and [3], efficient algorithms have been proposed to approximate the MCDS for wireless ad hoc networks. A common thread among these algorithms is to give preference to nodes with high neighborhood density (i.e., a larger number of uncovered neighbors) for inclusion in the MCDS. 2.4 Multi-path Communication in MANETs MANET routing protocols incur high route discovery latency and also incur frequent route discoveries in the presence of a dynamically changing topology. Recent research has started to focus on multi-path routing protocols for fault tolerance and load balancing. Multi-path on-demand routing protocols tend to compute multiple paths, at both the traffic sources as well as at intermediary nodes, in a single route discovery attempt. This reduces both the route discovery latency and the control overhead as a route discovery is needed only when all the discovered paths fail. Spreading the traffic along several routes could alleviate congestion and bottlenecks. Multi-path routing also provides a higher aggregate bandwidth and effective load balancing as the data forwarding load can be distributed over all the paths. Multi-paths can be of three types: link-disjoint, node-disjoint and zone-disjoint. For a given source node s and destination node d, the set of link-disjoint s-d routes comprises of paths that have no link present in more than one constituent s-d path. Similarly, the set of node-disjoint s-d routes comprises of paths that have no node (other than the source node and destination node) present in more than one constituent s-d path. A set of zone-disjoint s-d routes comprises of paths such that an intermediate node in one path is not a neighbor node of an intermediate node in another path. Multi-path on-demand routing protocols tend to compute multiple paths between a source-destination (s-d) pair, in a single route discovery attempt. A new network-wide route discovery operation is initiated only when all the s-d paths fail. The Split Multi-path Routing (SMR) protocol [11], the AODV-Multi-path (AODVM) protocol [19] and the Zone-Disjoint multi-path extension to the DSR (ZD-DSR) protocol [7] are respectively well-known examples for link-disjoint, node-disjoint and zone-disjoint multi-path routing protocols. In SMR, the intermediate nodes forward RREQs that are received along a different link and with a hop count not larger than the first received RREQ. The destination node selects the route on which it received the first RREQ packet (which will be a shortest delay path), and then waits to receive more RREQs. The destination node then selects the path which is maximally disjoint from the shortest delay path. If more than one maximally disjoint path exists, the tie is broken by choosing the path with the shortest hop count. In AODVM, an intermediate node does not discard duplicate RREQ packets and records them in a RREQ table. The destination node responds with an RREP for each RREQ packet received. An intermediate node, on receiving the RREP, checks its RREQ table and forwards the packet to the neighbor that lies on the shortest path to the source node. The neighbor entry is then removed from the RREQ table. Also, whenever a node hears a neighbor node forwarding the RREP packet, the node removes the entry for the neighbor node in its RREQ table. The Zone-Disjoint Multi-path extension of the Dynamic Source Routing (ZD-MPDSR) protocol proposed for an omni-directional system works as follows: Whenever a source node has no route to send data to a destination node, the source node initiates broadcast of the RREQ messages. The number of active neighbors for a node indicates the number of neighbor nodes that have received and forwarded the RREQ message during a route discovery process. The RREQ message has an ActiveNeighborCount field and it is updated by each intermediate node before broadcasting the message in the neighborhood. When an intermediate node receives the RREQ message, it broadcasts a 1-hop RREQ-query message in its neighborhood to determine the number of neighbors who have also seen the RREQ message. The number of RREQ-query-replies received from the nodes in the neighborhood is the value of the ActiveNeighborCount field updated by a node in the RREQ message. The destination node receives several RREQ messages and selects the node-disjoint paths with lower ActiveNeighborCount values and sends the RREP messages to the source node along these paths. Even though the selection of the zone-disjoint paths with lower number of active neighbors will lead to reduction in the end-to-end delay per data packet, the route acquisition phase will incur a significantly longer delay as RREQ-query messages are broadcast at every hop (in addition to the regular RREQ message) and the intermediate nodes have to wait to receive the RREQ-query and reply messages from their neighbors. This will significantly increase the control overhead in the network. 3 Graph Theory Algorithms for Unicast Communication in MANETs In a graph theoretic context, we illustrate that the minimum-weight (minimum-hop) based routing protocols could be simulated by running the shortest-path Dijkstra algorithm [4] on a mobile graph (i.e. a sequence of static graphs). We then illustrate that the NVSP and FORP protocols could be simulated by respectively solving the smallest bottleneck and the largest bottleneck path problems - each of which could be implemented as a slight variation of the shortest path Dijkstra algorithm. In addition, we also illustrate that the Prim's minimum spanning tree algorithm and its modification to compute the maximum spanning tree can be respectively used to determine the 'All Pairs Smallest Bottleneck Paths' and 'All Pairs Largest Bottleneck Paths' in a weighted network graph. GRAPH THEORY ALGHORITHMS FOR... Informatica 36 (2012) 185-200 189 3.1 Shortest Path Problem Given a weighted graph G = (V, E), where V is the set of vertices and E is the set of weighted edges, the shortest path problem is to determine a minimum-weight path between any two nodes (identified as source node s and destination node d) in the graph. The execution of the Dijkstra algorithm (pseudo code in Figure 1) on a weighted graph starting at the source node s results in a shortest path tree rooted at s. In other words, the Dijkstra algorithm will actually return the minimum-weight paths from the source vertex s to every other vertex in the weighted graph. If all the edge weights are 1, then the minimum-weight paths are nothing but minimum-hop paths. Begin Algorithm Dijkstra-Shortest-Path (G, s) 7 8 9 10 11 12 13 14 15 16 17 For each vertex v £ V weight [v] ^ ® // an estimate of the minimum-weight path from 5 to v End For weight [5] ^ 0 S ^ 0 // set of nodes for which we know the minimum-weight path from 5 Q ^ V // set of nodes for which we know estimate of the minimum-weight path from 5 While Q + 0 u ^ EXTRACT-MIN (Q) S ^ S U {u} For each vertex v such that (u, v) £ E If weight [v] > weight [u] + weight (u, v) then weight [v] ^ weight [u] + weight (u, v) Predecessor (v) ^ u End If End For End While End Dijk5tra-Shorte5t-Path Figure 1: Pseudo Code for Dijkstra's Shortest Path Algorithm. Dijkstra algorithm proceeds in iterations. To begin with, the weights of the minimum-weight paths from the source vertex to every other vertex is assumed to be +® (as estimate value, indicating that the paths are actually not known) and from the source vertex to itself is assumed to be 0. During each iteration, we determine the shortest path from the source vertex 5 to a particular vertex u, which would be the vertex with the minimum weight among the vertices that have been not yet optimized (i.e. for which the shortest path has not been yet determined). We then explore the neighbors of u and determine whether we can reach any of the neighbor vertices, say v, from 5 through u on a path with weight less than the estimated weight of the current path we know from 5 to v. If we could find such a neighbor v, then we set the predecessor of v to be vertex u on the shortest path from 5 to v. This step is called the relaxation step and is repeated over all iterations. The darkened edges shown in the working example of Figure 2 are the edges that are part of the shortest-path tree rooted at the source vertex 5. The run-time complexity of the Dijkstra's shortest path algorithm is O(| V|2). w 3 5 "NX SI 0 * 3 8 ) 4 5\ il 1 uV 4 /4 6 i w V 3 J Iteration 3 w t 3 5 X s( 0 8 : 4 5\ il 1 4 H 4 6 : „ u\ T~ V w L 3 5 \ X sf 0 {V ( 7 ) 4 1I [l 4 /4 6) w uv 2 V Iteration 4 Iteration 5 Figure 2: Example to Illustrate the Working of the Dijsktra's Shortest Path Algorithm. 3.2 Smallest Bottleneck Path Problem In the context of the smallest bottleneck path problem, we define the bottleneck weight of a path p to be the maximum of the weights of the constituent edges, e ep. Given the set of all loop-free paths P between a source node s and destination node d, the smallest bottleneck path is the path with the smallest bottleneck weight. We can express this mathematically as Min peP The Max(weight (e) \ieep Begin Algorithm Modified-Dijkstra-Smalle5t-Bottleneck-Path (G, 5) 1 For each vertex v £ V 2 weight [v] ^ +® // an estimate of the smallest bottleneck weight path from 5 to v 3 End For 4 weight [5] <— ® 5 S ^ 0 // set of nodes for which we know the smallest bottleneck weight path from 5 6 190 Informatica 36 (2012) 185-200 N. Meghanathan 6 Q ^ V // set of nodes for which we know an estimate of the smallest bottleneck weight path from 5 7 While Q 4 0 8 u ^ EXTRACT-MIN (Q) 9 S ^ SU {u} 10 For each vertex v such that (u, v) £ E 11 If weight[v] > Max(weight [u], weight (u, v)) then 12 weight [v] ^ Max (weight [u], weight (u, v)) 13 Predecessor (v) ^ u 14 End If 15 End For 16 End While 17 End Modified-Dijkstra-Smallest-Bottleneck-Path Figure 3: Pseudo Code for the Modified Dijkstra Smallest Bottleneck Path Algorithm. Initialization Iteration 1 Iteration 2 Iteration 3 Iteration 4 Iteration 5 Figure 4: Example for the Smallest Bottleneck Path Problem. NVSP protocol can be implemented in a graph theoretic context through a modified version of the Dijkstra's algorithm (pseudo code in Figure 3) that solves the smallest bottleneck path problem. Accordingly, the weight of a link from node u to node v is the velocity of the downstream node v. To start with, the weight of the smallest bottleneck path from the source vertex s to every other vertex is estimated to be +<»; whereas the weight of the smallest bottleneck path from the source vertex s to itself is set to - At the beginning of an iteration, the vertex (say u) with the smallest bottleneck weight among the vertices that have been not yet optimized is now considered to be optimized. As part of the relaxation step, we check whether the current weight of the smallest bottleneck path to any non-optimized neighbor v, i.e. weight[v], is greater than the maximum of the weight of the recently optimized largest bottleneck path from s to u, i.e. weight[u] and the weight of the edge (u, v). If this relaxation condition evaluates to true, then the bottleneck weight of the path from s to v is correspondingly updated (i.e., weight[v] = Max (weight[u], weight(u, v)) and the predecessor of v is set to be u for the path from s to v. This step is repeated over all iterations. A working example is presented in Figure 4. The run-time complexity of the modified Dijkstra algorithm for the smallest bottleneck path problem is the same as that of the original Dijkstra algorithm. 3.3 All Pairs Smallest Bottleneck Paths Problem In this section, we show that the smallest bottleneck path between any two vertices u and v e V in an undirected weighted graph G = (V, E) is the path between u and v in the minimum spanning tree of G. The Prim's algorithm [4] is a well-known algorithm to determine the minimum spanning tree of weighted graphs and its pseudo code is illustrated in Figure 5. The Prim's algorithm is very similar to the Dijkstra algorithm - the major difference is in the relaxation step. Begin Algorithm Prim (G, s); s - is any arbitrarily chosen starting vertex 1 For each vertex v £ V 2 weight [v] ^ ® 3 End For 4 weight [s] ^ 0 5 S ^ 0 // set of nodes whose bottleneck weights will not change further 6 Q ^ V // set of nodes whose bottleneck weights are only estimates; final weight could change 7 While Q 4 0 8 u ^ EXTRACT-MIN (Q) 9 S ^ SU {u} 10 For each vertex v such that (u, v) £ E 11 If weight [v] > weight (u, v) then 12 weight [v] ^ weight (u, v) 13 Predecessor (v) ^ u 14 End If 15 End For 16 End While 17 End Prim Figure 5: Pseudo Code for the Prim's Algorithm to Determine a Minimum Spanning Tree. GRAPH THEORY ALGHORITHMS FOR... Informatica 36 (2012) 185-200 191 Note that in both Figures 4 and 6, we start with the same initial graph. Since, the relaxation step of the modified Dijkstra algorithm and the Prim's algorithm are different, the sequence of vertices that are optimized in each algorithm is different from one another. However, the final tree rooted at the starting vertex s is the same in both the figures. This example vindicates our argument that the minimum spanning tree contains the smallest bottleneck paths between any two vertices in the original graph. We now formally prove this argument (refer Figure 7 for an illustration of the example) below through the method of Proof by Contradiction. Figure 6: Example for the Minimum Spanning Tree - All Pairs Smallest Bottleneck Paths. The Prim's algorithm work as follows: The starting vertex is any arbitrarily chosen vertex (say s) in the given undirected weighted graph G. To begin with, the weights of the smallest bottleneck paths from the starting vertex to every other vertex is assumed to be (as estimate value, indicating that the paths are actually not known) and the path from the starting vertex to itself is assumed to be 0. During every iteration, we determine the smallest bottleneck path from the starting vertex s to a particular vertex u, which would be the vertex with the minimum weight among the vertices that have been not yet optimized (i.e. for which the smallest bottleneck path has not been yet determined). We then explore the neighbors of u and determine whether we can reach any of the neighbor vertex, say v, from s through u on a path with weight less than the estimated bottleneck weight of the current path we know from s to v. If we could find such a neighbor v as part of the relaxation step, we set the new estimated bottleneck weight of vertex v to the weight of the edge (u, v) and also set the predecessor of v to be vertex u on the smallest bottleneck path from s to v. The darkened edges shown in the working example of Figure 6 are the edges that are part of the smallest bottleneck path tree rooted at the starting vertex s. The path between any two vertices in this smallest bottleneck path tree is the smallest bottleneck path between the two vertices in the original graph. The run-time complexity of the Prim's minimum spanning tree algorithm is O(|V|2). Figure 7: Proof by Contradiction: Minimum Spanning Tree with All Pairs Smallest Bottleneck Paths. Let there be a pair of vertices u e V and v e V2 in G = (V, E) such that the edge (u, v) e E, V U V2 = V and V o V2 =