MSOL-Definability Equals Recognizability for Halin Graphs and Bounded Degree k-Outerplanar Graphs1footnote 11footnote 1The research of the second author was partially funded by the Networks programme, funded by the Dutch Ministry of Education, Culture and Science through the Netherlands Organisation for Scientific Research.

MSOL-Definability Equals Recognizability for Halin Graphs and Bounded Degree -Outerplanar Graphs111The research of the second author was partially funded by the Networks programme, funded by the Dutch Ministry of Education, Culture and Science through the Netherlands Organisation for Scientific Research.

Lars Jaffke222Department of Information and Computing Sciences, Utrecht University, P.O. Box 80.089, 3508 TB Utrecht, The Netherlands. Email: l.jaffke@students.uu.nl    Hans L. Bodlaender333Department of Information and Computing Sciences, Utrecht University, P.O. Box 80.089, 3508 TB Utrecht, The Netherlands. Department of Mathematics and Computer Science, University of Technology Eindhoven, P.O. Box 513, 5600 MB Eindhoven, The Netherlands. Email: h.l.bodlaender@uu.nl
Abstract

One of the most famous algorithmic meta-theorems states that every graph property that can be defined by a sentence in counting monadic second order logic (CMSOL) can be checked in linear time for graphs of bounded treewidth, which is known as Courcelle’s Theorem [8]. These algorithms are constructed as finite state tree automata, and hence every CMSOL-definable graph property is recognizable. Courcelle also conjectured that the converse holds, i.e. every recognizable graph property is definable in CMSOL for graphs of bounded treewidth. We prove this conjecture for a number of special cases in a stronger form. That is, we show that each recognizable property is definable in MSOL, i.e. the counting operation is not needed in our expressions. We give proofs for Halin graphs, bounded degree -outerplanar graphs and some related graph classes. We furthermore show that the conjecture holds for any graph class that admits tree decompositions that can be defined in MSOL, thus providing a useful tool for future proofs.

1 Introduction

In a seminal paper from 1976, Rudolf Halin (1934-2014), lay the ground work for the notion of tree decompositions of graphs [13], which later was studied deeply in the proof of the famous Graph Minor Theorem by Robertson and Seymour [19] and ever since became one of the most important tools for the design of FPT-algorithms for NP-hard problems on graphs. He was also the first one to extensively study the class of planar graphs constructed by a tree and adding a cycle through all its leaves, now known as Halin graphs [12].

Another seminal result is Courcelle’s Theorem [8], which states that for every graph property that can be formulated in a language called counting monadic second order logic (CMSOL), and each fixed , there is a linear time algorithm that decides for a graph given a tree decomposition of width at most (while similar results were discovered by Arnborg et al. [2] and Borie et al. [6]). Counting monadic second order logic generalizes monadic second order logic (MSOL) with a collection of predicates testing the size of sets modulo constants. Courcelle showed that this makes the logic strictly more powerful [8], which can be seen in the following example.

Example 1

Let denote the property that a graph has an even number of vertices. Then is trivially definable in CMSOL, but it is not in MSOL.

The algorithms constructed in Courcelle’s proof have the shape of a finite state tree automaton and hence we can say that CMSOL-definable graph properties are recognizable (or, equivalently, regular or finite-state). Courcelle’s Theorem generalizes one direction of a classic result in automata theory by Büchi, which states that a language is recognizable, if and only if it is MSOL-definable [7]. Courcelle conjectured in 1990 that the other direction of Büchi’s result can also be generalized for graphs of bounded treewidth in CMSOL, i.e. that each recognizable graph property is CMSOL-definable.

This conjecture is still regarded to be open. Its claimed resolution by Lapoire [16] is not considered to be valid by several experts. In the course of time proofs were given for the classes of trees and forests [8], partial 2-trees [9], partial 3-trees and -connected partial -trees [15]. A sketch of a proof for graphs of pathwidth at most appeared at ICALP 1997 [14]. Very recently, one of the authors proved, in collaboration with Heggernes and Telle, that Courcelle’s Conjecture holds for partial -trees without chordless cycles of length at least [5].

In this paper we give self-contained proofs for Halin graphs, -outerplanar graphs of bounded degree, a subclass of -outerplanar graphs (of unbounded degree) and some classes related to feedback edge and/or vertex sets of bounded size w.r.t. a spanning tree in the graph. In all of these cases we show a somewhat stronger result, as we restrict ourselves to MSOL-definability, thus avoiding the above mentioned counting predicate. Since Halin graphs have treewidth 3 [21], Kaller’s result implies that recognizable properties are CMSOL-definable in this case [15]. We strengthen this result to MSOL-definability.

Additionally, we show that Courcelle’s Conjecture holds in our stronger sense for each graph class that admits certain types of MSOL-definable tree decompositions. We believe that this technique provides a useful tool towards its resolution — if not for all graph classes, then at least for a significant number of special cases.

In our proofs, we use another classic result in automata theory, the Myhill-Nerode Theory [17][18]. It states that a language is recognizable if and only if there exists an equivalence relation , describing , that has a finite number of equivalence classes (i.e. has finite index). Abrahamson and Fellows [1] noted that the Myhill-Nerode Theorem can also be generalized to graphs of bounded treewidth (see also [11, Theorem 12.7.2]): Each graph property is recognizable if and only if there exists an equivalence relation of finite index, describing , defined over terminal graphs with a bounded number of terminal vertices. This result was recently generalized to hypergraphs [3].

