Queries on Graphs.
Abstract
In this thesis, we study the complexity, expressive power and query evaluation problem for a query language based on a graph model of data. We develop a query language G based on graph patterns and regular expression in which such queries can be formulated in what we believe is a natural way. As far as expressive power is concerned, we show that G and Datalog are incomparable. It has been shown recently that certain queries that are expressible in G are not expressible in Datalog. These are G queries whose evaluation problem we prove to be NP-complete when complexity is measured in terms of the size of the graph being queried. This, coupled with the fact that all Datalog programs can be evaluated in polynomial time, strongly suggested the above result. Conversely, certain Datalog programs cannot be expressed in G, although we identify a useful class of programs for which there are equivalent queries in G. The fact that it is unlikely that all G queries can be evaluated in polynomial time leads us to study cases in which polynomial time evaluation can be guaranteed. We characterize a class of restricted regular expression, both in terms of the languages such expressions denote and the automata recognizing these languages, for which query evaluation can be performed in polynomial time. These results are generalized to take into account any constraints on the cyclic structure of the graph being queried. We show that, if the regular expressions in queries and the cycles in graphs satisfy a compatibility requirement, then such queries can also be evaluated in polynomial time. During the course of our investigation, we develop a number of query evaluation algorithms for various classes of G queries, such as edge queries and path queries. We also explore how properties of restricted classes of graphs, such as acyclic graphs, can be utilized to improve the efficiency of query evaluation. For equivalent G queries and Datalog programs, we show that our path query evaluation algorithm compares favourably with the best-known Datalog algorithms for various classes of programs. (Abstract shortened with permission of author.).
- Publication:
-
Ph.D. Thesis
- Pub Date:
- November 1989
- Bibcode:
- 1989PhDT........67W
- Keywords:
-
- Physics: Acoustics