Easy problems for tree-decomposable graphs.

*(English)*Zbl 0734.68073Summary: Using a variation of the interpretability concept we show that all graph properties definable in monadic second-order logic (MS properties) with quantification over vertex and edge sets can be decided in linear time for classes of graphs of fixed bounded treewidth given a tree- decomposition. This gives an alternative proof of a recent result by Courcelle. We allow graphs with directed and/or undirected edges, labeled on edges and/or vertices with labels taken from a finite set. We extend MS properties to extended monadic second-order (EMS) problems involving counting or summing evaluations over sets definable in monadic second- order logic. Our technique allows us also to solve some EMS problems in linear time or in polynomial or pseudopolynomial time for classes of graphs of fixed bounded treewidth. Moreover, it is shown that each EMS problem is in NC for graphs of bounded treewidth. Most problems for which linear time algorithms for graphs of bounded treewidth were previously known to exist, and many others, are EMS problems.