Proceedings Article10.1145/191246.191257
An optimal graph traversal algorithm for evaluating linear binary-chain programs
Yangjun Chen,Theo Härder +1 more
- 29 Nov 1994
- pp 34-41
6
TL;DR: A new algorithm is described which requires less time than the algorithm of Grahne et al. and achieves a linear time complexity for both cyclic and non-cyclic data.
read more
Abstract: Grahne et al. have presented a graph algorithm for a subset of recursive queries. This method consists of two phases. In the first phase, the method transforms a linear binary-chain program into a set of equations over expressions containing predicate symbols. In the second phase, a graph is constructed from the equations and the answers are produced by traversing the relevant paths. Here we describe a new algorithm which requires less time than the algorithm of Grahne et al. The key idea of the improvement is to reduce the search space that will be traversed when a query is invoked. Further, we speed up the evaluation of cyclic data by generating most answers directly in terms of the answers already found and the associated “path information” instead of traversing the corresponding paths as usual. In this way, our algorithm achieves a linear time complexity for both cyclic and non-cyclic data.
read more
Chat with Paper
AI Agents for this Paper
Find similar papers on Google Scholar, PubMed and Arxiv
Write a critical review of this paper
Analyze citations of this paper to find unaddressed research gaps
Citations
On the Bottom-Up Evaluation of Recursive Queries
TL;DR: For a large class of programs, an optimal bottom‐up evaluation method for handling both linear and nonlinear recursion is presented by elaborating the iteration process and generating most answers for each cyclic path directly from the intermediate results instead of evaluating them by performing algebraic operations.
Magic sets revisited
TL;DR: This paper distinguishes among three kinds of linear recursions: canonical strongly linear recursion (CSLR), non-interdependent linearRecursion (NILR) and interdependent linear recurstion (ILR), and presents an optimal algorithm for each.
2
Counting and topological order
TL;DR: The concepts ofitage appearance, function anditage selection function are introduced, and an evaluation algorithm based on the computation of such functions in topological order is developed that requires only linear time in the case of non-cyclic data.
1
Graph traversal and top-down evaluation of logic queries
TL;DR: An optimal method to handle cyclic and acyclic data relations in the linear recursive queries is proposed by integrating graph traversal mechanisms into a top-down evaluation that reduces the time consumption for cyclic data by an order of magnitude or more.
References
Depth-First Search and Linear Graph Algorithms
TL;DR: The value of depth-first search or “backtracking” as a technique for solving problems is illustrated by two examples of an improved version of an algorithm for finding the strongly connected components of a directed graph.
6.9K
An amateur's introduction to recursive query processing strategies
François Bancilhon,Raghu Ramakrishnan +1 more
- 15 Jun 1986
TL;DR: In this article, the authors present a survey and comparison of various strategies for processing logic queries in relational databases, focusing on Horn Clauses with evaluable predicates but without function symbols.
Magic sets and other strange ways to implement logic programs (extended abstract)
François Bancilhon,David Maier,Yehoshua Sagiv,Jeffrey D. Ullman +3 more
- 01 Jun 1985
TL;DR: Several methods for implementing database queries expressed as logical rules are given and they are compared for efficiency as mentioned in this paper, and one method, called "magic sets", is a general algorithm for rewriting logical rules so that they may be implemented bottom-UP in a way that cuts down on the irrelevant facts that are generated.
545
On compiling queries in recursive first-order databases
TL;DR: The solution uses resolution-proof techmques over connection graphs to derive a program of relational database operations that gives all the answers to a query and has a welldefined termmatton condiUon.
316
Related Papers (5)
Stefano Ceri,Georg Gottlob,Letizia Tanca +2 more
- 01 Jan 1990
H. Aly,Z.M. Ozsoyoglu +1 more
- 06 Feb 1989