The general outline of our proofs can be described as follows. Given a graph property , we assume the existence of an equivalence relation of finite index. We then show that, given a tree decomposition of bounded width, we can derive the equivalence classes of terminal subgraphs w.r.t. its nodes from the equivalence classes of their children. Once we reach the root of the tree decomposition we can decide whether a graph has property by the equivalence class its terminal subgraph is contained in. We then show that this construction is MSOL-definable.

The rest of the paper is organized as follows. In Section 2, we give the basic definitions and explain all concepts that we use in more detail. In Section 3 we prove some technical results regarding equivalence classes w.r.t. nodes in tree decompositions. The main results are presented in Sections 4 and 5, where we prove Courcelle’s Conjecture for Halin graphs and other graph classes, such as bounded degree -outerplanar graphs. We give some concluding remarks in Section 6.

2 Preliminaries

Graphs and Tree Decompositions

We begin by giving the basic definitions of the graph classes and some related concepts used throughout the paper.

Definition 1 ((Planar) Embedding)

A drawing of a graph in the plane is called an embedding. If no pair of edges in this drawing crosses, then it is called planar.

Definition 2 (Halin Graph)

A graph is called a Halin graph, if it can be formed by a planar embedding of a tree, none of whose vertices has degree two, and a cycle that connects all leaves of the tree such that the embedding stays planar.

Definition 3 (-Outerplanar Graph)

Let be a graph. is called a planar graph, if there exists a planar embedding of .

An embedding of a graph is -outerplanar, if it is planar, and all vertices lie on the exterior face. For , an embedding of a graph is -outerplanar, if it is planar, and when all vertices on the outer face are deleted, then one obtains a -outerplanar embedding of the resulting graph. If admits a -outerplanar embedding, then it is called a -outerplanar graph.

One can immediately establish a connection between the two graph classes.

Proposition 1

Halin graphs are 2-outerplanar graphs.

The following definition will play a central role in many of the proofs of Sections 4 and 5.

Definition 4 (Fundamental Cycle)

Let be a graph with maximal spanning forest . Given an edge , , its fundamental cycle is a cycle that is formed by the unique path from to in together with the edge .

We now turn to the notion of tree decompositions and some related concepts.

Definition 5 (Tree Decomposition, Treewidth)

A tree decomposition of a graph is a pair of a tree and an indexed family of vertex sets (called bags), such that the following properties hold.

  1. Each vertex is contained in at least one bag.

  2. For each edge there exists a bag containing both endpoints.

  3. For each vertex , the bags in the tree decomposition that contain form a subtree of .

The width of a tree decomposition is the size of the largest bag minus 1 and the treewidth of a graph is the minimum width of all its tree decompositions.

To avoid confusion, in the following we will refer to elements of as nodes and elements of as vertices. Sometimes, to shorten the notation, we might not differ between the terms node and bag in a tree decomposition.

Definition 6 (Node Types)

We distinguish three types of nodes in a tree decomposition , listed below.

  1. The nodes corresponding to leaves in are called Leaf nodes.

  2. If a node has exactly one child it is called an Intermediate node.

  3. If a node has more than one child it is called a Branch node.

As we will typically speak of some direction between nodes in tree decompositions, such as a parent-child relation, we define the following.

Definition 7 (Rooted and Ordered Tree Decomposition)

Consider a tree decomposition . We call rooted, if there is one distinguished node , called the root of , inducing a parent-child relation on all edges in . If there exists a fixed ordering on all bags sharing the same parent node, then is called ordered.

We now introduce terminal graphs, over which we will later define equivalence relations for graph properties.

Definition 8 (Terminal Graph)

A terminal graph is a graph with vertex set , edge set and an ordered terminal set .

Terminal graphs of special interest in the rest of this paper are terminal subgraphs w.r.t. bags in a tree decomposition. We require the notion of partial terminal subgraphs in the proofs of Sections 3 and 5.1.

Definition 9 ((Partial) Terminal Subgraph)

Let be a rooted (and ordered) tree decomposition of a graph with bags and , , such that is the parent node of . The graphs defined below are induced subgraphs of given the respective vertex sets.

  1. A terminal subgraph of a bag , denoted by , is a terminal graph induced by the vertices in and all its descendants, with the set as its terminals.

  2. A partial terminal subgraph of given a child , denoted by is the terminal graph induced by and the vertices and edges of all terminal subgraphs of the children of that are left siblings of , with terminal set .

The ordering in each terminal set of the above mentioned terminal graphs can be arbitrary, but fixed.

For an illustration of Definition 9, see Figure (a)a, where and .

Equivalence Relations

Definition 10 (Gluing via )

Let and be two terminal graphs with . The graph is obtained by taking the disjoint union of and and for each , , identifying the -th vertex in with the -th vertex in .

Note that if an edge is included both in and in , we drop one of the edges in , i.e. we do not have parallel edges in the graph.

We use the operator to define equivalence relations over terminal graphs. Throughout the paper we will restrict ourselves to terminal graphs of fixed boundary size (i.e. the maximum size of terminal sets is bounded by some constant), since we focus on equivalence relations with a finite number of equivalence classes. These, in general, do not exist for classes of terminal graphs with arbitrary boundary size (see [1]).

Definition 11 (Equivalence Relation over Terminal Graphs)

Let denote a graph property. denotes an equivalence relation over terminal graphs, describing , defined as follows. Let , and be terminal graphs with fixed boundary size. Then we have:

This yields notions of equivalence classes and finite index in the ordinary way. We might drop the index in case it is clear from the context.

We illustrate Definition 11 with an example.

Example 2

