13.07.2015 Views

Page 2 Lecture Notes in Computer Science 2865 Edited by G. Goos ...

Page 2 Lecture Notes in Computer Science 2865 Edited by G. Goos ...

Page 2 Lecture Notes in Computer Science 2865 Edited by G. Goos ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

268 S. Bhadra and A. FerreiraTheorem 5. o-COMPONENT is NP-complete.Proof: We know that CLIQUE is NP-Complete. So from Theorem 3 and Theorem4, o-COMPONENT is NP-Complete.4 Comput<strong>in</strong>g the Directed M<strong>in</strong>imum Spann<strong>in</strong>g TreesConsider<strong>in</strong>g a strongly connected evolv<strong>in</strong>g digraph G, the object is to f<strong>in</strong>d N =|V G | rooted directed m<strong>in</strong>imum spann<strong>in</strong>g trees rooted at each of the nodes r ∈ V G .Our algorithm is a modification of the Prim-Dijkstra algorithm [4] for f<strong>in</strong>d<strong>in</strong>gMST’s <strong>in</strong> undirected standard graphs. The algorithm proceeds <strong>by</strong> build<strong>in</strong>g afragment which is a subset of the DMST start<strong>in</strong>g from the root r. The propertyof the fragment f(r) is that it consists of those edges <strong>by</strong> which <strong>in</strong>formationtransmitted at the beg<strong>in</strong>n<strong>in</strong>g of the time <strong>in</strong>terval from the root r will travel <strong>in</strong>the shortest time to the vertices <strong>in</strong>cluded already <strong>in</strong> the fragment. Hav<strong>in</strong>g def<strong>in</strong>eda fragment as such, it is easy to see how the algorithm for the DMST proceeds.In the follow<strong>in</strong>g algorithm we choose from among the set of arcs outgo<strong>in</strong>g fromthe fragment f(r), the arc with the smallest arc schedule time such that it canform a valid journey start<strong>in</strong>g from the root. A number t v is associated with eachvertex v ∈ V G denot<strong>in</strong>g the m<strong>in</strong>imum time required for that vertex to receivethe <strong>in</strong>formation given that the root r orig<strong>in</strong>ates the <strong>in</strong>formation.S<strong>in</strong>ce each node can transmit <strong>in</strong>formation only after it has received it, the<strong>in</strong>formation cannot pass simultaneously through two edges. Recall that thetime required for transmission over one arc is denoted as an arbitrary weight,w(u, v) < 1.Algorithm 11. Start with f(r) =∅ and a set V f conta<strong>in</strong><strong>in</strong>g vertices already considered <strong>in</strong>fragment f(r).2. V f = {r}, t r =13. while V f ≠ V G do(a) Let Γ f be the set of all arcs (u i ,v i ) such that u i ∈ V f , v i /∈ V f . For each(u i ,v i ) ∈ Γ f , choose the smallest arc schedule time f a (u i ,v i ), such thatf a (u i ,v i ) ≥ t ui + w(u i ,v i ).(b) Choose arc (u j ,v j ) where j = m<strong>in</strong> −1i (f a (u i ,v i )+w(u i ,v i )).(c) if f a (u j ,v j )=t uj + w(u j ,v j ), then t vj ← f a (u j ,v j ),(d) else if f a (u j ,v j ) − 1 ∈ {arc schedule of (u j ,v j )}, then t vj ← t uj +w(u j ,v j ),(e) else, t vj ← f a (u j ,v j ) − 1+w(u j ,v j )(f) add v j to V f and (u j ,v j ) to f(r).In the above algorithm, an arc schedule time i <strong>in</strong>dicates the presence of thel<strong>in</strong>k from time i − 1toi. Note that two cases might arise depend<strong>in</strong>g on whetherf a (u j ,v j )=t uj + w(u j ,v j )orf a (u j ,v j ) >t uj + w(u j ,v j ). For the first case, the<strong>in</strong>formation reaches the node exactly at the time f a (u j ,v j ). For the other case, if

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!