
Optimal Algorithms for the Single and Multiple Vertex Up dating Problems of a Minimum Spanning Tree y Donald B Johnson Panagiotis Metaxas z Dartmouth College Abstract The vertex up dating problem for a minimum spanning tree MST is dened as follows Given a graph G V E and an MST T for G G nd a new MST for G to whichanewvertex z has b een added along with weighted edges that connect z with the vertices of GWe present a set of rules that pro duce simple optimal parallel algorithms that run in O lg n time using n lg n EREW PRAM pro cessors where n jV j These algorithms employanyvalid treecontraction schedule that can b e pro duced within the stated resource b ounds These rules can also b e used to derive simple lineartime sequential algorithms for the same problem The previously b est known parallel result was a rather complicated algorithm that used n pro cessors in the more p owerful CREW PRAM mo del Furthermore we showhow our solution can b e used to solve the multiple vertex up dating problem Up date a given MST when k new vertices are intro duced simultaneously This k n problem is solved in O lg k lg n parallel time using EREW lg k lg n PRAM pro cessors This is optimal for graphs having kn edges Keywords Optimal parallel and sequential algorithms EREW PRAM mo del vertex up dating minimum spanning tree email address djohnsoncardigandartmouthedu y Current address Department of Computer Science Wellesley College WellesleyMA email takisbambamwellesleyedu z Department of Mathematics and Computer Science Hanover NH Address for Corresp ondence Panagiotis T Metaxas Departmentof Computer Science Wellesley College Wellesley MA Intro duction Denition The vertex up dating problem for a minimum spanning tree MST is dened as follows We are given a weighted graph G V E G along with an MST T V E The graph is augmented by a new vertex z and n weighted edges connecting z to every vertex in V Wewant to compute a new MST T V fz gE In this pap er we present an optimal yet simple solution for the EREW PRAM mo del Our solution works in O lg n time lg n denotes log n using n lg n parallel pro cessors where n jV j the number of vertices in the graph Brents theorem applies and implies that using p n log n pro cessors the running time is O lg n np In the last section we showhow this solution ertex up dating problem an existing MST can b e used to solve the multiple v T is up dated simultaneously by k new vertices having weighted edges to T The mo del of parallel computation we will use throughout this pap er is the EREW PRAM exclusivereadexclusivewrite parallel random access machine The virtue of an algorithm in the EREW mo del is that no arbitration of concurrent access requests need b e provided in the machine on which it runs Such arbitration is necessary in the more p owerful CREW and CRCW mo dels employed in all previous work on these problems Weintro duce a set of rules that make use of a few simple observations on MSTs as well as of the fact that it is preferable to break the cycles in tro duced by the new edges b ecause there is only a p olynomial number of them than to compute the tree from scratch These rules are dened to apply lo cally on the no des of the existing MST so we get parallel algorithms using treecontraction as well as sequential ones using for example depth rstsearch History The vertex up dating problem of a minimum spanning tree was rst addressed by Spira and Pan in where an O nsequential algo rithm was presented Another solution using depthrstsearch and having the same time complexitywas later given by Chin and Houck in while Pawagi and Ramakrishnan gave a parallel solution to the problem Their algorithm which runs in O lg n time using n CREW PRAMs precomputes all maximum weight edges on paths b et ween any pair of no des in the tree and then breaks the cycles simultaneously in constant time Varman and Doshi presented an ecient solution that works in the same parallel time but uses n CREW PRAM pro cessors They use divideandconquer to split p the problem into approximately n equallysized subproblems which they solve recursivelyEven though their idea is rather simple the implementa tion details make the algorithm rather complex More recentlyJungand Mehlhorn have given an optimal solution for the more p owerful CRCW PRAM mo del by reduction to an all subexpression evaluation problem They use an optimal tree contraction algorithm as a subroutine as do we How ever their approach to breaking cycles is dierent from ours In our case we are able to restrict consideration of cycles to those with no more than four vertices and as we will show they can b e treated without concurrent writing Also b ecause of the all subexpression evaluation reduction they need to haveanupwards and a downwards pass on the tree to complete the calculation our approach simply computes an MST in the upward pass There is of course an obvious algorithm for solving the problem com pute from scratch an MST of the graph having as edges the old MST edges plus the added edges of z This however requires O log n log log ntime using n m EREW PRAM pro cessors employing very elab orate tech niques The solution we present here is faster and signicantly simpler The pap er is organized as follows The remainder of this section discusses a useful input representation Section has an outline of the solution and describ es the rules and the invariant used Section presents the main theo rem and some of the algorithms that can b e derived using the rules Finally Section shows how the vertex up dating algorithms can b e used to solve the multiple vertex up dating problem in parallel An earlier version of this pap er was presented in However the presentversion diers considerably and is simpler than the previous one Representation As is well known anyMSTT ofagiven graph G can b e found by a sequence of deletions of an edge of maximum weight MaxWE from some cycle Since the same sequence of deletions can b e followed on the graph augmented with the new vertex z there is an MST in the augmented graph in which none of these original nontree edges app ears Therefore it is sucient to p ose the MST problem in the augmented graph on a graph comp osed of the original MST and the edges to the new vertex z This graph whichwe call the sucient graph has at most n edges We cho ose to represent the sucient graph as a tree T with n weighted edges corresp onding to the given MST and with weights on eachofitsn no des corresp onding to weights of the newly intro duced edges to z We will call this ob ject a weightedtree Figure Apathbetween anytwoweighted a c z b Figure a The initial given MST b the sucient graph after intro duc ing the new vertex z along with its weighted edges and c the corresp onding weighted tree no des in the weighted tree corresp onds to a cycle in the graph augmented with z Such a graph with n edges is shown in Figure b and is implied by the weighted tree shown in Figure c In the discussion that follows reference to the weight of a no de will mean reference to the corresp onding edge in the sucient graph unless noted otherwise Breaking the Cycles Outline of the Algorithm As wementioned we are given the input in the form of a weighted ro oted tree We assume that eachvertex has a p ointer to a circular linked list of its children and the linked lists are stored in an array The representation of the input is not crucial since it can b e derived in O lg n time using n lg n pro cessors from any reasonable representation We should mention at the outset that in the course of our description we treat every case where read or write conicts might b e exp ected to o ccur and weshow in eachcasehow these conicts are avoided The basic idea is that when only a constantnumber of vertices are involved in a computation avoiding conicts is always p ossible with a constant dilation in running time and is in fact straightforward to implement v v u w u w v w w w u w w v w u v v v v v v w w v v Figure Binarization A no de with more than twochildren is represented by a right path of unremovable edges The algorithm consists of a numb er of phases During each phase leaves and no des of degree of the weighted tree such as the ro ot or internal no des having one child are processedEach treeno de is pro cessed once in the en tire course of the algorithm The order in which the no des are pro cessed in parallel is dictated by a treecontraction schedule Pro cessing a no de means examining the edges comp osing smal l cycles cycles of length or that contain the no de and breaking these cycles by removing a MaxWE that ap p ears in them eectively computing an MST of the subgraph induced bythe examined edges This is done by a set of rules which also up date neighb oring no des so that the size of the unpro cessed part of the tree decreases A sequential algorithm needs only to apply the appropriate rule while visiting the no des of the tree Thus a depthrstsearch or a breadthrst search visit of the no des suces When working in parallel though the rules can apply to many no des at once provided that no confusion arises from the simultaneous up dating of neighb oring no des A valid treecontraction sched ule like the ones presented in Section suces to assure that neighb oring no des are not pro cessed at the same time After pro cessing all the no des an MST of the sucient graph has b een computed and the algorithm terminates Binarization The rules we present assume a binary tree as input so some prepro
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages26 Page
-
File Size-