Let denote the property that a graph has a Hamiltonian cycle. Let and be two terminal graphs with terminal sets and , respectively (where ). We say that and are equivalent w.r.t. , if for all terminal graphs (with terminal set , ), the graph contains a Hamiltonian cycle if and only if contains a Hamiltonian cycle. A simple case when this hols is when both and contain a Hamiltonian path such that their terminal sets consist of the two endpoints of the path.

As mentioned earlier, our ideas are based on the Myhill-Nerode Theory for graphs of bounded treewidth. The following theorem formally states this result.

Theorem 2.1 (Myhill-Nerode Theorem for Graphs of Treewidth )

Let denote a graph property. Then the following are equivalent for any fixed .

  1. is recognizable for graphs of treewidth at most .

  2. There exists an equivalence relation , describing , of finite index.

By the proof of this theorem (see, e.g., [11, Theorem 12.7.2]) we know that we can identify some equivalence classes of with accepting states in the automaton given in 1. Let denote such an (’accepting’) equivalence class and a terminal graph. Then we know that the graph has property . We will use this fact in the proofs of Sections 4.3 and 5.1.

MSOL-Definability

We now define monadic second order logic over graphs. All variables that we use in our expressions are either single vertices/edges or vertex/edge sets. Atomic predicates are logical statements with the least number of variables, e.g. the vertex membership ’’. Higher-order predicates can be formed by joining predicates via negation , conjunction , disjunction , implication and equivalence together with the existential quantifier and the universal quantifier . A predicate without free variables, i.e. variables that are not in the scope of some quantifier, is called a sentence. A graph property is called MSOL-definable if we can express it with an MSOL-sentence.

A central concept used in this paper is an implicit representation of a tree decomposition in monadic second order logic, as we cannot refer to bags and edges in a tree decomposition as variables in MSOL directly. Hence, we most importantly require two types of predicates. The first one will allow us to verify whether a vertex is contained in some bag and whether any vertex set in the graph constitutes a bag in its tree decomposition. In our definition, each bag will be associated with either a vertex or an edge in the underlying graph together with some type, whose definition depends on the actual graph class under consideration. The second one allows for identifying edges in the tree decomposition, i.e. for any two vertex sets and , this predicate will be true if and only if both and are bags in the tree decomposition and is the bag corresponding to the parent node of .

While all MSOL-definable tree decompositions have to be rooted, not all of them have to be ordered. In some cases, however, an ordering on nodes with the same parent is another prerequisite, which also has to be verifiable with an MSOL-predicate.

Definition 12 (MSOL-definable tree decomposition)

A rooted (and ordered) tree decomposition of a graph is called MSOL-definable, if the following hold.

  1. Each bag in the tree decomposition can be identified by one of the following predicates (where and are constants).

    1. : The bag is associated with type and the vertex , where .

    2. : The bag is associated with type and the edge , where .

    Furthermore there exists at least one type that contains the corresponding vertex or both endpoints of the corresponding edge.

  2. There exists a predicate to identify edges in , which is true, if and only if is the parent bag of .

We call an MSOL-definable tree decomposition ordered, if the following holds.

  1. There exists a predicate , which is true if and only if and are siblings such that is the direct left sibling of .

3 Constructing Equivalence Classes

The current section contains a number of technical results related to equivalence classes of (partial) terminal subgraphs of bags in a tree decomposition. In particular, we will show how to derive the equivalence classes of (partial) terminal subgraphs of bags in a tree decomposition from the equivalence classes of some (partial) terminal subgraphs of child/sibling bags. Hence we prove that these equivalence classes are related to each other in the same way as states in some finite automaton via its transition function, which will be of vital importance in the proofs of Sections 4.3 and 5.1.

In the following, unless stated otherwise, we assume that our tree decomposition is rooted and ordered. First, we consider branch nodes. We begin by defining an operator, which can be seen as an extension of the -operator.

Definition 13 (Gluing via )

Let be a branch bag in a tree decomposition with child and let and denote the partial terminal subgraph of given and the terminal subgraph of , respectively. The operation is defined as:

Note that again, we drop parallel edges, if they occur.

(a) The respective terminal graphs
(b) Splitting
Figure 1: Branch node in a tree decomposition

Consider the situation depicted in Figure 1 and suppose that we know the equivalence class for the graph , i.e. the partial terminal subgraph of given , and the equivalence class for graph , the terminal subgraph of . We want to derive the equivalence class of the partial terminal subgraph of given the right sibling of (which is the terminal graph ).

We will prove that the equivalence class of only depends on the equivalence class of and by explaining how we can create a terminal graph in this class from any pair of graphs , with and . Note that since we are only interested in determining whether the underlying graph of the tree decomposition, say , has property , it is sufficient to only consider terminal graphs in the equivalence classes of and that have the same terminal sets as and . These classes contain any number of (terminal) graphs, which are (also up to isomorphism) completely unrelated to and hence can be disregarded. The following lemma formalizes the above discussion.

Lemma 1

Let be a branch bag in a tree decomposition and one of its child bags. Let , and and two terminal graphs. If , , and , then .

Proof

We first define an operator that allows us to rewrite .

Definition 14 (Gluing via )

Let be a (terminal) graph and an ordered set of vertices. The operation is defined as:

That is, we take the (not necessarily disjoint) union of and the vertices in and let be the terminal set of the resulting terminal graph.

Note that can either be used to make a graph a terminal graph, or to equip a terminal graph with a new terminal set. One easily observes the following.

Proposition 2

Let and be two terminal graphs as in Lemma 1. Then,

