Skip to main content

A direct algorithm for computing the transitive closure of a two-dimensionally structured file

  • Storage And Organization
  • Conference paper
  • First Online:
  • 137 Accesses

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

Abstract

It is well-known that the computation cost to find the transitive closure (TC) of a graph stored as an adjacency matrix is the same, to within a constant factor, as matrix multiplication. In this paper, we present a new TC algorithm based on double hashing and two-dimensionally organized files. We show that, when using this algorithm, the computation and i/o costs of finding the TC of a database relation is like that of performing a relational composition operation. For sparse closures, sparse compositions will be performed, which may be significantly more thrifty than the corresponding matrix operations, which must be at least O(n 2), and for which most algorithms are O(n 3).

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

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. R. Agrawal, S. Dar, & H.V. Jagadish, “Composition of Database Relations” Data Engineering '89.

    Google Scholar 

  2. R. Agrawal & H.V. Jagadish, “Direct Algorithms for Computing the Transitive Closure of Database Relations” VLDB '87.

    Google Scholar 

  3. R. Agrawal and H.V. Jagadish, “Hybrid Transitive Closure Algorithms” VLDB '90.

    Google Scholar 

  4. R. Agrawal, “Alpha: An extension of Relational Algebra to Express a Class of Recursive Queries” Data Engineering '87

    Google Scholar 

  5. A. V. Aho, J. E. Hopcroft, & J. D. Ullman, “The Design and Analysis of Computer Algorithms”, Addison-Wesley, Reading, MA, 1974.

    Google Scholar 

  6. Bancilhon F, and Ramakrishna R., “An Amateur Introduction to Recursive Query Processing,” ACM SIGMOD'86, Washington D.C, May 1986, pp 16–52.

    Google Scholar 

  7. S. Ceri, G. Gottlob, L. Tanca, “What You Always Wanted to Know About Datalog (And Never Dared To Ask),” IEEE Transactions on Knowledge and Data Engineering, Vol. 1, No. 1, March 1989, pp 146–166.

    Google Scholar 

  8. J.P Cheiney & C. de Maindreville, “A Parallel Transitive Closure Algorithm using hashs-based clustering” Proceedings of the 6th Int. Conf. Database Machines, in Lecture Notes in Computer Science, Nb. 368, Springer-Verlag, June, 1989.

    Google Scholar 

  9. D. Coppersmith & S. Winograd, “Matrix Multiplication via Arithmetic Progressions” Proc. Nineteenth Annual ACM Symposium on the Theory of Computing, pp 1–6, 1987.

    Google Scholar 

  10. Nabil Hachem, “Implementation of an Efficient Transitive Closure Operation for Main Memory (Very Large) Deductive Databases”, WPI Computer Science Technical Report WPI-CS TR-90-13, May, 1990, pp 17.

    Google Scholar 

  11. J. Han, G. Qadeh, & C. Chaou, “The Processing and Evaluation of Transitive Closure Queries” EDBT '88.

    Google Scholar 

  12. Y. E. Ioannidis, “On the Computation of the Transitive Closure of Relational Operators” VLDB '86.

    Google Scholar 

  13. Y. E. Ioannidis & R. Ramakrishnan, “Efficient Transitive Closure Algorithms” VLDB '88.

    Google Scholar 

  14. H.V. Jagadish, R. Agrawal, & L. Ness “A Study of Transitive Closure as a Recursion mechanism” SIGMOD Record 16,#3, December 1987, pp 331–344.

    Google Scholar 

  15. S.C. Kleene, “Representation of Events in Nerve Nets and Finite Automata,” in Automata Studies, C.E. Shannon and J. McCarthy, eds., Princeton Univ. Press, 1956, pp 3–40.

    Google Scholar 

  16. H. Lu, “New Strategies for Computing the Transitive Closure of a Database Relation” VLDB '87.

    Google Scholar 

  17. J. D. Ullman, “Database and Knowledge-base Systems Vol II”, Computer Science Press, Rockville, MD 1989.

    Google Scholar 

  18. J. D. Ullman & M. Yannakakis, “The Input/Output Complexity of Transitive Closure” SIGMOD '90.

    Google Scholar 

  19. P. Valduriez and H. Boral, ”Evaluation of Recursive Queries Using Join Indices,” Proceedings of the First International Conference on Expert Databases, April 1986, pp 197–208.

    Google Scholar 

  20. Henry S. Warren, “A Modification of Warshall's Algorithm for the Transitive Closure of Binary Relations” CACM April 1975 p 218–220

    Google Scholar 

  21. Stephen Warshall, “A Theorem on Boolean Matrices” J. ACM 9, 1 January 1962, pp 11–12.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Bernhard Thalheim János Demetrovics H. -D. Gerhardt

Rights and permissions

Reprints and permissions

Copyright information

© 1991 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Taylor, S., Hachem, N.I. (1991). A direct algorithm for computing the transitive closure of a two-dimensionally structured file. In: Thalheim, B., Demetrovics, J., Gerhardt, H.D. (eds) MFDBS 91. MFDBS 1991. Lecture Notes in Computer Science, vol 495. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-54009-1_11

Download citation

  • DOI: https://doi.org/10.1007/3-540-54009-1_11

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-54009-0

  • Online ISBN: 978-3-540-47348-0

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics