Acta Informatica

, Volume 8, Issue 4, pp 303–314 | Cite as

On computing the transitive closure of a relation

  • J. Eve
  • R. Kurki-Suonio


An algorithm is presented for computing the transitive closure of an arbitrary relation which is based upon Tarjan's algorithm [7] for finding the strongly connected components of a directed graph. A new formulation, justifying a somewhat simplified statement of the latter, characterises weaker restrictions on the form of the graph traversal than Tarjan's depth first conditions and reveals aspects of the behaviour of this algorithm which have been obscure hitherto.

If V is the number of vertices in the directed graph representing the relation then the worst case behaviour, O(V3) is inferior to existing algorithms [1, 2] which require O(V3/log V) and \(O(V^{log_2 7} log V)\) operations respectively. The best case performance, O(V2) operations, is better. Viewed in this way, it is similar to other algorithms [5, 6, 8] but it combines the improved efficiency in the presence of strongly connected components which characterises the algorithms in [5, 6] with the advantages of Warshall's algorithm [8], namely, succinctness, a single traversal of the directed graph and ability to exploit the availability of Boolean vector operations.


Information Theory Computational Mathematic Computer System System Organization Directed Graph 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Artazarov, V.L., Dinic, E.A., Kronrod, D.A., Faradzev, I.A.: On economical construction of the transitive closure of a directed graph. Soviet Math. Dokl. 11, 1209–1210 (1970)Google Scholar
  2. 2.
    Furman, F.E.: Application of a method of fast multiplication of matrices in the problem of finding the transitive closure of a graph. Soviet Math. Dokl. 11, 1252 (1970)zbMATHGoogle Scholar
  3. 3.
    Knuth, D.E.: Top-down syntax analysis. Acta Informat. 1, 79–110 (1971)zbMATHGoogle Scholar
  4. 4.
    Knuth, D.E.: The art of computer programming, Vol. 1, 2nd ed. Reading (Mass): Addison-Wesley 1973Google Scholar
  5. 5.
    Purdom, P.: A transitive closure algorithm. BIT 10, 76–94 (1970)CrossRefzbMATHGoogle Scholar
  6. 6.
    Syslo, M.M., Dzikiewicz, J.: Computational experiences with some transitive closure algorithms. Computing 15, 33–39 (1975)Google Scholar
  7. 7.
    Tarjan, R.: Depth-first search and linear graph algorithms. SIAM J. Computing 1, 146–160 (1972)CrossRefzbMATHMathSciNetGoogle Scholar
  8. 8.
    Warshall, S.: A theorem on Boolean Matrices. J. Assoc. Comput. Mach. 9, 11–12 (1962)zbMATHMathSciNetGoogle Scholar

Copyright information

© Springer-Verlag 1977

Authors and Affiliations

  • J. Eve
    • 1
  • R. Kurki-Suonio
    • 2
  1. 1.Computing LaboratoryThe University of Newcastle upon TyneNewcastle upon TyneEngland
  2. 2.Department of Computer ScienceUniversity of TampereTampere 10Finland

Personalised recommendations