(1)

This process of rewriting can be illustrated as shown in Figure (b)b. Instead of computing directly, we split the edge between the bags and , creating a new bag in between the edge, where . Then we extend to a terminal graph with terminal set by using the -operator. Denote this graph by . Since has terminal set , we can apply to and , such that all vertices that are identified in the operation are equal. This results in the graph consisting of all vertices and edges in both and . Eventually, we apply to the resulting graph again to make it a terminal graph with terminal set .

We will lead the proof of Lemma 1 in two steps: First we show that we can construct graphs equivalent to by members of the equivalence classes of and , if and have the same terminal set (Part (a) of Equation 1, where denotes the terminal graph ). In the second step, we show that we can construct graphs equivalent to from members of the equivalence class for any terminal set (Part (b) of Equation 1).

We now proceed with the formal proofs.

Figure 2: Terminal graphs and as in the proof of Proposition 3. The dashed lines indicate, which vertices are being identified in the corresponding -operation.
Proposition 3

Let and be two terminal graphs with . Let and be two terminal graphs with , , and . Then,

Proof

By Figure 2 we can observe the following.

Regardless of the order in which we apply the operators, both graphs will have the same vertex and edge sets. As for the identifying step (using the -operator), one can see that for all we have that the -th vertex in is identified with the -th vertex in in the left-hand side of the equation and with the -th vertex in in the right-hand side. The equality still holds, since . We use this argument (and the fact that ) to show the following.

Hence, our claim follows. ∎

Figure 3: Terminal graphs and , and a terminal set . The dashed lines indicate, which vertices are being identified in the corresponding -operation.
Lemma 2

Let be terminal graphs with , and an ordered vertex set. Then, .

Proof

By Figure 3, one can derive a similar argument as in the proof of Proposition 3. Note that (otherwise, is not defined) and let , i.e. the graph obtained by identifying each -th vertex in with each -th vertex in , where . Then,

In the left-hand side, we first extend the terminal graph to have terminal set and then glue the resulting graph to . Thus the -th vertex in is identified with the -th vertex in , . The same vertices are being identified in the first step in computing the right-hand side, which is constructing the graph . We then extend this graph to have terminal set and glue it to the graph . Since again, in both of the computations the same vertices get identified and both graphs have equal vertex and edge sets, we see that our claim holds. We use this argument (and the fact that ) to conclude our proof as follows.

This concludes our proof of Lemma 1. ∎

The methods used in this proof also allow us to handle intermediate nodes in a tree decomposition. For an illustration see Figure (a)a. Lemma 2 suffices as an argument that we can derive the equivalence class of from graphs equivalent to .

Next, we generalize the situation of Lemma 1, where we were dealing with two child nodes of a branch bag, to handle any constant number of children at a time (see Figure (b)b). We will apply this result to tree decompositions that are not ordered but instead have bounded degree.

(a) Intermediate node, where .
(b) Bounded degree branch node. Note that .
Figure 4: Intermediate and bounded degree branch node in a tree decomposition.
Lemma 3

Let be a branch bag in a tree decomposition with a constant number of child bags . Let ,…, . If and , then

Proof

Let and be the two terminal graphs as indicated below.

Since , we know by Lemma 2, that . Let , then we have that . Now, by Lemma 1, we know that and hence:

We can apply this argument repeatedly and our claim follows. Note that the child bags do not need a specific ordering, as in this context the operation is commutative (all graphs, which it is applied to, have terminal set ). ∎

4 Halin Graphs

This section is devoted to proving our first main result, which is that MSOL-definability equals recognizability for the class of Halin graphs. As outlined before, we will prove that finite index implies MSOL-definability. In a first step, we will show that we can define a certain orientation on the edges of a Halin graph together with an ordering on edges with the same head vertex in monadic second order logic (Section 4.1), which we then will use to construct MSOL-definable tree decompositions of Halin graphs (Section 4.2). We conclude the proof in Section 4.3.

In many of the proofs of MSOL-definability of graph (or tree decomposition) properties, we use other graph properties that have been shown to be MSOL-definable before, and refer for more precise expressions to the appendix.

4.1 Edge Orientation and Ordering

In the following we will develop an orientation on the edges of a Halin graph, together with an ordering on edges with the head vertex, which is MSOL-definable. Our goal is that in this orientation, the edges that form the cycle connecting the leaves is a directed cycle and the tree of the Halin graph forms a directed tree with some arbitrary root on the outer cycle.

Lemma 4 (Cf. [10], Lemma 4.8 in [15])

Let be a graph of treewidth . Any orientation on its edges using predicates and is MSOL-definable.

Proof

Since has treewidth , we know that it admits a -coloring on its vertices. We assume we are given such a coloring and denote the color set by . Now let be a set of edges of and an edge in the graph. We know that and thus we either have or . We let the edge be directed from to , if

  1. and , or

  2. and

and otherwise from to . Thus we can choose any orientation of the edge set of by choosing the corresponding set . Assuming that uses predicates and as shown in Appendix A.1, we can define our sentence as

Lemma 5

Let be a Halin graph. The orientation on the edge set of such that its spanning tree forms a rooted directed tree and the outer cycle is a directed cycle, is MSOL-definable.

Proof

Since Halin graphs have treewidth 3, we can use Lemma 4. Let denote the edges in the spanning tree and the edges on the outer cycle. The orientation stated above can be defined in MSOL as

The MSOL-predicates given in Appendix A.1 complete the proof. ∎

