Skip to main content

Counting edges in a dag

  • Conference paper
  • First Online:
Graph-Theoretic Concepts in Computer Science (WG 1996)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 1197))

Included in the following conference series:

  • 154 Accesses

Abstract

In this paper we generalize a technique used by La Poutré and van Leeuwen in [14] for updating the transitive closure and the transitive reduction of a dag, and propose a uniform approach to deal with semi-dynamic problems on dags. We define a propagation property on a binary relationship as a simple sufficient condition to apply this approach. The proposed technique is suitable for a very simple implementation which does not depend on the particular problem; in other words, the same procedures can be used to deal with different problems on dags by simply setting appropriate border conditions.

In particular we provide semi-dynamic algorithms and data structures for maintaining a binary relationship defined over the vertices of a dag with n vertices and m edges, requiring O(n(q+m)) total time, for any sequence of q edge insertions (deletions). This gives O(n) amortized time per operation over a sequence of Ω(m) edge insertions (deletions). Queries can be answered in constant time. The space required is O(n 2).

We apply the proposed technique to various problems about dominance, providing the first known incremental and decrementai solutions for maintaining the dominance relationship, the dominator tree, and the nearest common dominator of a dag.

Partially supported by EU ESPRIT Long Term Research Project ALCOM-IT under contract no.20244, and by Progetto Finalizzato Trasporti 2 (PFT 2) of the Italian National Research Council (CNR).

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. A. V. Aho, R. Sethi, and J. D. Ullman. Compilers, Principles, Techniques, and Tools. Addison-Wesley, 1986.

    Google Scholar 

  2. G. Ausiello, G. F. Italiano, A. Marchetti Spaccamela, and U. Nanni. Incremental algorithms for minimal length paths. Journal of Algorithms, 12(4):615–638, 1991.

    Google Scholar 

  3. G. Ausiello and M. Scasso. Algoritmos para mantener dinamicamente clausura transitiva y arbol de dominadores en grafos aciclicos dirigidos. Technical report, Buenos Aires, November 1989.

    Google Scholar 

  4. M. D. Carrol and B. G. Ryder. Incremental dataflow update via attribute and dominator update. In ACM Symposium on Principles of Programming Languages., pages 274–284, 1988.

    Google Scholar 

  5. J. Chu. Optimal algorithms for the nearest common dominator problem. Journal of Algorithms, 13:693–697, 1992.

    Google Scholar 

  6. M. J. Chung and M. S. Krishnamoorthy. Algorithms for placing recovery points. Information Processing Letters, 28:177–181, 1988.

    Google Scholar 

  7. R. Cytron, J. Ferrante, B. K. Rosen, M. N. Wegman, and K. Zadeck. Efficiently computing static single assignment form and the control dependence graph. ACM Transactions on Programming Languages and Systems, 13(4):451–490, 1991.

    Google Scholar 

  8. F. Harary. Graph Theory. Addison-Wesley, Reading, MA, 1969.

    Google Scholar 

  9. D. Harel. A linear time algorithm for finding dominators in flow graphs and related problems. In ACM Symposium on Theory of Computing, pages 185–194, 1985.

    Google Scholar 

  10. D. Harel and R. E. Tarjan. Fast algorithms for finding nearest common ancestors. SIAM Journal on Computing, 13(2):338–355, 1984.

    Google Scholar 

  11. G. F. Italiano. Amortized efficiency of a path retrieval data structure. Theoretical Computer Science, 48:273–281, 1986.

    Google Scholar 

  12. G. F. Italiano. Finding paths and deleting edges in directed acyclic graphs. Information Processing Letters, 28:5–11, 1988.

    Google Scholar 

  13. P. N. Klein, S. Rao, M. Rauch, and S. Subramanian. Faster shortest-path algorithms for planar graphs. In ACM Symposium on Theory of Computing, pages 27–37, Montreal, Quebec, Canada, 1994.

    Google Scholar 

  14. J. A. La Poutré and J. van Leeuwen. Maintenance of transitive closure and transitive reduction of graphs. In International Workshop on Graph-Theoretic Concepts in Computer Science, pages 106–120. Lect. Notes in Comp. Sci., 314, 1988.

    Google Scholar 

  15. T. Lengauer and R. E. Tarjan. A fast algorithm for finding dominators in a flowgraph. ACM Transactions on Programming Languages and Systems, 1(1):121–141, 1979.

    Google Scholar 

  16. S. R. Pawagi and I. V. Ramakrishnan P. S. Gopalakrishnan. Computing dominators in parallel. Information Processing Letters, 24:217–221, 1987.

    Google Scholar 

  17. G. Ramalingam and T. Reps. An incremental algorithm for maintaining the dominator tree of a reducible flowgraph. In ACM Symposium on Principles of Programming Languages., pages 287–296, 1994.

    Google Scholar 

  18. S. Subramanian. A fully dynamic data structure for reachability in planar digraphs. In Proc. of ESA '93, pages 372–383. Lecture Notes in Comp. Sci., 726, 1993.

    Google Scholar 

  19. R. E. Tarjan. Finding dominators in directed graphs, SIAM Journal on Computing, 3(1):62–89, 1974.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Fabrizio d'Amore Paolo Giulio Franciosa Alberto Marchetti-Spaccamela

Rights and permissions

Reprints and permissions

Copyright information

© 1997 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Cicerone, S., Frigioni, D., Nanni, U., Pugliese, F. (1997). Counting edges in a dag. In: d'Amore, F., Franciosa, P.G., Marchetti-Spaccamela, A. (eds) Graph-Theoretic Concepts in Computer Science. WG 1996. Lecture Notes in Computer Science, vol 1197. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-62559-3_9

Download citation

  • DOI: https://doi.org/10.1007/3-540-62559-3_9

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-62559-9

  • Online ISBN: 978-3-540-68072-7

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics