Skip to main content
Log in

A data structure for arc insertion and regular path finding

  • Published:
Annals of Mathematics and Artificial Intelligence Aims and scope Submit manuscript

Abstract

Let ℒ be the language defined by some deterministick-state automaton with accepting statesF, and letG be a directed graph withn nodes andm labeled arcs. Thedynamic ℒ-path problem is to process efficiently and on-line two kinds of operations: (1) inserting arcs intoG, and (2) given two nodesu andv inG, finding a path fromu tov that is labeled by some word of ℒ, or reporting that none exists. We present a data structure that supports insertion and regular path existence queries inO(nk 2) amortized time andO(|F|) worst-case time, respectively. Deletions only (no insertions) can also be accommodated in directed acyclic graphs. Finding an ℒ-path between two nodes can be done inO(l+|F|) worst-case time, wherel is the length of the path returned. This is an improvement over theO(m) time required to answer queries in the static version of this problem, for each fixed infinite ℒ. We show how this data structure and the techniques used for building it are applicable to the area of knowledge base querying. In an amortized setting, we provide relative improvements ofO(m/n) to the time bounds for answering many one-sided recursive queries and even some two-sided recursive queries, such as the same generation query on acyclic graphs.

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

Access this article

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

Explore related subjects

Discover the latest articles, news and stories from top researchers in related subjects.

References

  1. A.V. Aho, J.E. Hopcroft and J.D. Ullman,The Design and Analysis of Computer Algorithms (Addison-Wesley, Reading, MA, 1976).

    Google Scholar 

  2. K.R. Apt and J.M. Pugin, Maintenance of stratified databases viewed as a belief revision system, in:Proc. 6th ACM SIGACT-SIGMOD-SIGART Symp. on Principles of Database Systems (1987) pp. 136–145.

  3. F. Bancilhon, D. Maier, Y. Sagiv and J.D. Ullman, Magic sets and other strange ways to implement logic programs, in:Proc. 5th ACM SIGACT-SIGMOD-SIGART Symp. on Principles of Database Systems (1986) pp. 1–15.

  4. F. Bancilhon and R. Ramakrishnan, An amateur's introduction to recursive query processing strategies, in:Proc. ACM SIGMOD Symp. on the Management of Data (1986) pp. 16–52.

  5. C. Beeri, P.C. Kanellakis, F. Bancilhon and R. Ramakrishnan, Bounds on the propagation of selection into logic programs, in:Proc. 6th ACM SIGACT-SIGMOD-SIGART Symp. on Principles of Database Systems (1987) pp. 214–226.

  6. R.W. Haddad and J.F. Naughton, Counting methods for cyclic relations, in:Proc. 7th ACM SIGACT-SIGMOD-SIGART Symp. on Principles of Database Systems (1988) pp. 333–340.

  7. T. Ibaraki and N. Katoh, On-line computation of transitive closure of graphs, Inf. Proc. Lett. 16 (1983) 95–97.

    Google Scholar 

  8. G.F. Italiano, Amortized efficiency of a path retrieval data structure, Theor. Comp. Sci. 48 (1986) 273–281.

    Google Scholar 

  9. G.F. Italiano, Finding paths and deleting edges in directed acyclic graphs, Inf. Proc. Lett. 28 (1988) 5–11.

    Google Scholar 

  10. A. Marchetti-Spaccamela, A. Pelaggi and D. Sacca, Worst-case complexity analysis of methods for logic query implementation, in:Proc. 6th ACM SIGACT-SIGMOD-SIGART Symp. on Principles of Database Systems (1987) pp. 294–301.

  11. S. Naqvi and S. Tsur,A Logical Language for Data and Knowledge Bases (Computer Science Press, Rockville, MD, 1989).

    Google Scholar 

  12. J.F. Naughton, One-sided recursions, in:Proc. 6th ACM SIGACT-SIGMOD-SIGART Symp. on Principles of Database Systems (1987) pp. 340–348.

  13. R.E. Tarjan, Amortized computational complexity, SIAM J. Alg. Discr. Meth. 6 (1985) 307–318.

    Google Scholar 

  14. R.E. Tarjan, Fast algorithms for solving path problems, J. ACM 28 (1981) 594–614.

    Google Scholar 

  15. M. Yannakakis, Graph theoretic methods in database theory, in:Proc. 9th ACM SIGACT-SIGMOD-SIGART Symp. on Principles of Database Systems (1990) pp. 230–242.

Download references

Author information

Authors and Affiliations

Authors

Additional information

Work partially completed while at Brown University. Work at Princeton partially supported by the NSF Center in Discrete Mathematics and Theoretical Computer Science (DIMACS).

Work supported in part by NSF grant IRI-8617344, by an Alfred P. Sloan Foundation Fellowship, and by ONR grant N00014-83-K-0146, ARPA Order No. 4786.

Work supported in part by an NSF Presidential Young Investigator Award with matching funds from IBM, by NSF research grant DCR-8403613, and by ONR grant N00014-83-K-0146, ARPA Order No. 4786.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Buchsbaum, A.L., Kanellakis, P.C. & Vitter, J.S. A data structure for arc insertion and regular path finding. Ann Math Artif Intell 3, 187–210 (1991). https://doi.org/10.1007/BF01530925

Download citation

  • Issue Date:

  • DOI: https://doi.org/10.1007/BF01530925

Keywords

Navigation