Next, we define an ordering on all edges with the same head vertex in a Halin graph, which we can define in monadic second order logic using the orientation of the edges given above and its fundamental cycles. This is a central step in our proof, as it allows us to avoid using the counting predicate in the construction of our tree decomposition. The main idea in the proof of Lemma 6 is that we can order the child edges of a vertex in the order in which their leaf descendants appear on the outer cycle.

Lemma 6

For any vertex in a Halin graph there exists an ordering on its child edges that is MSOL-definable.

Proof
Figure 5: Example of a Halin graph with edge orientation.

Let be a Halin graph with an orientation on its edges as shown in Lemma 5, its edges of the spanning tree, the edges of the outer cycle and the root of the tree . Now, consider an inner vertex (a non-leaf vertex w.r.t. the tree) and two child edges and of (with ). Every edge of a Halin graph is contained in exactly two fundamental cycles. Assume we have an ordering on the child edges of and is the right neighbor of . We denote the edges in , whose fundamental cycles contain and by , , and , such that and ( and ) are contained in the left (right) fundamental cycles of and , respectively. (See Figure 5 for an example.)

Now consider directed paths in from to the tail vertices of the above mentioned edges. If is on the right-hand side of , then the path from to the tail of is always the shortest of the four. The MSOL-predicates given in Appendix A.2 define such an ordering . ∎

4.2 MSOL-Definable Tree Decompositions

In this section we will describe how to construct a width-3 tree decomposition of a Halin graph that is definable in monadic second order logic.

First we introduce the notion of left and right boundary vertices of a Halin graph with an edge orientation and ordering as described in the previous section.

Definition 15 (Left and Right Boundary Vertex)

Given a vertex of a Halin graph , a vertex is called its left boundary vertex, denoted by if there exists a (possibly empty) path from to in , such that the tail vertex of each edge in is the leftmost child of its parent. Similarly, we define a right boundary vertex . The boundary of a vertex is the set containing both its left and right boundary vertex, denoted as .

Note that for all cycle vertices , we have . We now state the main result of this section.

(a) Structural overview of a Halin graph.
(b) The component created for each edge.
Figure 6: Constructing a component of a tree decomposition for an edge of a Halin graph.
Lemma 7

Halin graphs admit width-3 MSOL-definable tree decompositions.

Proof

Let be a Halin graph and suppose we have an orientation and ordering on its edges as described in Section 4.1. That is, we have a partition of such that forms the (directed) outer cycle and the (directed) tree of and there is an ordering on edges with the same head vertex in .

For each edge we construct a component in the tree decomposition that covers the edge itself and one edge on the outer cycle. A component for an edge , where is the parent of in covers the edges and the edge on , whose fundamental cycle both contains and (see Figure (a)a for an illustration). For the former we create a branch of bags of types and and for the latter bags of types and , joined by a bag of type , containing the following vertices.
R1. This bag contains the vertex and its boundary vertices .
R2. This bag contains the vertices and and the vertices .
R3. This bag forgets the vertex and thus contains and .
L1. This bag contains the vertices and .
L2. This bag introduces the vertex to all vertices in the bag .
L3. This bag forgets the vertex and thus contains and .
LR. This bag contains the union of and , and hence contains the vertices and .
Figure (b)b illustrates the structure of the component described above.

To continue the construction, we note that removing from the bag of type results in a bag of type for the right neighbor edge, if such an edge exists. If is the rightmost child of , then removing results in a bag of type for the edge between and its parent in . This way we can glue together components of edges using the orientation and ordering of the edge set of the graph. Note that if is the leftmost child of , then it is sufficient to only create bags of types and , since we do not have to cover an edge on the outer cycle.

Once we reach the root (i.e. is the root vertex of the graph), we only create the bags of type and and our construction is complete.

One can verify that this construction yields a tree decomposition of and since the maximum number of vertices in one bag is four, its width is indeed three.

To show that these tree decompositions are MSOL-definable, we note that we can define each bag type in MSOL in a straightforward way, once we defined a predicate for boundary vertices. The predicate requires that there are no two bags in the tree decomposition that contain the same vertex set and so we contract all edges between bags with the same vertex set.

The MSOL-predicates given in Appendix A.3 complete the proof. ∎

From the construction given in this proof, we can immediately derive a consequence that will be useful in the proof of Section 4.3.

Corollary 1

Halin graphs admit binary width-3 MSOL-definable tree decompositions such that all their leaf bags have size one.

Proof

It is easy to see by the construction given in the proof of Lemma 7 that this tree decomposition is binary. All leaf bags are of type and are associated with edges whose tail vertex is a vertex on the outer cycle. Hence, and our claim follows. ∎

We will illustrate the construction of a tree decomposition given in the proof of Lemma 7 with the following example.

Example 3
(a) An example Halin graph.
(b) The component of the tree decomposition corresponding to the denoted edges.
Figure 7: An example subtree of a tree decomposition of a Halin graph.

Consider the graph depicted in Figure (a)a. We are going to show how to create the component of its tree decomposition corresponding to the edges , and .

  • : Since the vertex does not have a left sibling, we only create bags , and . Note that , since , and we do not have a bag of type .

  • : Since is a leaf vertex we have that and so the right path starts with a bag . For the same reason we have that the bags and are equal and we contract the edge. For the left path this has the effect that and are equal, so the edge between them gets contracted as well.

  • : This component can be constructed in a straightforward manner. The bag is the parent of the bag w.r.t.  and is the parent of w.r.t. . Since in both cases the vertex sets are equal, we also contract these edges.

