A parameterized problem is said to be fixed parameter tractable (FPT) if there exists a function such that for each , one can decide whether in time , where is the size of . Using non-constructive methods derived from Robertson and Seymour’s graph minor theory, one can show that certain problems can be solved in time for some function . The caveat is that the function arising from these non-constructive methods is often not known to be computable. Interestingly, for some problems it is not even clear how to obtain algorithms running in time for some computable functions and . In this work we will use techniques from automata theory and structural graph theory to provide constructive FPT and XP algorithms for problems for which only non-constructive parameterized algorithms were known.
The counting monadic second-order logic of graphs extends first order logic by allowing quantifications over sets of vertices and sets of edges, and by introducing the notion of modular counting predicates. This logic is expressive enough to define several interesting graph properties, such as Hamiltonicity, -colorability, connectivity, planarity, fixed genus, minor embeddability, etc. Additionally, when restricted to graphs of constant treewidth, CMSO logic is able to define precisely those properties that are recognizable by finite state tree-automata operating on encodings of tree-decompositions, or equivalently, those properties that can be described by equivalence relations with finite index [8, 1, 3, 4].
The expressiveness of CMSO logic has had a great impact in algorithmic theory due to Courcelle’s model-checking theorem . This theorem states that for some computable function , one can determine in time222 denotes the number of vertices in , and , the number of symbols in . whether a given graph of treewidth at most satisfies a given CMSO sentence . As a consequence of Courcelle’s theorem, many combinatorial problems, such as Hamiltonicity or -colorability, which are NP-hard on general graphs, can be solved in linear time on graphs of constant treewidth. In this work we will consider a class problems on graphs of constant treewidth which cannot be directly addressed via Courcelle’s theorem, either because it is not clear how to formulate the set of positive instances of such a problem as a CMSO-definable set, or because although the set of positive instances is CMSO-definable, it is not clear how to explicitly construct a CMSO sentence defining such set. For instance, sets of graphs that are closed under minors very often fall in the second category due to Robertson and Seymour’s graph minor theorem.
1.1 Main Result
Let be a CMSO sentence, and be a positive integer. We say that a graph is a -supergraph of a graph if the following conditions are satisfied: satisfies , has treewidth at most , and is a supergraph of (possibly containing more vertices than ).
In our main result, Theorem 14, we devise an algorithm that takes as input a CMSO sentence , a positive integer , and a connected graph of maximum degree , and determines in time whether has a -supergraph. We note that our algorithm determines the existence of such a -supergraph without the need of necessarily constructing . Therefore, no bound on the size of a candidate supergraph is imposed.
In the next three sub-sections we show how Theorem 14 can be used to provide partial solutions to certain long-standing open problems in parameterized complexity theory.
1.2 Planar Diameter Improvement
In the planar diameter improvement problem (PDI), we are given a graph , and a positive integer , and the goal is to determine whether has a planar supergraph of diameter at most . Note that the set of YES instances for the PDI problem is closed under minors. In other words, if has a planar supergraph of diameter at most , then any minor of also has such a supergraph. Therefore, using non-constructive arguments from Robertson and Seymour’s graph minor theory [22, 23] in conjunction with the fact planar graphs of constant diameter have constant treewidth, one can show that for each fixed , there exists an algorithm which determines in linear time whether a given has diameter at most . The problem is that the non-constructive techniques mentioned above provide us with no clue about what the algorithm actually is. This problem can be partially remedied using a technique called effectivization by self-reduction introduced by Fellows and Langston [16, 12]. Using this technique one can show that for some function , there exists a single algorithm which takes a graph and a positive integer as input, and determines in time whether has a planar supergraph of diameter at most . The caveat is that the function bounding the influence of the parameter in the running time of the algorithm mentioned above is not known to be computable.
Obtaining a fixed parameter tractability result for the PDI problem with a computable function is a notorious and long-standing open problem in parameterized complexity theory [12, 15, 10]. Indeed, when it comes to explicit algorithms, the status of the PDI problem is much more elusive. As remarked in , even the problem of determining whether PDI can be solved in time for computable functions is open.
Using Theorem 14 we provide an explicit algorithm that solves the PDI problem for connected graphs in time where is a computable function, and is the maximum degree of . This result settles an open problem stated in  in the case in which the input graph is connected and has bounded (even logarithmic) degree. We note that our algorithm imposes no restriction on the degree of a prospective supergraph .
1.3 -Outerplanar Diameter Improvement
A graph is -outerplanar if it can be embedded in the plane in such a way that all vertices lie in the outer-face of the embedding. A graph is -outerplanar if it can be embedded in the plane in such a way that that deleting all vertices in the outer-face of the embedding yields a -outerplanar graph. The -outerplanar diameter improvement problem (-OPDI) is the straightforward variant of PDI in which the completion is required to be -outerplanar instead of planar. In  Cohen at al. devised an explicit polynomial time algorithm for the -OPDI problem. The complexity of the -outerplanar diameter improvement problem was left open for . Using Theorem 14 we show that the -OPDI problem can be solved in time where is a computable function. In other words, for each fixed , the -outerplanar diameter improvement problem is strongly uniformly fixed parameter tractable with respect to the diameter parameter for bounded degree connected input graphs.
1.4 Contraction-Closed Parameters
A graph parameter is a function that associates a non-negative integer with each graph. We say that such a parameter is contraction-closed if whenever is a contraction of . For instance, the diameter of a graph is clearly a contraction-closed parameter. We say that a graph parameter is effectively CMSO-definable if there exists a computable function , and an algorithm that takes a positive integer as input and constructs a CMSO formula that is true on a graph if and only if .
The results described in the previous subsections can be generalized in two directions. First, the diameter parameter can be replaced by any effectively CMSO-definable contraction closed parameter that is unbounded on Gamma graphs. These graphs were defined in  with the goal to provide a simplified exposition of the theory of contraction-bidimensionality. In particular, many well studied parameters that arise often in bidimensionality theory satisfy the conditions listed above. Examples of such parameters are the sizes of a minimum vertex cover, feedback vertex set, maximal matching, dominating set, edge dominating set, connected dominating set etc. On the other direction, the planarity requirement can be relaxed to CMSO definable graph properties that exclude some apex graph as a minor. These properties are also known in the literature as bounded local-treewidth properties. For instance, embeddability on surfaces of genus , for fixed , is one of such properties.
1.5 Related Work
As mentioned above, given a CMSO sentence and a positive integer , one can use Courcelle’s model checking theorem to determine in time whether a given graph of treewidth at most satisfies . Therefore, given a CMSO sentences and a positive integer , we may consider the following algorithmic approach to decide whether a given graph has a -supergraph: first, we construct a formula which is true on a graph if there is a model of of treewidth at most such that is a subgraph of . In other words, defines the subgraph closure of the set of models of of treewidth at most . Then, to determine whether has a -supergraph, it is enough to determine whether satisfies using Courcelle’s model checking theorem.
Unfortunately, this approach cannot work in general. The problem is that there exist CMSO definable families of graphs whose subgraph closure is not CMSO definable. For instance, let be the family of ladder graphs, where is the ladder with steps333The vertices of are and , and the edges are for , for , and for .. It is easy to see that is CMSO definable and every graph in has treewidth at most . Nevertheless, the subgraph closure of does not have finite index. Therefore, this subgraph closure is not CMSO definable, since CMSO definable classes of graphs of constant treewidth have finite index.
Interestingly, when the property defined by is contraction closed, then the sentence defines a minor-closed property whose treewidth is bounded by . Additionally, it follows from Robertson and Seymour graph minor theorem that each minor-closed property can be characterized by a finite set of forbidden minors. Therefore, if we were able to enumerate the minors in constructively, we would immediately obtain a constructive polynomial time algorithm for determining whether a given graph has a -supergraph. It is worth noting that Adler, Kreutzer and Grohe have shown that if a minor-free graph property is MSO definable and has constant treewidth, then one can effectively enumerate the set of forbidden minors for . In particular, by giving the sentence as input to the algorithm in  we would get a list of forbidden minors characterizing the set of graphs that have a -supergraph. Nevertheless, the problem with this approach is that it is not clear how the sentence can be constructed from and .
In the embedded planar diameter improvement problem (EPDI), the input consists of a planar graph embedded in the plane, and a positive integer . The goal is to determine whether one can add edges to the faces of this embedding in such a way that the resulting graph has diameter at most . The difference between this problem and the PDI problem mentioned above is that in the EPDI problem, an embedding is given at the input, and edges must be added in such a way that the embedding is preserved, while in the PDI problem, no embedding is given at the input. Recently, it was shown in  that EPDI for -vertex graphs can be solved in time , while the analogous embedded problem for -outerplanar graphs can be solved in time .
It is worth noting that the algorithms in  heavily exploit the embedding of the input graph by viewing separators as nooses - simple closed curves in the plane that touch the graph only in the vertices (see e.g. ). Additionally, it is currently unknown both whether PDI can be reduced to EPDI in XP time and whether EPDI can be reduced in XP time to PDI. Therefore it is not clear if the algorithm for EPDI can be used to provide a strongly uniform XP algorithm for PDI on general graphs. It is also worth noting that no hardness results for either PDI or EPDI are known. Indeed, determining whether either of these problems is NP-hard is also a long-standing open problem.
1.6 Proof Sketch And Organization of the Paper
In Section 2 we state some preliminary definitions. In Section 3 we define the notions of concrete bags, and concrete tree decompositions. Intuitively, a concrete tree-decomposition is an algebraic structure that represents a graph together with one of its tree decompositions. Using such structures we are able to define infinite families of graphs via tree-automata that accept infinite sets of tree decompositions. In particular, Courcelle’s theorem can be transposed to this setting. More precisely, there is a computable function such that for each CMSO sentence and each , one can construct in time a tree automaton which accept precisely those concrete tree decompositions of width at most that give rise to graphs satisfying (Theorem 4).
In Section 4 we define the notion of sub-decomposition of a concrete tree decomposition. Intuitively, if a concrete tree decomposition represents a graph , then a sub-decomposition of represents a sub-graph of . We show that given a tree-automaton accepting a set of concrete tree decompositions, one can construct a tree automaton which accepts precisely those sub-decompositions of concrete tree decompositions in (Theorem 6).
In Section 5, we introduce the main technical tool of this work. More specifically, we show that for each connected graph of maximum degree , one an construct in time a tree-automaton whose language consists precisely of those concrete tree decompositions of width at most that give rise to (Theorem 12).
In Section 6 we argue that the problem of determining whether has a supergraph of treewidth at most satisfying is equivalent to determining whether the intersection of with is non-empty. By combining Theorems 4, 6 and 12, we infer that this problem can be solved in time (Theorem 14). Finally, in Section 7, we apply Theorem 14 to obtain explicit algorithms for several supergraph problems involving contraction-closed parameters.
For each , we let . We let . For each finite set , we let denote the set of subsets of . For each and each finite set , we let be the set of subsets of of size at most , and be the set of subsets of of size precisely . If are sets, then we write to indicate that for , and that is the disjoint union of .
A graph is a triple where is a set of vertices, is a set of edges, and is an incidence relation. For each we let be the set of endpoints of , and we assume that is either or . We note that our graphs are allowed to have multiple edges, but no loops. We say that a graph is a subgraph of if , and . Alternatively, we say that is a supergraph of . The degree of a vertex is the number of edges incident with . We let denote the maximum degree of a vertex of .
A path in a graph is a sequence where for , for , for , and for each . We say that is connected if for every two vertices there is a path whose first vertex is and whose last vertex is .
Let and be graphs. An isomorphism from to is a pair of bijections such that for every if then . We say that and are isomorphic if there is an isomorphism from to .
A tree is an acyclic graph containing a unique connected component. To avoid confusion we may call the vertices of a tree “nodes” and call their edges “arcs”. We let denote the set of nodes of and denote its set of arcs. A tree decomposition of a graph is a pair where is a tree and is a function that labels nodes of with subsets of vertices of in such a way that the following conditions are satisfied.
For every , there exists a node such that
For every , the set , i.e., the set of nodes of whose corresponding bags contain , induces a connected subtree of .
The width of a tree decomposition is defined as , that is, the maximum bag size minus one. The treewidth of a graph , denoted by , is the minimum width of a tree decomposition of .
The counting monadic second-order logic of graphs, here denoted by CMSO, extends first order logic by allowing quantifications over sets of vertices and edges, and by introducing the notion of modular counting predicates. More precisely, the syntax of CMSO logic includes the logical connectives , variables for vertices, edges, sets of vertices and sets of edges, the quantifiers that can be applied to these variables, and the following atomic predicates:
where is a vertex variable and a vertex-set variable;
where is an edge variable and an edge-set variable;
where is a vertex variable, is an edge variable, and the interpretation is that the edge is incident with the edge .
where , , is a vertex-set or edge-set variable, and the interpretation is that ;
equality of variables representing vertices, edges, sets of vertices and sets of edges.
A CMSO sentence is a CMSO formula without free variables. If is a CMSO sentence, then we write to indicate that satisfies .
Let be a finite set. The set of terms over is inductively defined as follows.
If , then .
If , and , then .
If , and , then .
Note that the alphabet is unranked and the symbols in may be regarded as function symbols or arity , or . The set of positions of a term is defined as follows.
Note that if for some , then . If where , then we say that is a child of . Alternatively, we say that is the parent of . We say that is a leaf if it has no children. We let be the tree that has as nodes and as arcs. We say that a subset is connected if the sub-tree of induced by is connected. If is connected, then we say that a position is the root of if the parent of does not belong to .
If is a term in for , and , then the symbol at position is inductively defined as follows. If , then . On the other hand, if where , then .
Let be a finite set of symbols. A bottom-up tree-automaton over is a tuple where is a set of states, a set of final states, and is a set of transitions of the form with , , and . The size of , which is defined as , measures the number of states in plus the number of transitions in . The set of all terms reaching a state in depth at most is inductively defined as follows.
We denote by the set of all terms reaching state in finite depth, and by the set of all terms reaching some final state in .
We say that the set is the language accepted by .
Let be a map between finite sets of symbols and . Such mapping can be homomorphically extended to a mapping between terms by setting for each position . Additionally, can be further extended to a set of terms by setting . Below we state some well known closure and decidability properties for tree automata.
Lemma 1 (Properties of Tree Automata ).
Let and be finite sets of symbols. Let and be tree automata over , and be a mapping.
One can construct in time a tree automaton such that .
One can determine whether in time .
One can construct in time a tree automaton such that .
3 Concrete Tree Decompositions
A -concrete bag is a pair where , and with or . We note that is allowed to be empty. We let be the set of all -concrete bags. Note that . We regard the set as a finite alphabet which will be used to construct terms representing tree decompositions of graphs.
A -concrete tree decomposition is a term . We let be the -concrete bag at position of . For each , we say that a subset is -maximal if the following conditions are satisfied.
is connected in .
for every .
If is a connected subset of and for every , then .
Note that if and are -maximal then either , or . Additionally, and each , there exists a unique subset such that is -maximal and . We denote this unique set by .
Let . The graph associated with is defined as follows.
Intuitively, a -concrete tree decomposition may be regarded as a way of representing a graph together with one of its tree decompositions. This idea is widespread in texts dealing with recognizable properties of graphs [3, 2, 9, 13, 17]. Within this framework it is customary to define a bag of width as a graph with at most vertices together with a function that labels the vertices of these graphs with numbers from . Our notion of -concrete bag, on the other hand, may be regarded as a representation of a graph with at most vertices injectively labeled with numbers from and at most one edge. Within this point of view, the representation used here is a syntactic restriction of the former. On the other hand, any decomposition which uses bags with arbitrary graphs of size can be converted into a -concrete decomposition, by expanding each bag into a sequence of concrete bags. The following observation is immediate, using the fact that if a graph has treewidth , then it has a rooted tree decomposition in which each node has at most two children .
A graph has treewidth if and only if there exists some -concrete tree decomposition such that is isomorphic to .
Theorem 4 (Variant of Courcelle’s Theorem).
There exists a computable function such that for each CMSO sentence , and each , one can construct in time a tree-automaton accepting the following tree language.
In this section we introduce the notion of sub-decompositions of a -concrete decomposition. Intuitively, if a -concrete tree decomposition represents a graph then sub-decompositions of represent subgraphs of . The main result of this section states that given a tree automaton over , one can efficiently construct a tree automaton over which accepts precisely those sub-decompositions of -concrete tree decompositions in .
We say that a -concrete bag is a sub-bag of a -concrete bag if and .
We say that a -concrete tree decomposition is a sub-decomposition of a -concrete tree decomposition if the following conditions are satisfied.
For each , is a sub-bag of .
For each , and for each , if and , then if and only if .
The following theorem states that sub-decompositions of are in one to one correspondence with subgraphs of .
Let and be graphs and let be a -concrete tree decomposition such that . Then is a subgraph of if and only if there exists some such that is a sub-decomposition of with .
Let be a subgraph of . We show that there exists a sub-decomposition of such that . Since is a subgraph of , we have that , , and . We define by setting as follows for each .
if and otherwise.
First, we note that if and only if , if and only if , and if and only if . Therefore, . We will check that the -concrete decomposition defined above is indeed a sub-decomposition of . In other words, we will verify that conditions S1, S2 and S3 above are satisfied. The fact that S1 is satisfied is immediate, since we define for each . Therefore, . Condition S2 is also satisfied, since by and we have that and that is either , or equal to . Finally, condition S3 is also satisfied, since (a) guarantees that for each number , and each -maximal set , if is removed from for some , then is indeed removed from for every .
For the converse, let be a sub-decomposition of . We show that the graph is a subgraph of . First, we note that condition S3 guarantees that for each and each , if is -maximal in then is -maximal in . Therefore, . Now, Condition S2 guarantees that implies that . Therefore, . Finally, by definition if and only if for each . Since the fact that implies that , we have that implies that . Therefore, . Additionally, since for each and each , we have that . This shows that is a subgraph of .
The following theorem states that given a tree automaton over , one can efficiently construct a tree automaton which accepts precisely those sub-decompositions of -concrete tree decompositions in .
Theorem 7 (Sub-Decomposition Automaton).
Let be a tree automaton over . Then one can construct in time a tree automaton over accepting the following language.
Let be a tree automaton over . As a first step we create an intermediate tree automaton which accepts the same language as . The tree automaton is defined as follows.
Note that for each , each , and each , reaches state in if and only if reaches state in and , where is the -concrete bag at the root of . In particular, this implies that a term belongs to if and only if .
Now, consider the tree automaton over where
It follows by induction on the height of terms that a term reaches a state in if and only if there exists some term such that reaches state in , , , and is a sub-decomposition of . In particular, reaches a final state of if and only if is a sub-decomposition of some which reaches a final state of . ∎
5 Representing All Tree Decompositions of a Given Graph
In this section we show that given a connected graph of maximum degree , and a positive integer , one can construct in time a tree automaton over that accepts precisely those -concrete tree decompositions of .
Let be a graph. A -concrete bag is a tuple where is a -concrete bag; is an injective function that assigns a vertex of to each element of ; is a function that assigns to each element , a set of edges incident with of size at most ; is a subset of such that and whenever ; and is a subset of .
We let be the set of all -concrete bags. Note that has at most elements. We let be the set of all terms over . If is a term in then for each , the -concrete bag of at position is denoted by the tuple
We say that a term is a -concrete tree decomposition if the following conditions are satisfied for each each and each .
If and then .
If then for some edge with
Let , and be the children444If then has no child. of , then
If then .
If then . If then if and only if and .
Let be a function such that for each -concrete bag . In other words, transforms a -concrete bag into a -concrete bag by erasing the four last coordinates of the former. If is a term in