# Definability and Descriptive Complexity on Databases of Bounded Tree-Width

## Abstract

We study the expressive power of various query languages on relational databases of bounded tree-width.

Our first theorem says that fixed-point logic with counting captures polynomial time on classes of databases of bounded tree-width. This result should be seen on the background of an important open question of Chandra and Harel [7] asking whether there is a query language capturing polynomial time on unordered databases. Our theorem is a further step in a larger project of extending the scope of databases on which polynomial time can be captured by reasonable query languages.

We then prove a general definability theorem stating that each query on a class of databases of bounded tree-width which is definable in monadic second-order logic is also definable in fixed-point logic (or datalog). Furthermore, for each *k ≥* 1 the class of databases of tree-width at most *k* is definable in fixed-point logic. These results have some remarkable consequences concerning the definability of certain classes of graphs.

Finally, we show that each database of tree-width at most *k* can be characterized up to isomorphism in the language C^{k+3}, the (*k* + 3)-variable fragment of firstorder logic with counting.

## Keywords

Polynomial Time Planar Graph Query Language Database Schema Relation Symbol## Preview

Unable to display preview. Download preview PDF.

## References

- 1.S. Abiteboul and V. Vianu. Fixpoint extensions of first order logic and datalog-like languages. In
*Proceedings of the 4th IEEE Symposium on Logic in Computer Science*, pages 71–79, 1989.Google Scholar - 2.S. Arnborg, D. Corneil, and A. Proskurowski. Complexity of finding embeddings in a k-tree.
*SIAM Journal on Algebraic Discrete Methods*, 8:277–284, 1987.zbMATHMathSciNetCrossRefGoogle Scholar - 3.H.L. Bodländer. NC-algorithms for graphs with small treewidth. In J. van Leeuwen, editor,
*Proceedings of the 14th International Workshop on Graph theoretic Concepts in Computer Science WG’88*, volume 344 of*Lecture Notes in Computer Science*, pages 1–10. Springer-Verlag, 1988.Google Scholar - 4.H.L. Bodländer. Polynomial algorithms for graph isomorphism and chromatic index on partial k-trees.
*Journal of Algorithms*, 11:631–643, 1990.zbMATHCrossRefMathSciNetGoogle Scholar - 5.H.L. Bodländer. Treewidth: Algorithmic techniques and results. In
*Proceedings 22nd International Symposium on Mathematical Foundations of Computer Science, MFCS’97*, volume 1295 of*Lecture Notes in Computer Science*, pages 29–36. Springer-Verlag, 1997.Google Scholar - 6.J. Cai, M. Fürer, and N. Immerman. An optimal lower bound on the number of variables for graph identification.
*Combinatorica*, 12:389–410, 1992.zbMATHCrossRefMathSciNetGoogle Scholar - 7.A. Chandra and D. Harel. Structure and complexity of relational queries.
*Journal of Computer and System Sciences*, 25:99–128, 1982.zbMATHCrossRefGoogle Scholar - 8.B. Courcelle. Graph rewriting: An algebraic and logic approach. In J. van Leeuwen, editor,
*Handbook of Theoretical Computer Science*, volume 2, pages 194–242. Elsevier Science Publishers, 1990.Google Scholar - 9.R. Diestel.
*Graph Theory*. Springer-Verlag, 1997.Google Scholar - 10.T. Feder and M.Y Vardi. Monotone monadic SNP and constraint satisfaction. In
*Proceedings of the 25th ACM Symposium on Theory of Computing*, pages 612–622, 1993.Google Scholar - 11.E. Grädel. On the restraining power of guards, 1998.Google Scholar
- 12.E. Grädel and M. Otto. Inductive definability with counting on finite structures. In E. Börger, G. Jäger, H. Kleine Büning, S. Martini, and M.M. Richter, editors,
*Computer Science Logic, 6th Workshop, CSL '92, San Miniato 1992, Selected Papers*, volume 702 of*Lecture Notes in Computer Science*, pages 231–247. Springer-Verlag, 1993.Google Scholar - 13.M. Grohe. Finite-variable logics in descriptive complexity theory 1998.Google Scholar
- 14.M. Grohe. Fixed-point logics on planar graphs. In
*Proceedings of the 13th IEEE Symposium on Logic in Computer Science*, pages 6–15, 1998.Google Scholar - 15.R. Halin. S-Functions for graphs.
*Journal of Geometry*, 8:171–186, 1976.CrossRefMathSciNetzbMATHGoogle Scholar - 16.N. Immerman. Relational queries computable in polynomial time.
*Information and Control*, 68:86–104, 1986.zbMATHCrossRefMathSciNetGoogle Scholar - 17.N. Immerman. Expressibility as a complexity measure: results and directions. In
*Proceedings of the 2nd IEEE Symposium on Structure in Complexity Theory*, pages 194–202, 1987.Google Scholar - 18.N. Immerman and E. Lander. Describing graphs: A first-order approach to graph canonization. In A. Selman editor,
*Complexity theory retrospective*, pages 59–81. Springer-Verlag, 1990Google Scholar - 19.B. Reed. Tree width and tangles: A new connectivity measure and some applications. In R.A. Bailey editor,
*Surveys in Combinatorics*, volume 241 of*LMS Lecture Note Series*, pages 87–162. Cambridge University Press, 1997.Google Scholar - 20.N. Robertson and P.D. Seymour. Graph minors II. Algorithmic aspects of tree-width.
*Journal of Algorithms*, 7:309–322, 1986.zbMATHCrossRefMathSciNetGoogle Scholar - 21.N. Robertson and P.D. Seymour. Graph minors IV. Tree-width and well-quasi-ordering.
*Journal of Combinatorial Theory, Series B*48:227–254, 1990.zbMATHCrossRefMathSciNetGoogle Scholar - 22.N. Robertson and P.D. Seymour. Graph minors V. Excluding a planar graph.
*Journal of Combinatorial Theory, Series B*, 41:92–114, 1986.zbMATHCrossRefMathSciNetGoogle Scholar - 23.N. Robertson and P.D. Seymour. Graph minors XX. Wagner’s conjecture, 1988. unpublished manuscript.Google Scholar
- 24.M. Y. Vardi. The complexity of relational query languages. In
*Proceedings of the 14th ACM Symposium on Theory of Computing*, pages 137–146, 1982.Google Scholar