Figure (b)b shows the resulting part of the tree decomposition.

4.3 Finite Index Implies MSOL-Definability

In this section we complete the proof of our first main result, stated below. We will also use ideas that we give here first for extending our results to other graph classes, see Section 5.

Lemma 8

Finite index implies MSOL-definability for Halin graphs.

Proof

By Lemma 7 we know that Halin graphs admit MSOL-definable tree decompositions of bounded width and thus what is left to show is that we can define the equivalence class membership of terminal subgraphs w.r.t. its bags in monadic second order logic.

We know that the graph property has finite index, so in the following we will denote the equivalence classes of by . By Lemmas 1 and 3 we know that we can derive the equivalence class of a terminal subgraph w.r.t. a node by the equivalence class(es) of terminal subgraphs w.r.t. its descendant nodes in the tree decomposition. Hence, we can conclude that the following two functions exist, also taking into account that our tree decomposition is binary (Corollary 1).

Proposition 4

There exist two functions and , such that:

  1. If is an intermediate bag in a tree decomposition with child bag and , then .

  2. If is a branch bag with child bags and , and , then .

Roughly speaking, these functions can be seen as a representation of the transition function of an automaton that we are given in the original formulation of the conjecture (cf. Theorem 2.1).

Next, we mimic the proof of Büchi’s famous classic result for words over an alphabet [7], as shown in [20, Theorem 3.1]. For each equivalence class we define sets for each type (see the proof of Lemma 7) and equivalence class . An edge is contained in set , if and only if the terminal subgraph rooted at a bag of type w.r.t. the edge is in equivalence class .

Our MSOL-sentence consists of three parts. First, we identify the equivalence classes corresponding to leaf nodes of the tree decomposition, and we will denote this predicate as . This is rather trivial, since we know that all leaf bags contain exactly one vertex (Corollary 1) and there is one unique equivalence class to which they all belong, in the following denoted by . Note that these bags are always of type .

Second, we derive the equivalence class membership for terminal subgraphs using Proposition 4, assuming we already determined the equivalence class to which the terminal subgraphs w.r.t. its descendants belong. We denote this predicate by .

Lastly, we check if the graph corresponding to the terminal subgraph of the root bag of the tree decomposition is in an equivalence class satisfying , which we denote by . We know that we can identify these equivalence classes by (the discussion given after) Theorem 2.1 and will denote them by .

Our MSOL-sentence then combines to:

(2)

Sentence 2 together with the details for the subsentences given in Appendix A.4 complete the proof. ∎

Combining Lemma 8 with Theorem 2.1 and [8], we directly obtain the following.

Theorem 4.1

MSOL-definability equals recognizability for Halin graphs.

5 Extensions

The methods we used in the proofs of Section 4 can be generalized and applied to a number of other graph classes, some of which we are going to discuss in this section. The main results are presented in Sections 5.1 and 5.4. In the former we show that MSOL-definability equals recognizability for any graph class that admits either a bounded degree or an ordered MSOL-definable tree decomposition and in the latter we give the proof for bounded degree -outerplanar graphs. Furthermore we study another subclass of -outerplanar graphs in Section 5.2 and graphs that can be constructed with bounded size feedback edge and vertex sets in Section 5.3.

5.1 MSOL-Definable Tree Decompositions

We will now turn to generalizing the proof for Halin graphs to any graph class that admits MSOL-definable tree decompositions that are either ordered or have bounded degree. The proof works analogously as the proof of Lemma 8. This result will give us a useful tool to prove Courcelle’s Conjecture for a number of graph classes, since it will follow immediately from the construction of MSOL-definable tree decompositions.

Lemma 9

Finite index implies MSOL-definability for each graph class that admits MSOL-definable ordered tree decompositions of bounded width.

Proof

It is easy to see that the predicate can be defined in the same way as in the proof of Lemma 8, only adding a short case analysis, since we do not necessarily know of which type the root bag is. Since leaf bags might not necessarily always have size one, we apply a small change to the tree decomposition. Assume that its width is and that we have a -coloring on the vertices of the graph, such that each vertex in a bag has a different color. Then, for each leaf bag of size greater than one, we add one child bag containing only the vertex with the lowest numbered color. This bag will be identified by a newly introduced type and associated with the same vertex/edge as its parent. We modify the Bag- and Parent-predicates accordingly and can define in the same way as in Lemma 8, again including a case analysis as for the -predicate.

Hence, in the following we only need to show how to define to prove the claim. Again assume that the equivalence classes of are denoted by . We can use the function defined in Proposition 4 to describe the relations between the equivalence classes for intermediate nodes. We need another function to handle partial terminal subgraphs w.r.t. a branch node, whose existence is guaranteed by Lemma 1.

Proposition 5

There exists a function , such that the following holds. If is a branch bag with child bag , and , then:

  1. If is the rightmost child of , then .

  2. Otherwise , where .

In the following, let and . We define a number of sets, each one associated with an equivalence class , containing either vertices or edges in the graph (as indicated by their upper indices), and . If a vertex is contained in the set this means that the terminal subgraph rooted at the bag for vertex of type is in equivalence class . is the edge set analogous to . These sets can be used to define the equivalence class membership of terminal subgraphs rooted at intermediate nodes.

Now let be a bag in the tree decomposition with child , such that the node containing is an intermediate node. We have to distinguish four cases when deriving the membership of a vertex/an edge in the respective sets, which are:

  1. Both and correspond to a vertex.

  2. Both and correspond to an edge.

  3. corresponds to a vertex and to an edge.

  4. corresponds to an edge and to a vertex.

