Upcoming SlideShare
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Standard text messaging rates apply

# 15 82-87

87

Published on

The article presents a simple algorithm to construct minimum spanning tree and …

The article presents a simple algorithm to construct minimum spanning tree and
to find shortest path between pair of vertices in a graph. Our illustration includes the proof
of termination. The complexity analysis and simulation results have also been included.

Published in: Education
0 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

• Be the first to like this

Views
Total Views
87
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
1
0
Likes
0
Embeds 0
No embeds

No notes for slide

### Transcript

• 1. On the Linear Time Construction of Minimum Spanning Tree Awadhesh Kumar Singh1 , Ashish Negi2 , Manish Kumar3 , Vivek Rathee4 and Bharti Sharma5 1,2,3,4,5 National Institute of Technology Kurukshetra, Haryana, INDIA 1 aksinreck@rediffmail.com, 2 ashishnegi33@gmail.com, 3 manishgl08@gmail.com, 4 rockonvivek@gmail.com, 5 bharti_kanhiya@yahoo.co.in Abstract— The article presents a simple algorithm to construct minimum spanning tree and to find shortest path between pair of vertices in a graph. Our illustration includes the proof of termination. The complexity analysis and simulation results have also been included. Index Terms— graph, spanning tree, ad hoc network I. INTRODUCTION The graphical structures are popularly used to model computer networks. The spanning tree is one such structure. A spanning tree of a graph is the subgraph containing all the vertices and is a tree. The sum of its edge weights is called weight of the spanning tree. The smallest weight spanning tree, among all the possible spanning trees of a graph, is called minimum spanning tree (henceforth, MST). The ad hoc networks undergo topological changes due to the node movement or failure. Hence, the MST modeling such networks often needs to be reorganized. It is called the dynamic maintenance of MST. As, in the ad hoc network, nodes are energy constrained and the topological changes may be frequent, the MST computation method should be light weight and fast. The popular algorithms available in the literature, to compute MST, can be placed in two broad categories, namely, message efficient and time efficient. The message efficient algorithms, e.g. GHS algorithm [1], Chin-Ting [2], Gafni [3], and Awerbuch algorithm [4], exhibit linear or super linear time complexity; nevertheless, they are message optimal. On the other hand, the time efficient algorithms, e.g. Garay-Kutten-Peleg algorithm [5], Kutten-Peleg algorithm [6], and Elkin [7], exhibit sublinear time complexity; however, they are not message optimal. We present an algorithm to compute MST. Though, the algorithm is centralized, it exhibits message complexity better than algorithms [1–4] while keeping the time complexity order linear. II. THE ALGORITHM CONCEPT We consider a mobile ad hoc network (MANET) modeled as an undirected connected graph G = (V, E), where V is the set of vertices (nodes) and E is the set of edges (communication links) between them. Each edge eE has non-zero weight w. Each node has unique Id. Any two nodes are called neighbors if they are one hop away from each other and communicate directly. Also, we assume that despite multipath effect and varying channel conditions the message propagation between neighbor nodes is FIFO. We aim to collect the entire graph information at one or more nodes and use this information to create MST and to find the shortest paths between nodes. We present two methods for collecting the entire graph information. In the first method, all the graph information gets converged at a single node, which is not fixed a priori, called central DOI: 02.ITC.2014.5.15 © Association of Computer Electronics and Electrical Engineers, 2014 Proc. of Int. Conf. on Recent Trends in Information, Telecommunication and Computing, ITC
• 2. 83 node. However, in the second method, we adopt a distributed approach so that each node gets the complete graph information. Hence, we name our methods as ‘centralized’ and ‘decentralized’ accordingly. Though, both centralized and decentralized approaches can be used for constructing MST and for finding shortest paths, it has been shown in the complexity analysis that the centralized approach performs better for constructing MST whereas the decentralized approach does well to find shortest paths. A. Message Types and Data Structures We assume an initiator node v  V, which performs breadth first search (BFS) in the beginning. The initiator could be any arbitrary node in the system. The BFS procedure outputs the BFS-tree with v as root. In BFS- tree, there are two types of nodes, namely, leaf and non-leaf nodes. A leaf node has single edge connecting parent and non-leaf node has two or more edges that connect it to its neighbors. Assume that there are total N vertices and E edges in the graph. The value of E is upper bounded by N2 when each vertex is connected to every other vertex. Each node is aware of its neighbors and the weight associated with the edges connecting them. Messages: Following messages have been used in the algorithm. 1. Make_Me_Parent: It is used by a node to request some other node to become its child. 2. ACCEPT: It is sent by a node, which accepts to become child, to the sender of Make_Me_Parent message. 3. REJECT: It is sent by a node, which has already become child of some other node, in response to Make_Me_Parent message. 4. E_Msg: It is sent by nodei to its parent. It is edges’ information message containing Id of all neighbors for nodei and the weights associated with the edges connecting them. Also, nodei forwards with it all other E_Msg messages received from its BFS neighbors. It also contains Id of its source node. 5. MST_Info_Msg: It is the message containing MST information. 6. Graph_Info_Msg: It is the message containing complete graph information. Data Structures: Each nodei maintains the following data structures: 1. has_parenti: boolean variable indicating whether the nodei has parent. 2. allNeighborListi:It is the list containing Id of all neighbors (BFS and non-BFS) of nodei. 3. countInfoEdgei: It contains the number of edges through which nodei has received E_Msg. It is initialized to zero and incremented on reception of each E_Msg. 4. countBFSedgei: It is variable that contains the number of BFS neighbors of nodei. 5. BFS_NeighborListi: It is the list containing Id of all BFS neighbors of nodei. 6. Array_listi[]: Each nodei maintains a 1-d array having number of elements equal to countBFSedgei; Array_listi[j] = 1, in case, E_Msg received from node j; Array_listi[j] = 0, otherwise. Array_listi[j] is initialized to 0 for all j. 7. Reject_Counti: Each nodei maintains this variable to count the number of REJECT messages received. B. Algorithm I We present the algorithm in event driven form. Firstly, the initiator starts the BFS protocol by sending Make_Me_Parent message to its neighbors. At Ordinary Node: Event 1: on receiving Make_Me_Parent message: if has_parent = 1 then reply REJECT else { reply ACCEPT; If(|allNeighborList| == 1) Then send E_Msg to the sender of Make_Me_Parent message. Else Forward Make_Me_Parent message to other neighbors. } Event 2: on receiving REJECT message: increment Reject_Count; If Reject_Count = |allNeighborList| - 1, send E_Msg to parent. Event 3: on receiving ACCEPT message: Put the sender Id in BFS_NeighborList. Event 4: on receiving E_Msg from node j: Set Array_list[j] ← 1; countInfoEdge ← countInfoEdge + 1; If (countInfoEdge = = countBFSedge - 1) Then scan Array_list[] to find node k for which Array_list[k] = 0;