skip to main content
article
Free Access

Shortest path by approximation in logic programs

Published:01 June 1992Publication History
Skip Abstract Section

Abstract

An approximation paradigm is proposed for logic programming as a simple modification to a complete evaluation strategy. The motivational example illustrates how a straigthforward transformation of a declarative specification of the distance between two vertices in a directed graph leads to sophisticated algorithms for computing shortest paths. The goal of the work presented in this paper is not to provide a more efficient computation of shortest paths but to investigate how the intermediate tables, known as extension tables, generated by the complete evaluation strategy might be used in approximation algorithms. We present the ETdistance algorithm in perspective, its execution is compared to those of Dijkstra's single-source and Floyd's all-pairs shortest path algorithms.

References

  1. 1 BANCILHON, F., MAIER, D., SAGIV, Y., AND ULLMAN, J. Magic sets and other strange ways to implement logic programs. In ACM Symposium on Principles of Database Systems (Cambridge, Mass, Mar. 1986), pp. 1-15. Google ScholarGoogle Scholar
  2. 2 BANCILHON, F., AND RAMAKRISHNAN, R. An amateur's introduction to recursive query processing strategies. In ACM Proceedmgs of SIGMOD (Washington, D.C., May 1986) pp. 1-15. Google ScholarGoogle Scholar
  3. 3 BRY, F. Query evaluation in deductive databases: bottom-up and top-down reconciled. In Proceedings of the First international Conference on Deductive and Object-Oriented Databases (Dec. 1989), pp. 25-44.Google ScholarGoogle Scholar
  4. 4 CONSENS, M., AND MENDELZON, A. Low complexity aggregation in graphlog and datalog. In Third International Conference on Database Theory (Paris, Dec. 1990) Springer Verlag, 1990, pp. 379-394. Google ScholarGoogle Scholar
  5. 5 DIETRICH, S.W. Extension tables: memo relations in logic programming. In IEEE Symposium on Logic Programming (1987) pp. 264-272.Google ScholarGoogle Scholar
  6. 6 DIETRICH, S.W. Extension tables for recursive query evaluation. Ph.D. dissertation, Dept. of Computer Science, SUNY at Stony Brook, Dec. 1987. Google ScholarGoogle Scholar
  7. 7 DIETRICH, S. W., AND WARREN, D.S. Dynamic programming strategies for the evaluation of recursive queries. Tech. Rep. 85-31, Dept. of Computer Science, SUNY at Stony Brook, 1985.Google ScholarGoogle Scholar
  8. 8 DIJKSTRA, E.W. A note on two problems in connection with graphs. Numer. Math. 1 (1959), 269-271.Google ScholarGoogle Scholar
  9. 9 FAN, C. Extension table primitives for prolog. Master's thesis, Dept. of Computer Science and Eng., Arizona State Univ., Dec. 1989.Google ScholarGoogle Scholar
  10. 10 FAN, C., AND DIETRICH, S.W. Extension table built-ins for prolog. Softw. Pract. Exper. 22, 7 (July 1992), 573-597. Google ScholarGoogle Scholar
  11. 11 FAN, C., AND DIETRICH, S.W. On the completeness of memoing in linear recursive logic programs. Tech. Rep. 92-005, Dept. of Computer Science and Eng., Arizona State Univ., 1992.Google ScholarGoogle Scholar
  12. 12 FLOYD, R.W. Algorithm 97: shortest path. Commun. ACMo 5, 6 (1962), 345. Google ScholarGoogle Scholar
  13. 13 GANGULY, S., GRECO, S., AND ZANIOLO, C. Minimum and maximum predicates in logic programming. In ACM Symposium on Princtples of Database Systems (Denver, Colo., May 1991) pp. 154-163. Google ScholarGoogle Scholar
  14. 14 GAO, H., AND WARREN, D. S. Declarative picture description and implementation in logic system. Tech. Rep. TR-92-03, Dept. of Computer Science, SUNY at Stony Brook, 1992.Google ScholarGoogle Scholar
  15. 15 LEFEBVRE, A. Towards an efficient evaluation of recursive aggregates in deductive databases. In FGCS Conference (Tokyo, 1992), pp. 915-925.Google ScholarGoogle Scholar
  16. 16 LINDHOLM, T. G., AND O'KEEFE, R.A. Efficient implementation of a defensible semantics for dynamic prolog code. In International Conference on Logic Programming (1987) pp. 21-39.Google ScholarGoogle Scholar
  17. 17 MUMICK, I. S., PIRAHESH, H., AND RAMAKRISHNAN, R. The magic of duplicates and aggregates. In 16th International Conference on Very Large Data Bases (Brisbane, Australia, 1990), pp. 264-277. Google ScholarGoogle Scholar
  18. 18 Ross, K., AND SAGIV, Y. Monotonic aggregation in deductive databases. In ACM Symposium on Principles of Database Systems (San Diego, Calif., 1992), pp. 114-126. Google ScholarGoogle Scholar
  19. 19 STICKEL, M. E. A prolog technology theorem prover. In IEEE Symposium on Logic Programming (1984), pp. 212-219.Google ScholarGoogle Scholar
  20. 20 SUDARSHAN, S., AND RAMAKRISHNAN, R. Aggregation and relevance in deductive databases. In 17th International Conference on Very Large Data Bases (Barcelona, 1991), pp. 501-511. Google ScholarGoogle Scholar
  21. 21 TAMAKI, H., AND SATO, T. OLD resolution with tabulation. In Third International Conference on Logic Programming (1986), pp. 84-98. Google ScholarGoogle Scholar
  22. 22 ULLMAN, J.D. Principles of Database and Knowledge-Base Systems, Volume 2: The New Technologies. Computer Science Press, Rockville, Md., 1989. Google ScholarGoogle Scholar
  23. 23 WARREN, D.S. The XWAM: a machine that integrates prolog and deductive database query evaluation. In Proceedings of the 2nd NACLP Workshop on Logic Programming Architectures and Implementations (Austin, Tex., Nov. 1990), J. W. Mills, Ed., Computer Science Dept., Indiana Univ., Bloomington, pp. 62-91.Google ScholarGoogle Scholar
  24. 24 WARREN, D.S. Memoing for logic programs. Commun. ACM 35, 3 (1992), 94-111. Google ScholarGoogle Scholar

Index Terms

  1. Shortest path by approximation in logic programs

                  Recommendations

                  Comments

                  Login options

                  Check if you have access through your login credentials or your institution to get full access on this article.

                  Sign in

                  Full Access

                  • Published in

                    cover image ACM Letters on Programming Languages and Systems
                    ACM Letters on Programming Languages and Systems  Volume 1, Issue 2
                    June 1992
                    82 pages
                    ISSN:1057-4514
                    EISSN:1557-7384
                    DOI:10.1145/151333
                    Issue’s Table of Contents

                    Copyright © 1992 ACM

                    Publisher

                    Association for Computing Machinery

                    New York, NY, United States

                    Publication History

                    • Published: 1 June 1992
                    Published in loplas Volume 1, Issue 2

                    Permissions

                    Request permissions about this article.

                    Request Permissions

                    Check for updates

                    Qualifiers

                    • article

                  PDF Format

                  View or Download as a PDF file.

                  PDF

                  eReader

                  View online with eReader.

                  eReader
                  About Cookies On This Site

                  We use cookies to ensure that we give you the best experience on our website.

                  Learn more

                  Got it!