The predicates defining these cases for intermediate nodes are given in Appendix A.5.1.

When considering a branch node and the partial terminal subgraphs associated with it, we have to analyze at most eight such cases. We first turn to the definition of sets representing the equivalence class membership of a partial terminal subgraph rooted at a branch bag w.r.t. one of its children. Assume that a bag is of type for vertex and one of its child bags is of type for the vertex . Let and be sets of vertices. We express that the partial terminal subgraph rooted at the bag of type for vertex w.r.t. the bag of type for vertex is in equivalence class by having and . We define edge sets and with the same interpretation. The predicates for branch nodes can be found in Appendix A.5.2, which complete the proof. ∎

If we are given an MSOL-definable tree decomposition that does not have an ordering on the children of branch nodes, but instead we know that each branch node has a constant number of children, we can prove a similar result.

Lemma 10

Finite index implies MSOL-definability for each graph class that admits bounded degree MSOL-definable tree decompositions of bounded width.

Proof

Since this proof works almost exactly as the proof of Lemma 9, we only state the differences. Let denote the maximum degree of a (branch) node in the tree decomposition and again we refer to the equivalence classes of as . Using Lemma 3 we know that the following holds (generalizing Proposition 42).

Proposition 6

There exists a function , such that if is a branch bag in a tree decomposition with child bags (where ), and each terminal subgraph is in equivalence class , then the terminal subgraph is in equivalence class .

Again, to define our predicate we use vertex sets to represent equivalence class membership of a terminal subgraph rooted at a vertex bag of type and edge sets for edge bags of type (and equivalence class ). We show how to define a predicate for branch bags in such tree decompositions in Appendix A.5.3 and our claim follows. ∎

Combining Lemmas 9 and 10 with Theorem 2.1 and [8], we obtain the following.

Theorem 5.1

MSOL-definability equals recognizability for graph classes that admit ordered or bounded degree MSOL-definable tree decompositions of width at most .

5.2 -Cycle Trees

In this section we consider graph class which can be seen as a slight generalization of Halin graphs.

Definition 16 (-cycle trees)

A graph is called cycle tree, if it is a planar graph that can be obtained by a planar embedding of a tree with one distinguished vertex , called the central vertex, such that all vertices of distance from are connected by a cycle. If each vertex (except for ) is contained in one cycle, the number of which is , then is called a -cycle tree. We will refer to the cycle of distance from as the cycle .

(a) without edge orientation
(b) with edge orientation
Figure 8: An example 2-cycle tree with central vertex .

Figure (a)a shows an example of a -cycle tree. We easily observe the following.

Proposition 7

Each -cycle tree is -outerplanar.

Lemma 11

Any edge orientation using predicates and is MSOL-definable for -outerplanar graphs .

Proof

This follows immediately from Lemma 4 and the fact that -outerplanar graphs have treewidth at most [4, Theorem 83]. ∎

To prove our result for -cycle trees, we need the notion of the -th left and right boundary of a vertex, referring to vertices on the -th cycle of the graph.

Definition 17 (-th boundary vertex)

Given a vertex , we say that is its -th left boundary vertex, denoted by , if lies on and there exists a path from to , only using edges of the tree of the graph, such that no other path from to any vertex on exists that uses an edge that lies on the left of one of the edges in . Similarly, we define the -th right boundary vertex .

Now we are ready to prove the main result of this section.

Lemma 12

-Cycle trees admit MSOL-definable binary tree decompositions of width at most .

Proof

We can show this in almost exactly the same way as for Halin graphs (Lemma 7), so we will focus on pointing out the differences. Again, at first we define an edge orientation on -cycle trees. Instead of partitioning the edge set into one directed tree and one directed cycle we now have one directed tree and directed cycles, such that denotes the cycle of distance from the central vertex .

The root of the tree is a vertex incident to the outermost cycle and for each cycle we have one incident root vertex , which will be used to define the neighbor ordering of edges with the same head vertex. For a cycle this will be a vertex of distance from the root vertex of the tree. One can verify that this edge orientation is MSOL-definable by Lemma 11 and the predicates given in Appendix A.6. For an illustration of the orientation see Figure (b)b.

Using this orientation one can define a predicate for ordering all edges with the same parent, which then can be utilized to define -th boundary vertices.

As in the proof of Lemma 7, we construct a component in the tree decomposition for each edge .

Figure 9: Bag types and edges for a component in the tree decompositions of a -cycle tree.

The definition of the bag types is somewhat different, since now we have to take into account at most cycle edges per component instead of a single one. Given an edge such that is the parent of and lies on cycle , we have the following types of bags, with edges between them as shown in Figure 9. (Note that if in the following we refer to boundary vertices, we always mean the boundary vertices on higher numbered cycles.)
R1. This bag contains the vertex and all its left and right boundaries.
R2. This bag contains all vertices in the bag plus the vertex .
L1. This bag contains the vertex , all its left boundary vertices and the right boundary vertices of in the forest consisting of without the edge and its right neighbors.
L2. This bag contains all vertices of the bag plus the left boundary vertices of (including itself, if ).
L3. This bag contains the vertices of the bag minus the right boundary vertices of without and its right neighbors, such that has a matching left boundary vertex. That is, there is an edge between said boundary vertices and thus the vertex can be forgotten.
LR. This bag contains the union of the bags and .
One can verify that this construction yields a tree decomposition for -cycle trees. The largest of its bags is of type , which might contain four boundary sets, each of which has size at most , plus the vertices and . Since we have only one vertex, which is no boundary vertex (the central vertex ), we can conclude that the size of this bag is at most and hence this tree decomposition has width . The predicates in Appendix A.6 complete the proof. ∎

