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.
References
R. Agrawal, S. Dar, & H.V. Jagadish, “Composition of Database Relations” Data Engineering '89.
R. Agrawal & H.V. Jagadish, “Direct Algorithms for Computing the Transitive Closure of Database Relations” VLDB '87.
R. Agrawal and H.V. Jagadish, “Hybrid Transitive Closure Algorithms” VLDB '90.
R. Agrawal, “Alpha: An extension of Relational Algebra to Express a Class of Recursive Queries” Data Engineering '87
A. V. Aho, J. E. Hopcroft, & J. D. Ullman, “The Design and Analysis of Computer Algorithms”, Addison-Wesley, Reading, MA, 1974.
Bancilhon F, and Ramakrishna R., “An Amateur Introduction to Recursive Query Processing,” ACM SIGMOD'86, Washington D.C, May 1986, pp 16–52.
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.
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.
D. Coppersmith & S. Winograd, “Matrix Multiplication via Arithmetic Progressions” Proc. Nineteenth Annual ACM Symposium on the Theory of Computing, pp 1–6, 1987.
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.
J. Han, G. Qadeh, & C. Chaou, “The Processing and Evaluation of Transitive Closure Queries” EDBT '88.
Y. E. Ioannidis, “On the Computation of the Transitive Closure of Relational Operators” VLDB '86.
Y. E. Ioannidis & R. Ramakrishnan, “Efficient Transitive Closure Algorithms” VLDB '88.
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.
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.
H. Lu, “New Strategies for Computing the Transitive Closure of a Database Relation” VLDB '87.
J. D. Ullman, “Database and Knowledge-base Systems Vol II”, Computer Science Press, Rockville, MD 1989.
J. D. Ullman & M. Yannakakis, “The Input/Output Complexity of Transitive Closure” SIGMOD '90.
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.
Henry S. Warren, “A Modification of Warshall's Algorithm for the Transitive Closure of Binary Relations” CACM April 1975 p 218–220
Stephen Warshall, “A Theorem on Boolean Matrices” J. ACM 9, 1 January 1962, pp 11–12.
Author information
Authors and Affiliations
Editor information
Rights 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