1 / 22

A Fast Algorithm To Determine Minimality of Strongly Connected Digraphs

A Fast Algorithm To Determine Minimality of Strongly Connected Digraphs. Under the direction of Dr. Robinson By Jianping Zhu. Why MSD Algorithm.

anika
Download Presentation

A Fast Algorithm To Determine Minimality of Strongly Connected Digraphs

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. A Fast Algorithm To DetermineMinimality of Strongly Connected Digraphs Under the direction of Dr. Robinson By Jianping Zhu

  2. Why MSD Algorithm • This algorithm can be used to facilitate the process of generating MSDs. An O(n2) time algorithm is utilized by Kiran Bhogadi to check whether a candidate digraph is an MSD and we think the performance of his algorithm can potentially be improved for large digraphs by utilizing our algorithm

  3. g e a f d h b c Strong Digraph • A Strong Digraph is one in which every vertex is reachable from every other vertex.

  4. Minimal Strong Digraph • A Minimal Strong Digraph (MSD) is a strong digraph which is no longer strong if any of its edges is removed g e f a h d b c

  5. a 1/8 c 2/7 h 8/5 d 5/6 b 3/2 f 6/4 e 7/3 g 4/1 Depth First Search Back edge Forward edge Tree edge Cross Edge

  6. Detecting reducibility of graph edges • Detecting reducibility of non-tree edges Forward edges Cross edges Back edges • Detecting reducibility of tree edges

  7. v w Forward edges • Theorem 1. Each forward edge e = (v, w) is reducible e

  8. w e1 z v e Cross edges (1) • e = ( v, z ) is a cross edge and w is the nearest common ancestor of vertices v and z in the DFS-tree of G. • Theorem 2: If edge e1 = (v, w) is in E then e is reducible.

  9. Cross edges (2-a) • Theorem 3: If edge e1is not in E, let G1= G  e + e1. Then: • 1. The edge e is reducible in G if and only if the edge e1 is reducible in the digraph G1. • 2. Let e2 be an edge of G other than e which is not a tree edge. Then e2is reducible in G if and only if e2 is reducible inG1.

  10. w w w e1 z v v z v z e G G1 G2 Cross edges(2-b)

  11. w1 w2 w3 ws v Back edges (1) • Theorem 4. Let {(v, w1) … (v, ws)} be the set of back edges emanating from vertex v in such a way that w1<w2< …<ws . Then all edges (v, w2) … (v, ws) are reducible.

  12. w z v x Back edges (2-a) • Theorem 5. Let e = (v, w) be a back edge in G, x be a descendant of v with v  x and z be a vertex such that there is an edge from x to z. • 1. If e1 = (z, w) is an edge in G1, then e is reducible . • 2. If e1 is not an edge in G, then e is reducible in G if and only if e1is reducible in the digraph G2 = G  e + e1 • 3. Let e2 = (a, b) be an edge in G with e  e2  e1and e2 is a non-tree edge. Then e2is reducible in G if and only if e2 is reducible in G2. e

  13. w w w w e1 e1 z z z z e v v v v x x x x G2 Back edges(2-b) e G3 G1 G

  14. Algorithm 1 • Algorithm 1: • Input A strongly connected digraph G(V, E) • Output true: the input digraph may be an MSD • (need to check if there are reducible tree edges) • false: the input digraph is not an MSD • 1.do depth first search to get the partitions of edges TREE, BACK, CROSS, FORWARD, The depth first search tree DFS-Tree. • 2. for vV backpoint(v) v • endfor 3. if the set FORWARD is not empty • return false; • endif • 4. for e = (v, w)  BACK • backpoint(v)  min (backpoint(v), w); • if there exists an e = (v, w) B with w  backpoint(v) • return false; • endif • endfor

  15. Algorithm 1 (cont) • 5. for e = (v, w)  CROSS do • let n be the nearest common ancestor of v and w • if (w < backpoint(v)) • add (v, n) to G; • delete (v, backpoint(v)) from G; • backpoint(v) w; • else • return false • endif • endfor • 6. //R-test (root of DFS-tree) • R-test(v) • for  w with (v, w)  T do R-test(w) • if w is not a leaf; • z  min (backpoint(w),(v, w)  TREE); • if (vz) • if ( backpoint(v) < backpoint(z)) • backpoint(z)  backpint(v); • else if (v backpoint(v)) • return false • else • backpoint(v) z; • endif • endif • 7. return false

  16. Algorithm 2 • Algorithm 2: • 1.reverse G to get GR, • run Algorithm 1 on GR • if (Algorithm 1 returns false) • return false; • else • let TRbe the DFS tree associated with GR • let TSbe the reverse graph of TR • endif • 2. run Algorithm 1 on G • if ( Algorithm 1 return false) • return false • else • let T be the DFS tree associated with G • for edges (w, z) which are in both T and TS • if ((w,z) is not a dominating edge for z • and (w, z) is not a reverse • dominating edge for w ) • return false • endif • endfor • endif

  17. r r z w w z x x Detecting reducibility of tree edges Ts T

  18. Timing Tests • We tested the running time for randomly generated digraph up to 1000 vertices. We generated 20 digraphs for each number of vertices from 4 starter digraphs. We tested running time on the 20 digraphs and then took average.

  19. Running time of MSD algorithm

  20. Running time of NCA algorithm

  21. Running time of the finding immediate dominators algorithm

  22. Thanks

More Related