Combining Lemma 12 with Theorem 5.1, we can derive the following.

Theorem 5.2

MSOL-definability equals recognizability for -cycle trees.

5.3 Feedback Edge and Vertex Sets

In this section we consider graphs that can be obtained by the composition of a graph that admits an MSOL-definable (ordered) tree decomposition and some feedback edge or vertex sets, defined below.

Definition 18

Let be a graph. An edge set is called feedback edge set, if is acyclic. Analogously, a vertex set is called feedback vertex set, if the graph is acyclic, where denotes the set of incident edges of in .

Theorem 5.3

Let be a graph with spanning tree , which admits an MSOL-definable (ordered) tree decomposition of width , such that its vertex and edge bag predicates are associated with either (a subset of the) vertices of the graph or (a subset of the) edges in the spanning tree.

Let be a constant. A graph admits an MSOL-definable (ordered) tree decomposition of width , if one of the following holds.

  1. Let denote a set of edges, such that each biconnected component of the graph has a feedback edge set of size at most , where .

  2. Let denote a set of vertices and a set of incident edges, such that each biconnected component of the graph has a feedback vertex set of size at most , where .

Proof

1. Let be an edge in and note that since has bounded treewidth , there exists a -coloring on its vertices. Assume wlog. that the coloring set is a set of natural numbers and . Then we add the vertex to each bag that is associated with either a vertex or an edge in that lie on the fundamental cycle of . The width of the tree decomposition increased by at most (by Lemmas 6 and 73 in [4]).

2. Let be a vertex in . We add to all bags that correspond to vertices/edges contained in the same biconnected component as (in ). The fact that the treewidth increased by at most follows from [4, Lemmas 6 and 72].

In Appendix A.7 we show how to extend all predicates to include the newly introduced vertices in the bags for both cases. ∎

As an example we apply Theorem 5.3 to both Halin graphs and -cycle trees, which - in combination with Theorem 5.1 - yields the following result.

Theorem 5.4

Let denote a graph class such that its members can be constructed from a Halin graph or a -cycle tree together with either an edge set or vertex set as described in Theorem 5.3. Then, MSOL-definability equals recognizability for all members of .

5.4 Bounded Degree -Outerplanar Graphs

We now give another method for proving Courcelle’s conjecture based on the notion of vertex and edge remember numbers, which will enable us to prove it for -outerplanar graphs of bounded degree. We first give the necessary definitions.

Definition 19 (Vertex and Edge Remember Number)

Let be a graph with maximal spanning forest . The vertex remember number of (with respect to ), denoted by , is the maximum number over all vertices of fundamental cycles that use . Analogously, we define the edge remember number, denoted by .

Theorem 5.5

Let be a graph with a spanning tree and let . admits

  1. a width- MSOL-definable tree decomposition of bounded degree, if has bounded degree.

  2. a width- MSOL-definable ordered tree decomposition, if there is an MSOL-definable ordering over all edges with the same head vertex.

Proof

For both 1 and 2 we can construct a tree decomposition as shown in the proof of Theorem 71 in [4]. That is, we create a tree , where , i.e. we add an extra node between each two adjacent vertices in the spanning tree. The construction of the sets works as follows. For a bag associated with a vertex in the spanning tree we first add to , and for a bag associated with an edge , we add both its endpoints to . Then, for each edge , we add one of its endpoints to each bag corresponding to a vertex or edge on the fundamental cycle of . To make sure that our method of choosing one endpoint of an edge is MSOL-definable, we use the same argument as in the proof of Theorem 5.31. That is, we assume the existence of a vertex coloring in the graph and pick the vertex with the lower numbered color.

One can verify that is a tree decomposition of and we have for all vertex bags that and for all edge bags that and thus the claimed width of follows.

Now we show that finding a spanning tree such that its vertex and edge remember number are bounded by a constant, say , is MSOL-definable, if it exists. We can simply do this by guessing an edge set and checking whether is the edge set of a spanning tree in with the claimed bound on the resulting vertex and edge remember numbers. Since is constant, this can be done in a straightforward way, see Appendix A.8.

For defining the Bag- and Parent-predicates, we assume wlog. that we have a root and an MSOL-definable orientation on the edges in the spanning tree,444This clearly holds by Lemma 4, since trees have treewidth 1. so we can directly define such predicates, see Appendix A.8.

For case 1 one easily sees that has bounded degree, since the degree of any node corresponding to a vertex in the tree decomposition is equal to the degree of in . Nodes containing edge bags are always intermediate nodes.

Case 2 holds, since we can define an orientation for the children of each vertex bag by using the ordering of its corresponding edges.

The predicates defined in Appendix A.8 complete the proof. ∎

In his proof for the treewidth of -outerplanar graphs being , Bodlaender used the following lemma.

Lemma 13 (Lemma 81 in [4])

Let be a -outerplanar graph with maximum degree 3. Then there exists a maximal spanning forest with and .

Given the nature of its proof, one immediately has the following consequence.

Corollary 2

Let be a -outerplanar graph with maximum degree . Then there exists a maximal spanning forest with and .

We can now prove the main result of this section.

Theorem 5.6

MSOL-definability equals recognizability for -outerplanar graphs of bounded degree.

Proof

Let be a -outerplanar graph with maximum degree . By Corollary 2, we know that there exists a maximal spanning forest of with and . By Theorem 5.51, we know that