A new approach on locally checkable problems
Abstract.
By providing a new framework, we extend previous results on locally checkable problems in bounded treewidth graphs. As a consequence, we show how to solve, in polynomial time for bounded treewidth graphs, double Roman domination and Grundy domination, among other problems for which no such algorithm was previously known. Moreover, by proving that fixed powers of bounded degree and bounded treewidth graphs are also bounded degree and bounded treewidth graphs, we can enlarge the family of problems that can be solved in polynomial time for these graph classes, including distance coloring problems and distance domination problems (for bounded distances).
Key words and phrases:
locally checkable problem, vertex partitioning problem, local condition composition problem, double Roman domination, Grundy domination, treewidth2010 Mathematics Subject Classification:
05C15, 05C69, 05C85, 68Q25, 68R101. Introduction
Many combinatorial optimization problems in graphs can be classified as vertex partitioning problems. The partition classes have to verify inner-properties and/or inter-properties, and there is an objective function to minimize or maximize. Some of these properties are locally checkable, that is, the property that each vertex has to satisfy with respect to the partition involves only the vertex and its neighbors. This is the case of stable set, dominating set and -coloring, among others.
In the spirit of generalizing this kind of problems, in [6, 7] Bodlaender defined the local condition composition (LCC) and edge condition composition (ECC) problems, and showed polynomial-time algorithms to solve LCC problems on bounded treewidth and bounded degree graphs, and ECC problems on bounded treewidth graphs. In [61] Telle defined the locally checkable vertex partitioning (LCVP) problems and in [15], Bui-Xuan, Telle and Vatshelle presented dynamic programming algorithms for LCVP problems that run in polynomial time on many graph classes, including interval graphs, permutation graphs and Dilworth graphs, and in fixed-parameter single-exponential time parameterized by boolean-width. In [17], Cattanéo and Perdrix defined a different generalization of LCVP problems that allows us to deal with properties of the subset that are not necessarily locally checkable, as for example being connected, and prove hardness results for LCVP problems and such generalizations.
In this paper, we define a new framework for locally checkable problems, which we call -locally checkable problems. In a -locally checkable problem, every vertex has a list of colors that it can receive, along with the cost of receiving each color . There is a function that, for each vertex and each coloring of the closed neighborhood of radius of , determines if the colors assigned to and the vertices at distance at most from are permitted for . We include edge labels , whose values may be involved in the checking functions. For technical reasons, other simple operators are also required, such as one that combines the costs and one that compares them. This approach generalizes LCVP problems, including other problems such as -domination (which cannot be expressed as a LCVP problem, at least not in an straightforward way). We further consider a set of global properties (which might be, for example, that certain sets of the partition induce a connected or an acyclic subgraph). In this way, ECC problems can be modeled within our framework.
A key notion to our paper is the treewidth of a graph, which was introduced by Robertson and Seymour [56] (and previously considered under different names by Bertelè and Brioschi [5] and Halin [41]). Graphs of treewidth at most are called partial -trees. Some graph classes with bounded treewidth include: forests (treewidth 1); pseudoforests, cacti, outerplanar graphs, and series-parallel graphs (treewidth at most 2); Halin graphs and Apollonian networks (treewidth at most 3) [56, 8, 50, 11]. In addition, control flow graphs arising in the compilation of structured programs also have bounded treewidth (at most 6) [62].
To solve -locally checkable problems in bounded treewidth graphs, we give an algorithm based on a rather simple computation of a recursive function traversing a special tree decomposition, using dynamic programming as it is usual with this kind of problems, but with an abstraction of the “extra” parameters involved in ad-hoc solutions of locally checkable problems. In order to formally describe this abstraction, we introduce the concept of partial neighborhoods. A partial neighborhood system gives us tools to accumulate information from the neighbors of a vertex. According to the sizes of the sets and the time complexity of the functions involved, we distinguish polynomial and constant partial neighborhood systems. Then our algorithm is polynomial when some mild conditions are satisfied. The main result of this paper is the following.
Theorem 5.5.1.
Let be a family of graphs of bounded treewidth. Consider a family of instances of a -locally checkable problem with a polynomial partial neighborhood system, where
-
,
-
is polynomial in the input size, and
-
the functions and can be computed in polynomial time.
Then there exists an algorithm that solves these instances in polynomial time. Furthermore, if we have a constant partial neighborhood system, is bounded by a constant, and the functions and can be computed in constant time, then the time complexity of such algorithm is .
Furthermore, by proving that fixed powers of bounded degree and bounded treewidth graphs are also bounded degree and bounded treewidth graphs, we can enlarge the family of problems that can be solved in polynomial time for these graph classes, including distance coloring problems (packing chromatic number [60, 36, 14, 30], -coloring [18, 39, 19, 38]), distance independence [29], distance domination [43], and distance LCVP problems [48], for bounded distances. These results are unified in the following corollary of Section 6.
Corollary 6.0.3.
Let be a family of graphs of bounded treewidth and bounded degree. Then, for any -locally checkable problem with , polynomial in the input size, and all functions , and computable in polynomial time, there exists a polynomial-time algorithm that solves it.
We also prove that NP-complete problems can be reduced to some -locally checkable problems in complete graphs, even when restricting the sets of colors and edge labels to . Thus, a generalization of the polynomiality to bounded clique-width graphs is not possible unless P=NP.
We show how to model double Roman domination, minimum chromatic violation and Grundy domination as -locally checkable problems with polynomial partial neighborhood systems. As a result, we obtain polynomial-time algorithms to solve these problems for bounded treewidth graphs. Until the date and to the best of our knowledge, no such algorithms were previously known.
Courcelle’s celebrated theorem (see [24]) states that every graph problem definable in Monadic Second-Order (MSO) logic can be solved in linear time for bounded treewidth graphs. However, its main drawback is that the multiplicative constants in the running time of the algorithm generated with an MSO-formula can be extremely large [33]. In contrast, the statement of our problem is closer to natural language, and the time complexity of the algorithm for bounded treewidth graphs is fully detailed and involves relatively small constants.
A similar approach for a family of problems of different nature was presented in [21]. Namely, the authors define the framework of algebraic path problems, enclosing weighted shortest path, dataflow problems, regular expressions, and other problems arising in program analysis in the area of software engineering, and they present an algorithm to solve this framework of problems in concurrent systems such that each of the components is a bounded treewidth graph.
The present paper is organized as follows. Section 2 contains the necessary preliminaries and basic definitions. The central notion of the paper, -locally checkable problems, is formally introduced in Section 3. In Section 4, we study -locally checkable problems in complete graphs, under different hypothesis. In Section 5 we give an algorithm to solve -locally checkable problems parameterized by treewidth. In Section 6 we analyze the time complexity of -locally checkable problems in bounded treewidth and bounded degree graphs, and prove that fixed powers of such graphs are also bounded treewidth and bounded degree graphs. In Section 7 we extend the algorithm from Section 5 with some global properties. In particular, this recovers the results in [6, 7] for LCC problems. In Section 8 we show how to model different problems as -locally checkable problems with polynomial partial neighborhood systems, obtaining polynomial-time algorithms to solve these problems for bounded treewidth graphs. We include in Appendix A the definition of the locally checkable problems mentioned throughout the article.
2. Basic definitions and preliminary results
2.1. Algebraic definitions
Let be a set. A closed binary operation on is a function . It is usual to write as . Such an operation is commutative if for all , and it is associative if for all . An element is neutral (also called identity) if for all . An element is absorbing if for all . It is easy to prove that if is a neutral (resp. absorbing) element, then this element is unique. A commutative and associative operation can be naturally extended to any nonempty finite subset of , writing when and is finite and nonempty, moreover, if the operation also has a neutral element then we define .
Let be a set and be a closed binary operation on . Then is a monoid if is associative and has a neutral element. If is also commutative then is a commutative monoid.
A binary relation on a set is a subset of the Cartesian product . It is usual to write as . We say that is reflexive if for all , antisymmetric if for all , and transitive if for all . If is reflexive, antisymmetric and transitive, then is called a partial order (or partially ordered set). If in addition for every , then is a total order (or totally ordered set).
Let be a totally ordered set. A maximum element is an element such that for all . Note that not every totally ordered set has a maximum element, and it is easy to prove that if it does have a maximum element then this element is unique. The minimum operation, , is the closed binary operation on such that if and if . It is easy to prove that is commutative and associative.
A set of natural numbers is co-finite if its complement with respect to the set of natural numbers is finite.
We denote by , with and , the set of all integer numbers greater than or equal to and less than or equal to , that is .
Given a set and a function , the weight of the function (finite or infinite) is defined as .
Throughout this paper we will work with the set of boolean values and all the usual logical operators, such as , , and .
Let be a function and let . We denote by the function restricted to the domain , that is, the function is defined as for all .
2.2. Automata
A deterministic finite-state automaton is a five-tuple that consists of
-
: a finite set of states,
-
: a finite set of input symbols (often called the alphabet),
-
: a transition function,
-
: an initial or start state, and
-
: a set of final or accepting states.
We say that an automaton accepts a string , with , if and only if for all and .
For example, the automaton where and , is an automaton that accepts sequences of an odd number of s.
For more about automata theory we refer the reader to [47].
2.3. Computability
A function is polynomial time computable if there exists an algorithm and a polynomial such that, for all inputs of length , computes the function and runs in time less than or equal to .
All sets considered in this article contain elements that can be encoded and passed as parameters to a computable function.
We will not delve further into this topic. For more information we refer the reader to the vast literature on computability theory.
2.4. Basic definitions on graphs
Let be a finite, simple and undirected graph. We denote by and the vertex set and edge set, respectively, of . For any , we denote by the subgraph of induced by . Let (open neighborhood of ) be the set of neighbors of and let (closed neighborhood of ). The closed neighborhood of a set is . The degree of a vertex is . The maximum degree of a vertex in is denoted by .
A graph class is a collection of graphs that is closed under isomorphism. Given a graph class , we say that is of bounded degree if .
A graph is connected if for every pair of vertices in there exists a path in from to . A connected component of a graph is an inclusion-wise maximal connected subgraph of it. For two vertices in a connected graph , we denote by the distance between and , that is, the length (number of edges) of a shortest -path in . Let be the set of vertices at distance at most from in , and . Let be the set of edges whose endpoints at distance at most from in . The -th power of is the graph denoted by such that for all distinct vertices in , is adjacent to in if and only if .
A complete graph is a graph whose vertices are pairwise adjacent. We denote by the complete graph on vertices. A clique (resp. stable set or independent set) in a graph is a set of pairwise adjacent (resp. nonadjacent) vertices. The maximum size of a clique (resp. independent set) in the graph is denoted by (resp. ).
A graph is bipartite if can be partitioned into two stable sets and , and is complete bipartite if every vertex of is adjacent to every vertex of . We denote by the complete bipartite graph with and . The star is the complete bipartite graph .
A proper -coloring of a graph is a partition of its vertices into at most stable sets, each of them called color class. Equivalently, a proper -coloring is an assignment of colors to vertices such that adjacent vertices receive different colors, and the number of colors used is at most . The chromatic number of a graph is the minimum that allows a proper -coloring of . In the more general List-coloring problem, each vertex has a list of available colors for it.
A pair of vertices or a pair of edges dominate each other when they are either equal or adjacent, while a vertex and an edge dominate each other when the vertex belongs to the edge. We will denote by , for sets of elements of , the minimum cardinality or weight of a subset of which dominates . The parameter is also denoted simply by , and the associated problem is known as Minimum Dominating Set. Parameters and are associated with the Minimum Vertex Cover and Minimum Edge Cover, respectively. In the Minimum -domination problem, given a graph we want to find the minimum weight of a function such that for all .
For a graph and , the graph obtained by subdividing in arises from by adding a new vertex , making adjacent to and , and then deleting the edge . The subdivision graph of , obtained by subdividing each of the edges of , is where and .
The jagged graph of is where and .
The line graph of a graph is denoted by and has as vertex set , where two vertices are adjacent in if and only if the corresponding edges have a common endpoint (i.e., are adjacent) in . The total graph of , denoted by , is defined similarly: its vertex set is , induces , induces , and , are adjacent in if and only if either or .
A graph, or a subgraph of a graph, is acyclic if it does not contain a cycle of length at least three. An acyclic graph is called a forest. A tree is a connected acyclic graph. In a tree , we usually call the elements in nodes. A node with degree at most 1 is called a leaf and a node of degree at least 2 is called an internal node. A tree is called a rooted tree if one vertex has been designated the root, in which case the edges have a natural orientation, towards or away from the root. For a rooted tree and , the neighbor of on the path to the root is called the parent of and a vertex is a child of if is the parent of . A binary tree is a rooted tree where every internal node has at most two children.
2.5. Definitions and preliminary results on treewidth
A tree-decomposition of a graph is a family of subsets of (called bags), together with a tree with , satisfying the following properties:
-
(W1)
.
-
(W2)
Every edge of has both its ends in for some .
-
(W3)
For all , the set of nodes induces a subtree of .
The width of the tree-decomposition is . The treewidth of , denoted , is the minimum such that has a tree-decomposition of width less or equal .
Given a graph class , the treewidth of is . We say that is of bounded treewidth if .
We will often make use of the following basic properties of the treewidth, some of which can be easily deduced.
Proposition 2.5.1.
Let be a family of graphs of bounded treewidth. If then is .
Proposition 2.5.2.
If is a subgraph of a graph then .
Theorem 2.5.3 ([57, pages 1 and 2]).
For every graph , . Moreover, .
Theorem 2.5.4 ([50, page 76]).
The treewidth of is equal to the treewidth of .
Theorem 2.5.5.
The treewidth of is less than or equal to .
A tree-decomposition is nice [50, Definition 13.1.4] if
-
is a rooted binary tree;
-
if a node has two children and then ; (join node)
-
if a node has one child , then either
-
and , or (forget node)
-
and . (introduce node)
-
Let be the subtree of rooted at node . We will denote by the subgraph of induced by .
Theorem 2.5.6 ([9, Theorem 1]).
There exists an algorithm, that given an -vertex graph and an integer , in time for some , either outputs that the treewidth of is larger than , or constructs a tree-decomposition of of width at most .
Theorem 2.5.7 ([50, Lemma 13.1.3]).
For constant , given a tree-decomposition of a graph of width and nodes, where is the number of vertices of , one can find a nice tree-decomposition of of width and with at most nodes in time.
However, we will work with a slight modification of nice tree decompositions, where the bags of the root and leaves have only one vertex each.
Definition 2.5.8.
A tree-decomposition is called easy if
-
is a binary tree rooted at such that ;
-
if a node has two children and then ; (join node)
-
if a node has one child , then either
-
and , or (forget node)
-
and ; (introduce node)
-
-
if a node has no children, then . (leaf node)
It is straightforward to prove that, given a nice tree-decomposition of width and nodes, one can construct in time an easy tree-decomposition of width and nodes.
2.6. Definitions and preliminary results on frameworks for locally checkable problems
Throughout this article we will make special emphasis on two previous frameworks for locally checkable problems. In this section we review their definitions and results related to our work.
2.6.1. LCVP problems
Let and be finite or co-finite subsets of non-negative integer numbers. A subset of vertices of a graph is a sigma-rho set, or simply -set, of if for every in , , and for every in , . The locally checkable vertex subset problems [61] consist of finding a minimum or maximum -set in an input graph , possibly on vertex weighted graphs.
A generalization of these problems asks for a partition of into classes, with each class satisfying a certain -property, as follows. A degree constraint matrix is a matrix with entries being finite or co-finite subsets of non-negative integer numbers. A -partition of a graph is a partition of such that for it holds that for every , . A locally checkable vertex partitioning (LCVP) problem [61] consists of deciding if has a partition. Optimization versions can be defined, possibly on vertex weighted graphs.
The distance- locally checkable vertex partitioning problems [48] further generalize LCVP problems by considering, for each vertex , instead of .
In [15], Bui-Xuan, Telle and Vatshelle presented dynamic programming algorithms for LCVP problems that run in polynomial time on many graph classes, including interval graphs, permutation graphs and Dilworth graphs, and in fixed-parameter single-exponential time parameterized by boolean-width. In [48] Jaffke, Kwon, Strømme and Telle presented dynamic programming algorithms for distance- locally checkable vertex partitioning problems in graphs of bounded mim-width.
2.6.2. LCC and ECC problems
In [6, 7] Bodlaender defined the local condition composition (LCC) and edge condition composition (ECC) problems, and showed polynomial-time algorithms to solve LCC problems on bounded treewidth and bounded degree graphs, and ECC problems on bounded treewidth graphs.
Definition 2.6.1 ([6, Definition 2.9]).
Let be a graph decision problem, and let be the set of instances of , the set of instances for which the answer is “yes”, and be a function that assigns sizes to instances of . We say is a basic local condition problem, if and only if there exist
-
non-negative integers ,
-
commutative monoids , and
-
a tuple such that is a commutative monoid, is a total order and for all
such that
-
each is of the form , where
-
is an undirected graph
-
is a finite set with
-
is a finite set with
-
for all , , denotes a subset of
-
-
-
for all , , there exists a function , that maps all 4-tuples, consisting of an instance , a vertex , and functions , , to elements of , such that for all (constants) :
-
(1)
there exists an algorithm that calculates , for all , , , with , in time, polynomial in .
-
(2)
if , there is a polynomial , such that for all , with and subsets .
-
(3)
there exists an algorithm that calculates for given , such that there are , with , , , , , , and , in time, polynomial in .
-
(4)
if , then there exists an algorithm, that calculates whether for given , such that there are , with , , , , , , and or , in time polynomial in .
-
(5)
if , there exists an algorithm that calculates for all with , , and given whether , in time polynomial in .
-
(1)
-
For all , if and only if there exists functions , , with
-
(1)
-
(2)
.
-
(1)
Definition 2.6.2 ([6, Definition 2.10]).
Let be a graph decision problem. We say is a local condition composition problem, if and only if there exists a basic local condition composition problem and a graph-invariant polynomial transformation from to . The class of local condition composition problems is denoted by LCC.
Definition 2.6.3 ([6, Definition 2.11]).
Let be a graph decision problem, and let be the set of instances of , the set of instances for which the answer is “yes”, and be a function that assigns sizes to instances of . We say is a basic edge condition problem, if and only if there exist
-
a non-negative integer ,
-
commutative monoids , and
-
a tuple such that is a commutative monoid, is a total order and for all
such that
-
each is of the form , where
-
is an undirected graph
-
is a finite set with
-
is a finite set with
-
for all , , denotes a subset of
-
-
-
for all , , there exists a function , that maps all 4-tuples, consisting of an instance , an edge , and functions , , to elements of , such that:
-
(1)
there exists an algorithm that calculates , for all , , , in time, polynomial in .
-
(2)
if , there is a polynomial , such that for all , and subsets .
-
(3)
there exists an algorithm that calculates for given , such that there are , , , , , , and , in time, polynomial in .
-
(4)
if , then there exists an algorithm, that calculates whether for given , such that there are , , , , , , and or , in time polynomial in .
-
(5)
if , there exists an algorithm that calculates for all , , and given whether , in time polynomial in .
-
(1)
-
For all , if and only if there exists functions , , with
-
(1)
-
(2)
.
-
(1)
Definition 2.6.4 ([6, Definition 2.12]).
Let be a graph decision problem. We say is an edge condition composition problem, if and only if there exists a basic edge condition composition problem and a graph-invariant polynomial transformation from to . The class of edge condition composition problems is denoted by ECC.
Theorem 2.6.5 ([6, Theorem 2.5]).
.
Theorem 2.6.6 ([6, Theorem 3.7]).
(i) Let , and let . Let be a class of graphs with . Then restricted to can be solved in polynomial time.
(ii) Let , and let . Let be a class of graphs with . Then restricted to can be solved in polynomial time.
3. -locally checkable problems
Let . Let be a simple undirected graph. Then suppose we have the following:
-
a set Labels and, for each edge , a label ;
-
a set Colors and, for every vertex , a nonempty set (also called list) of possible colors for ;
-
a totally ordered set with a maximum element (called Error), together with the minimum operation of the order (called ) and a closed binary operation on Weights (called ) that is commutative and associative, has a neutral element (called ) and an absorbing element that is equal to Error, and is such that for all ;
-
for every vertex and for every color , a weight (or cost) of assigning color to vertex ; and
-
a function that, given a vertex and given a color assignment such that for all , returns True if the vertex together with its neighborhood of radius (considering the labels of the edges with ) satisfies a certain condition, and False otherwise.
We say that an assignment of colors to vertices is valid in if is the domain of and for all , and it is proper if it is valid in and is true for every . The weight of a color assignment valid in is .
Given all the previously defined , , , , and , an -locally checkable problem consists of finding the minimum weight (according to the order ) of a proper assignment of colors to vertices. If no such coloring exists, the answer should be Error.
If we further consider a set of global properties (such as “the subgraph induced by the set is connected and ”), then a generalized -locally checkable problem consists of finding the minimum weight (according to the order ) of a proper color assignment that satisfies the properties in .
3.1. Examples
Many different optimization and decision problems can be modeled as -locally checkable problems (for a decision problem we can say, for example, that the answer is “no” if and only if the minimum weight of a proper coloring is Error).
For the examples shown throughout this paper, we will assume that, otherwise stated, the definitions of are for all , of for all and all , and of for all and all color assignments valid in . Also, if the labels are not specified, we can assume they are all equal to .
In Table 1 we show some examples of coloring, domination, independence and packing problems as -locally checkable problems. Their definitions can be found in Appendix A.
Problem | ||||
---|---|---|---|---|
-coloring | ||||
-chromatic sum | ||||
List-coloring | input | |||
-coloring | ||||
-tuple domination | ||||
Total -tuple domination | ||||
-domination | ||||
-domination | ||||
-rainbow domination | ||||
Roman domination | ||||
Independent set | ||||
-packing function | ||||
-limited packing |
Observe that for list-coloring and -coloring we are only interested in determining whether such coloring exists or not, so we do not use the weights for optimizing the solution, instead we use them precisely for determining if a solution is correct. For -coloring we can make use of weights to determine the smallest for which there exists a -coloring in (in particular, we could set as a known upper bound for the chromatic number to obtain it).
For the total version of most of these domination problems we only need to replace by .
For weighted versions of these problems, weights are part of the input.
For problems where the input graph is directed, we can consider edge labels that also carry the direction of the edge, and the function can use it to distinguish in-neighbors and out-neighbors.
3.2. LCVP problems
The problem of deciding if a graph has a partition can be modeled as a -locally checkable problem in the following way:
-
;
-
;
-
; and
-
.
Therefore, our framework is a generalization of LCVP problems. Furthermore, it allows us to model more problems, like –domination.
3.3. LCC and ECC problems
Consider an ECC problem . By definition, there exists a basic ECC problem such that can be reduced to . We will show that can be reduced to a generalized -locally checkable problem in the jagged graph of the input graph.
Construct from the input graph . Let be obtained by adding a maximum element to . Then
-
for all , and
for all ; -
;
-
for all , and
for all ; -
for all and all color assignments valid in , and
for all and all color assignments valid in ; and -
Global properties : , for all .
With a similar approach, we can reduce a LCC problem in bounded degree graphs to a generalized -locally checkable problem in the jagged graph of the input graph (for an appropriate ). Construct from the input graph . Let be obtained by adding a maximum element to . For all , let and be, respectively, the sets of all functions and (notice that and are finite sets that can be computed in polynomial time). Then
-
for all , and
for all ; -
;
-
for all , and
for all ; -
for all and all color assignments valid in , checks that and (where and ) for all , and ; and
-
Global properties : , for all .
4. -locally checkable problems in complete graphs
It is easy to see that we can polynomially reduce NP-complete problems in graphs to particular -locally checkable problems in complete graphs, even when restricting the sets of colors and edge labels to . Indeed, we can transform the classical domination problem in a graph to the following -locally checkable problem in complete graphs. We construct a complete graph such that and set
-
if and otherwise;
-
;
-
;
-
; and
-
.
It is clear that the minimum weight of a proper coloring in this instance equals , and this transformation can be performed in polynomial time.
If we restrict Labels to , we can still find a polynomial-time reduction from the domination problem in a graph to a -locally checkable problem in a complete graph such that , by setting:
-
;
-
;
-
and ; and
-
.
Of course, -locally checkable problems are polynomial-time solvable under appropriate conditions.
Theorem 4.0.1.
Consider a -locally checkable problem and a family of instances where
-
is a complete graph;
-
for all ;
-
the number of all possible colors (that is, the size of the set ) is bounded by a constant; and
-
can be computed in polynomial time and only depends on , and the number of neighbors of each color that has.
Then this problem can be solved in polynomial time in for these instances.
Proof.
Assume . Notice that since is a complete graph then for all . Therefore, by the restrictions imposed to , we can assume there exists a function such that , where for all .
For every distribution of colors , with for all and such that , we need to verify if it can actually be achieved (that is, there exists a proper color assignment such that for all ), and if so, find one such proper assignment of colors to vertices of minimum weight. To this end, we construct a directed capacitated network with vertices for all , for all and all , for all , and and . There is a directed edge of capacity and cost from to for all . There is a directed edge of capacity and cost from to if and is true. There is a directed edge of capacity and cost from to for all . There is a directed edge of capacity and cost from to for all . There are no more edges than these ones. Note that the distribution is achievable if and only if the maximum flow in is , and in this case the proper assignment of colors to vertices of minimum weight corresponds to the maximum flow in of minimum cost.
Finally, the answer to the problem is obtained by finding the minimum proper color assignment among the ones found for all achievable distributions of colors.
Since is bounded by a constant, the number of distributions of colors is polynomial in (because it is ), can be computed in polynomial time, constructing takes polynomial time, and the problem of finding the maximum flow of minimum cost is polynomial-time solvable, then the statement holds. ∎
5. -locally checkable problems in bounded treewidth graphs
In this section we give a polynomial-time algorithm to solve -locally checkable problems in bounded treewidth graphs, under mild conditions. In Section 6 we show that these results can be extended to -locally checkable problems (for any fixed ) in bounded treewidth and bounded degree graphs. In Section 7 we will explain how to modify the algorithm in order to add some global properties.
We will solve the problem in a dynamic programming fashion, traversing an easy tree decomposition (see Definition 2.5.8) of the input graph and describing how to proceed with each type of node of the tree decomposition, as it is usual with this kind of problems, but with an abstraction of the “extra” parameters involved in ad-hoc solutions of locally checkable problems. In order to describe this abstraction, and hence the algorithm, we first need to introduce the concept of partial neighborhoods.
5.1. Partial neighborhoods
We define a system that, roughly speaking, gives us tools to accumulate information from the neighbors of a vertex.
Definition 5.1.1.
A partial neighborhood system for an instance of a -locally checkable problem consists of:
-
A set , for every and , together with a closed binary operation on that is commutative and associative and has a neutral element .
-
A function , for every and , that given and returns an element of (possibly making use of the label of the edge ).
-
A function , for every and . This function must satisfy for every vertex and every color assignment valid in .
In words, with we create new information, that says how having color affects when having color . The operation combines two pieces of information. For a color assignment valid in , simply verifies a condition over all the information collected from the neighbors of . Finally, we require the equality to make these tools analogous to the use of . We refer to the elements of as partial neighborhoods of vertex with color .
Remark 5.1.2.
For every instance of a -locally checkable problem there exists a partial neighborhood system. We will show how to construct one. The idea behind the following partial neighborhood system is to store all the colors assigned to the neighbors of , where represents that a neighbor has not yet been assigned a color, and can be thought as an error sign. Let , and assume . Let be the set of all -tuples such that for all . Let be such that
for all . Let be the -tuple that has in its position and in all its other positions. Let . If with for all , let be the color assignment in such that and for all , and then define . Otherwise, let .
Problem | ||||
---|---|---|---|---|
-coloring | Bool | |||
-chromatic sum | Bool | |||
List-coloring | Bool | |||
-coloring | Bool | |||
-tuple domination | ||||
Total -tuple domination | ||||
-domination | ||||
-domination | ||||
-rainbow domination | ||||
Roman domination | Bool | |||
Independent set | ||||
-packing function | ||||
-limited packing |
Finding partial neighborhood systems that have smaller sets is of extreme importance because it reduces the time complexity of the algorithm given in Section 5.3. We say a partial neighborhood system is polynomial (resp. constant) if it is such that is polynomial (resp. constant) in the size of the input of the problem, and all the functions , , and can be computed in time polynomial (resp. constant) in the input size. In Table 2 we show constant partial neighborhood systems of the locally checkable problems listed in Table 1.
Another key concept is the following. Let and be a color assignment valid in . Given a partial neighborhood system, a valid partial neighborhood mapping for is a function of domain such that for all .
Finally, given and , any function is called a checking function for .
5.2. Notation and definitions
The following definitions and notation will be useful throughout the rest of the article. To make the notation less cumbersome, we write instead of .
-
Function extended with one element in its domain. Let and . Then the function is such that and for all .
-
Function with one element less in its domain. Let and . Then the function is such that for all .
-
Graph where some edges are removed. Let be a graph. Then is the graph such that and .
-
Neutral weight mapping. Let . Then the function is such that for all .
-
Equality checking function. For every , every and every , let be the function such that for all .
-
Function that returns equality checking functions. Let , be a color assignment valid in and be a valid partial neighborhood mapping for . Then let be the function of domain such that is for all .
-
Reduction of a partial neighborhood mapping. Let , be a color assignment valid in , be a valid partial neighborhood mapping for and . Then the function of domain is such that if and otherwise.
-
Neutral partial neighborhood mapping. Let and be a color assignment valid in . Then the function of domain is such that for all . Observe that is a valid partial neighborhood mapping for .
-
Partial neighborhood in a subgraph. Let be a subgraph of and be a color assignment valid in . Then we define ns such that for all . Roughly speaking, is the information we can obtain from the neighbors of in and the color assignment .
5.3. Algorithm
Consider an instance of a -locally checkable problem with a partial neighborhood system. Let be the input graph and let be an easy tree decomposition of .
For every , every subgraph of such that and , every color assignment valid in , every that is a valid partial neighborhood mapping for , and every such that for all , we say that a function is a –coloring in if
-
is a color assignment valid in ,
-
for all ,
-
for all , and
-
for all .
For a –coloring in and a function , we define the weight under of as .
For every node , let be the set of all tuples such that
-
,
-
is a color assignment valid in ,
-
is such that for all ,
-
is a valid partial neighborhood mapping for , and
-
is a function that, given a vertex , returns a checking function for such that ;
and let be defined by
for every .
Remark 5.3.1.
Notice that if there are no –colorings in then we have .
The following result is immediate from the previous definitions.
Corollary 5.3.2.
If is the root of then the minimum weight of a proper coloring in is
We will show how to compute in a recursive way.
Lemma 5.3.3 (Leaf node).
Let be a leaf node and . Then
Proof.
Notice that in this case .
If then, by definition, there are no –colorings in . Therefore, , leading to the desired equality.
If then, by definition, is the only possible –coloring in . Therefore, . ∎
Lemma 5.3.4 (Forget node).
Let be a forget node, be the child of and . Then
Proof.
Notice that and also .
By definition of we have
Let . We claim that every that is a –coloring in is also a –coloring in . Conversely, every that is a –coloring in is also a –coloring in . We prove the first claim (the second one is similar) by showing each of the items of the definition of –coloring in holds:
-
for all (because it is true for all ),
-
is a color assignment valid in ,
-
for all and
(because ), and -
for all (because it is true for all and ).
Clearly, for every that is a –coloring in . Therefore
∎
Lemma 5.3.5 (Introduce node).
Let be an introduce node, be the child of and . Let . Then
Proof.
Observe that and (because is a tree-decomposition), and that this implies that .
If then, by definition, there are no –colorings in and we also have .
Now assume that . It is straightforward to prove that if a function is a –coloring in then the function is a –coloring in and . Furthermore, it is also straightforward to prove that for every –coloring in , the function is a –coloring in and . Therefore
∎
Lemma 5.3.6 (Join node).
Let be a join node and and be the children of .
We say that a pair of valid partial neighborhood mappings for is good if is true for all .
Let . Then
Proof.
Recall that .
For every color assignment valid in , denote by (resp. ) the restriction of to (resp. ). Let . Notice that for every color assignment valid in .
Suppose there exists a –coloring in and let be one of them. Let and be functions of domain such that and for all .
Since then . Moreover, since is a –coloring in then we know that, for all , and thus . Therefore, the functions and form a good pair of valid partial neighborhood mappings for .
It is straightforward to prove that is a –coloring in , and that is a –coloring in . Hence,
Since if there are no –colorings in , we obtain
To conclude, we will show that the other inequality holds.
If then the statement trivially holds. Otherwise, the minimum is realized by a good pair , and and . Therefore there exists a –coloring in and a –coloring in such that and .
Let be a function of domain such that
-
for all ,
-
for all , and
-
for all .
It is straightforward to prove that is a –coloring in , and also that (resp. ) is the restriction of to (resp. ). Therefore,
Consequently,
∎
Then there is a simple algorithm to compute . Indeed, based on the recurrence given in lemmas 5.3.3, 5.3.4, 5.3.5 and 5.3.6, the algorithm is executed in a bottom-up fashion (that is, first for all the leaf nodes, then for their parents, and so on) by computing for every node and every . Finally, the result is obtained by finding the minimum among all such that is the root of , is a color assignment valid in , is such that for all , and for all .
5.4. Time complexity
Let , and . Let , , , , and be upper bounds for the executing time of all the functions and , , , , and , respectively. Other operations are assumed to run in constant time. In particular, we are assuming that we access in constant time.
Traversing the tree requires time. In time we can construct the adjacency matrices of all the graphs with (by traversing top-down and computing only for nodes that are the child of a forget nodes with ). Also, in time we can construct each of the necessary function extensions and restrictions, and in we can construct each of the necessary .
We analyze four separate cases, and the proof in each one of them is straightforward.
-
Leaf node:
-
Forget node:
-
Introduce node:
-
Join node:
Each one of them is computed for every possible tuple . We know that there are no more than of such tuples, and that constructing each of them requires operations.
In summary, the time complexity of this algorithm is .
5.5. Special cases
The next result easily follows from the previous time complexity analysis, Proposition 2.5.1, Theorem 2.5.6 and Theorem 2.5.7.
Theorem 5.5.1.
Let be a family of graphs of bounded treewidth. Consider a family of instances of a -locally checkable problem with a polynomial partial neighborhood system, where
-
,
-
is polynomial in the input size, and
-
the functions and can be computed in polynomial time.
Then there exists an algorithm that solves these instances in polynomial time. Furthermore, if we have a constant partial neighborhood system, is bounded by a constant, and the functions and can be computed in constant time, then the time complexity of such algorithm is .
In particular, this result, together with Table 2, implies that all the problems listed in Table 1 can be solved in time. For other problems, under certain hypothesis we can give a more generic polynomial partial neighborhood system, hence the next result.
Corollary 5.5.2.
Let be a family of graphs of bounded treewidth. Consider a family of instances of a -locally checkable problem where
-
,
-
is bounded by a constant,
-
and can be computed in polynomial time, and
-
can be computed in polynomial time and only depends on , and the number of neighbors of each color that has.
Then, for such instances, the problem can be solved in polynomial time.
Proof.
For each instance, let and define the following partial neighborhood system:
-
;
-
for all ;
-
and
for all ; -
where is any color assignment valid in such that and for all . Note that we can construct in polynomial time using flow algorithms.
By Theorem 5.5.1, the statement holds. ∎
5.6. LCVP problems
In Section 3.2 we have seen how to model the problem of deciding if has a partition as a -locally checkable problem, and now we extend it with a partial neighborhood system. Let be the maximum of if is finite, or the maximum of if is co-finite. Then
-
is the Cartesian product of the sets for all ;
-
is such that for all ;
-
is the tuple such that its th entry is 1 and all its other entries are 0; and
-
.
6. -locally checkable problems in bounded treewidth and bounded degree graphs
Recall the partial neighborhood system defined in Remark 5.1.2, for which . Hence, the next result easily follows from Theorem 5.5.1.
Corollary 6.0.1.
Let be a family of graphs of bounded treewidth and bounded degree. Then for any -locally checkable problem with input graph , polynomial in the input size, and all functions , and computable in polynomial time, there exists a polynomial-time algorithm that solves it.
Furthermore, the next lemma shows that fixed powers of bounded treewidth and bounded degree graphs are also bounded treewidth and bounded degree graphs, therefore extending the results of the previous sections to more problems in these graph classes.
Lemma 6.0.2.
Let be a graph and . Then
and
Proof.
The inequality follows easily from the definition of power of a graph. Let be a vertex of of maximum degree. In , the graph induced by is a clique of size and, by Theorem 2.5.3, we get that . Since is a subgraph of and by Proposition 2.5.2, we have .
Now assume is a tree decomposition of . For every , let be the set of vertices that are at distance less than or equal to from a vertex of . We will prove that , is a tree decomposition of .
Clearly, , so property (W1) holds.
Let be two vertices that are neighbors in . If they are also neighbors in , then there exists a bag that contains both of the vertices and since , we get that property (W2) holds in this case. If not, there exists a vertex that is at distance at most from both and in . Therefore, since there exists a bag that contains , this implies that (because ) and (because are at distance at most from ). Consequently, property (W2) also holds in this remaining case.
Now we will prove that (W3) holds. For all , let and . Applying property (W3) to , we obtain that is a subtree of for every . Let . We will prove that is connected. By definition of the bags , we know that if and only if or for some such that . Let . Notice that in order to prove that is connected it is sufficient to prove that there exists a path in between and every . Let and let be such that . Since is a subtree of for every , and for all (because of property (W2) applied to and the edge ), and there exists a path in between and , we get that there exists a path in between and . Therefore (W3) holds for .
Since every bag has at most vertices, we obtain . ∎
Directly from Lemma 6.0.2 and Corollary 6.0.1, by reducing the problem to a -locally checkable problem in , the next result easily follows.
Corollary 6.0.3.
Let be a family of graphs of bounded treewidth and bounded degree. Then, for any -locally checkable problem with , polynomial in the input size, and all functions , and computable in polynomial time, there exists a polynomial-time algorithm that solves it.
As a result, the algorithm of Section 5 can be instantiated to solve, in polynomial time for bounded treewidth and bounded degree graphs, distance coloring problems [18, 39, 19, 38, 60, 36, 14, 30], distance independence [29], distance domination problems [43], and distance LCVP problems [48], for bounded distances.
A similar result has been obtained by Jaffke, Kwon, Strømme and Telle for the distance versions of the LCVP problems in bounded MIM-width graphs [48].
7. Dealing with global properties in bounded treewidth graphs
In this section we explain how to modify the previous algorithm in order to handle some global properties. The general idea in all of these cases is to modify by extending it with new parameters (that is, at each node we compute ). For simplicity, in the following subsections we omit some parts of the original algorithm, writing only the necessary changes.
7.1. The size of a color class is an element of a particular set
Suppose we want the class of color to have a size that is an element of a set .
Consider a deterministic finite-state automaton that accepts a string of consecutive characters if and only if . Notice that for all finite sets there exists such an automaton: let be the maximum element of , , , , and for all and . Although, for time complexity issues, when is not a constant we might be interested in another automata, with constant number of states (for example, if is the set of odd numbers in , we only need two states).
In the algorithm, at each node , we add a parameter that stores the state of the partial size of the color class , and also a parameter that checks if we are in the desired state, and then proceed in the following way.
-
Leaf node: Now we also need to check if is true.
-
Forget node: For all , let if and otherwise. Then
-
Introduce node: Remains the same (with and added to ).
-
Join node: For all , let be such that for all . Then
-
At the root where , we compute all , with such that , and if and otherwise.
Note that it is easy to generalize this idea to more classes by simply adding as many and as needed (each of them with its own automaton), and even to a set of classes by replacing statements of the form “” with “”.
The time complexity now depends on the number of states and color classes to restrict. We can assume that checking if a state is an accepting one is a constant-time operation and so is computing . Let be the number of color classes (or sets of color classes) to restrict and let be the size of the largest set of states among all considered automata. The only changes in complexity are:
-
Leaf node: add .
-
Forget node: add .
-
Introduce node: add .
-
Join node: multiply by .
-
When we multiply by the number of all possible combinations of the parameters of : add a factor .
In particular, the complexity of the algorithm remains polynomial in if is bounded by a constant, allowing us to, for example, ask for a color class to be non-empty or to have at most one element.
7.2. LCC-like properties
Let be a commutative monoid. Suppose we want to satisfy an expression of the form for some and function that receives a vertex and a color assignment valid in . For all , let be the set of different values that can have. Assume that, for every , is bounded by some polynomial in the size of the input. Also assume that computing and can be done in polynomial time for all and .
Let be obtained by adding an absorbing element to , and let be the neutral element. Consider other items similar to the partial neighborhood system for , but for :
-
A set , for every and , together with a closed binary operation on that is commutative and associative and has a neutral element .
-
A function , for every and , that given and returns an element of .
-
A function , for every and . This function must satisfy for every vertex and every color assignment valid in .
In the algorithm, at each node , we add to the following parameters: , that stores the state of a partial accumulation of values ; , that checks if we are in the desired state (similar to the idea in the previous subsection); , that carries the values of the “partial neighborhood for ” of the vertices in ; and , that behaves like except that instead of providing functions of codomain Bool, it provides functions of codomain . Then proceed in the following way.
-
Leaf node: Now we also need to check if is true.
-
Forget node:
-
Introduce node: Accumulate in the value of , remove from the domain of the new functions, and compute the new partial neighborhoods of the vertices in .
-
Join node: For all , let be such that for all . For all , let be the function defined as if and otherwise. For all and color assignment valid in , let be the function of domain such that for all . For all subgraph of and all color assignment valid in , let for all . Then
-
At the root , with , we compute all , where is such that , and .
Note that it is easy to generalize this idea to more properties like this, by simply adding as many groups of parameters as needed. If the number of this properties is bounded by a constant, then the complexity of the algorithm remains polynomial.
7.3. One color class is connected
Suppose we want the class of color to be connected.
At each node , we add the parameter that maps vertices of color to natural numbers that represent connected components.
In the following items, let denote , and denote .
-
Leaf node: Remains the same.
-
Forget node: where is such that:
-
if then for all , and
-
and, for all , if there exists such that , and otherwise.
In other words, if is a neighbor of two or more vertices of different connected components then those connected components can be unified, and if is not a neighbor of any other vertex of color then it is in a new connected component.
-
-
Introduce node: If then it remains the same (adding to ). Otherwise, we split the case related to in the following ones:
-
If there exists such that then .
-
If there does not exist such that , and then .
-
If then let be an automaton such that and . We use to request that the class of color is empty in , therefore .
That is, if belongs to a different connected component than all the vertices of color in , then there is no way to connect with them and we get an error. Also, if there are no vertices of color in then there cannot be any vertices of color in , because .
-
-
Join node: For every let be a function such that, for all ,
At this node we need to unify the different connected components. To do so, on one branch we unify a set of them while on the other branch we unify a set of them, such that and . Then .
-
At the root where , the function is such that .
As before, notice that it is easy to generalize this idea to more classes or sets of classes by adding as many functions as needed.
Let be the number of color classes (or sets of color classes) to restrict. The only changes in complexity are:
-
Leaf node: add .
-
Forget node: add .
-
Introduce node: add .
-
Join node: multiply by .
-
When we multiply by the number of all possible combinations of the parameters of : add a factor .
Note that because in the introduce node we require that the class of color is empty, we also need to compute for all , but this addition does not change the time complexity here (due to the fact that both and are bounded by a constant in this case).
7.4. One color class is acyclic
(For undirected graphs.)
It can be done in essentially the same way as for the connected property. The only difference is that in the introduce node we do as in the original algorithm, and in the forget node we check if is a neighbor of at least two vertices that belong to the same component (in which case there is a cycle and we raise an error).
8. Applications
In this section we show how to model different problems as -locally checkable problems with polynomial partial neighborhood systems. As a result, we obtain polynomial-time algorithms to solve these problems for bounded treewidth graphs. For double Roman domination, minimum chromatic violation and Grundy domination (and their variants), no such algorithms were previously known (until the date and to the best of our knowledge). As regards the problems that were already known to be polynomial-time solvable for the before-mentioned classes, it is worth to mention how to restate these problems as -locally checkable problems, even when the time complexity of the proposed solution is worse than the best one known, because problems modeled this way can be easily modified or combined, adding global properties or more restrictions, or even dealing with some distance versions, and they can inspire the statement of other problems as -locally checkable problems.
Throughout this section, we will assume that, otherwise stated, the definitions of are for all and , of for all , and , of for all , , and , and of for all , and .
8.1. Double Roman domination
This problem was first defined in [4] and proved to be NP-complete for bipartite and chordal graphs in [2].
A double Roman dominating function on a graph is a function having the property that if , then vertex must have at least two neighbors assigned 2 under or one neighbor with , and if , then vertex must have at least one neighbor with . The weight of a double Roman dominating function is the sum , and the minimum weight of a double Roman dominating function on is the double Roman domination number of .
We can model the Double Roman domination problem as a -locally checkable problem in the following way:
-
;
-
;
-
;
-
It is easy to see that some of its variants, such as perfect [27], independent [53], outer independent [1] and total [59], can be modeled by making slight modifications to the previous items.
By Corollary 5.5.2, the Double Roman domination problem can be solved in polynomial time for graphs of bounded treewidth. However, we show a constant partial neighborhood system and therefore obtain a linear-time algorithm:
-
;
-
;
-
-
.
Notice that this partial neighborhood system simply counts (until it saturates) the number of neighbors assigned with 2 and also the ones assigned with 3. For other versions of the double Roman domination problem, we might require to also count the number of neighbors assigned with 0 or 1.
8.2. Minimum chromatic violation problem
This NP-hard problem was first defined in [10] as a generalization of the -coloring problem.
Given a graph , a set of weak edges and a positive integer , the minimum chromatic violation problem asks for a –coloring of the graph minimizing the number of weak edges with both endpoints receiving the same color.
We can reduce this problem to the following -locally checkable problem in the subdivision graph :
-
for all ,
for all ; -
;
-
for all ,
for all ,
for all ; -
for all ,
for all , and
for all .
Basically, every edge in is colored with a pair of colors and checks if these are the colors of its endpoints. Edges in are allowed to have endpoints of the same color, while edges not in always produce an error when colored with a pair of equal colors. If an edge is colored with a pair of equal colors then its weight is 1, otherwise is 0.
In this way we have . We give a constant partial neighborhood system for this model:
-
for all ;
-
for all and ;
-
for all ,
for all ,
for all ; -
for all ,
for all ,
for all .
Therefore, when is bounded by a constant the minimum chromatic violation problem can be solved in linear time for graphs of bounded treewidth.
8.3. Grundy domination number
This problem was introduced in [12] and proved to be NP-complete even for chordal graphs.
A sequence of distinct vertices of a graph is a dominating sequence if is a dominating set of , and is called a legal (dominating) sequence if (in addition) for each . We say that footprints the vertices in , and that is the footprinter of every (notice that every vertex in has a unique footprinter). We are interested in the maximum length of a legal dominating sequence in .
Given a legal sequence , every vertex can be associated with a pair , where is the position of in (or if is not in ) and is the position in of the footprinter of . Directly from the definition of legal sequences we can deduce the following statement. A set determines a legal sequence if and only if the following conditions are satisfied:
-
(1)
for all , there exists a unique such that , and for all (i.e., is properly footprinted),
-
(2)
for all , if then there exists such that (i.e., if appears in the sequence then it footprints at least one vertex), and
-
(3)
for all such that and (i.e., two vertices that appear in the sequence cannot have the same position in it).
Notice that conditions 1 and 2 are locally checkable, but the last one is not. However, we claim that the Grundy domination problem can be reduced to the following -locally checkable problem. Let and .
-
;
-
;
-
for all , and for all ;
-
Let be a graph. Let be a proper coloring of in the previous -locally checkable problem, and let for all . Conditions 1 and 2 are trivially satisfied. Suppose that the last condition is not satisfied. Then there are two different vertices such that . By definition of , we know that
-
,
-
if there exists a vertex such that then and (thus, and ), and
-
if there exists a vertex such that then .
Therefore, such that for all . Now we can assign colors for every , such that
and
That is, we move one position forward all the vertices that appear after in and increase the necessary . It is easy to see that this new assignment preserves the “legality” of (i.e., if then ) and also of all the other vertices.
In order to give a polynomial-time algorithm for the Grundy domination problem in bounded treewidth graphs, we define a constant partial neighborhood system as follows:
-
;
-
;
-
where:
-
-
,
-
,
-
;
-
-
We can also model the Grundy total domination problem (defined in [13]) in a very similar way, by simply removing the cases where a vertex can footprint itself.
For both problems, since is , and we defined a constant partial neighborhood system, the time complexity of the algorithm is polynomial in for a graph in a family of bounded treewidth graphs.
8.4. Additive coloring
Let be an upper bound of the additive chromatic number. It was shown in [3] that the additive chromatic number in a graph is at most .
To model the additive coloring problem as a -locally checkable problem with a partial neighborhood system, we define the colors to be pairs of integers , where represents the number assigned to the vertex and the sum of the numbers assigned to its neighbors. Formally:
-
;
-
;
-
;
-
.
It is straightforward to derive a polynomial partial neighborhood system for this model. One possibility is the following:
-
;
-
;
-
-
.
Then is and is , implying that there exists a polynomial-time algorithm to compute for graphs in a class of graphs of bounded treewidth. Another polynomial time algorithm was obtained by R. Grappe, L. N. Grippo, and M. Valencia-Pabon (personal communication).
8.5. Distance domination problems
These problems can be naturally expressed as -locally checkable problems, for some depending on the characteristics of the problem. Moreover, some of them are in fact -locally checkable problems.
We will start by showing how to model the distance -domination problem as a -locally checkable problem. To do this, we restate the problem in the following way: vertices receive integers from to (that represent their distance to a vertex of the distance -dominating set), and vertices with a number greater than must satisfy the condition of having a neighbor with the preceding number assigned. Then
-
;
-
;
-
and
for all ; -
.
It only remains to show a constant partial neighborhood system in order to get a linear-time algorithm for this problem in bounded treewidth graphs:
-
;
-
;
-
;
-
.
Notice that with a similar argument we can model similar problems involving more than two sets in the partition. The idea is to make the colors indicate how far the vertices are from every other color. For example, if we have to color the graph with in such a way that every vertex is at distance at most 3 from a vertex of color and at distance at most 2 from a vertex of color , following this idea to model the problem as a -locally checkable problem, our set of colors is .
However, when there are restrictions over the distance between vertices of the same color, the previous approach would not work. We will now explain how to model these problems when the required distance is 2.
Let us work with the semitotal domination problem. We first restate the problem in order to differentiate two possible situations for a vertex in (colors and ) and two possible situations for a vertex not in (colors and ). Vertices of color represent those vertices in that have a neighbor in , vertices of color represent those vertices in that are at distance 2 of another vertex in , vertices of color represent those vertices not in that are the nexus between two vertices in , and vertices of color represent all the remaining ones. Then we can set
-
;
-
;
-
, and
; -
And we can naturally give a constant partial neighborhood system:
-
;
-
;
-
If :
if : -
for , and
.
Notice that in the restatement of semitotal domination we changed the “duties” of the vertices: the ones in charge of checking that a vertex of color is at distance of another vertex in are now the vertices of color .
Combining the ideas of the two previous problems we can model other related problems (such as total distance 2-domination) as -locally checkable problems.
8.6. Problems involving edges
Consider locally checkable problems where, for every edge, a certain condition comprising their endpoints and their consecutive edges must be satisfied. We will show how to reduce these problems to -locally checkable problems in the jagged graph of the input graph . We consider two kind of problems: when edges do not have requirements over other edges, and when they do.
For the first class of problems, the reduction is straightforward. We might need to duplicate the colors in order to distinguish the colors assigned to edges from the colors assigned to vertices. As an example, we show how to model vertex cover:
-
for all and
for all ; -
and ;
-
for all ;
-
for all , and
for all .
And we give a constant partial neighborhood system:
-
;
-
;
-
; and
-
for all , and
for all .
Edge cover is basically the same as vertex cover but interchanging vertices and edges.
As regards the second class of these problems, since two edges in that share an endpoint are at distance two in , we can use the ideas from semitotal domination: the neighbors in of the edges in (which are vertices in ) are the ones in charge of checking the requirements of the edges in . We illustrate the maximum matching problem, for which we can set:
-
for all and
for all ; -
and ;
-
for all ;
-
for all , and
for all .
And we give a constant partial neighborhood system:
-
;
-
;
-
; and
-
for all , and
for all .
Acknowledgements
This work was partially supported by ANPCyT PICT-2015-2218, UBACyT Grants 20020190100126BA, 20020170100495BA and 20020160100095BA (Argentina), and Programa Regional MATHAMSUD MATH190013. Carolina L. Gonzalez is partially supported by a CONICET doctoral fellowship.
References
- [1] H. Abdollahzadeh Ahangar, M. Chellali, and S. Sheikholeslami. Outer independent double Roman domination. Applied Mathematics and Computation, 364:124617, 2020.
- [2] H. A. Ahangar, M. Chellali, and S. M. Sheikholeslami. On the double Roman domination in graphs. Discrete Applied Mathematics, 232:1–7, 2017.
- [3] S. Akbari, M. Ghanbari, R. Manaviyat, and S. Zare. On the lucky choice number of graphs. Graphs and Combinatorics, 29(2):157–163, Mar. 2013.
- [4] R. A. Beeler, T. W. Haynes, and S. T. Hedetniemi. Double Roman domination. Discrete Applied Mathematics, 211:23–29, 2016.
- [5] U. Bertelè and F. Brioschi. Nonserial Dynamic Programming. Academic Press, Inc., USA, 1972.
- [6] H. L. Bodlaender. Dynamic programming on graphs with bounded treewidth. Technical report, USA, 1987.
- [7] H. L. Bodlaender. Dynamic programming on graphs with bounded treewidth. In T. Lepistö and A. Salomaa, editors, Automata, Languages and Programming, pages 105–118, Berlin, Heidelberg, 1988. Springer Berlin Heidelberg.
- [8] H. L. Bodlaender. A partial -arboretum of graphs with bounded treewidth. Theoretical Computer Science, 209(1):1–45, 1998.
- [9] H. L. Bodlaender, P. G. Drange, M. S. Dregi, F. V. Fomin, D. Lokshtanov, and M. Pilipczuk. An 5-approximation algorithm for treewidth. In 2013 IEEE 54th Annual Symposium on Foundations of Computer Science, pages 499–508, 2013.
- [10] M. Braga, D. Delle Donne, M. Escalante, J. Marenco, M. Ugarte, and M. Varaldo. The minimum chromatic violation problem: a polyhedral study. Electronic Notes in Discrete Mathematics, 62:309–314, 2017. LAGOS’17 – IX Latin and American Algorithms, Graphs and Optimization.
- [11] A. Brandstädt, V. B. Le, and J. P. Spinrad. Graph Classes: A Survey, volume 3 of SIAM Monographs on Discrete Mathematics. Society for Industrial and Applied Mathematics, Philadelphia, 1999.
- [12] B. Brešar, T. Gologranc, M. Milanič, D. F. Rall, and R. Rizzi. Dominating sequences in graphs. Discrete Mathematics, 336:22–36, 2014.
- [13] B. Brešar, M. A. Henning, and D. F. Rall. Total dominating sequences in graphs. Discrete Mathematics, 339(6):1665–1676, 2016.
- [14] B. Brešar, S. Klavžar, and D. F. Rall. On the packing chromatic number of Cartesian products, hexagonal lattice, and trees. Discrete Applied Mathematics, 155(17):2303–2311, 2007.
- [15] B.-M. Bui-Xuan, J. A. Telle, and M. Vatshelle. Fast dynamic programming for locally checkable vertex subset and vertex partitioning problems. Theoretical Computer Science, 511:66–76, 2013.
- [16] T. Calamoneri. The -Labelling Problem: A Survey and Annotated Bibliography. The Computer Journal, 49(5):585–608, 05 2006.
- [17] D. Cattanéo and S. Perdrix. The parameterized complexity of domination-type problems and application to linear codes. In T. V. Gopal, M. Agrawal, A. Li, and S. B. Cooper, editors, Theory and Applications of Models of Computation - 11th Annual Conference, TAMC 2014, Chennai, India, April 11-13, 2014. Proceedings, volume 8402 of Lecture Notes in Computer Science, pages 86–103. Springer, 2014.
- [18] G. J. Chang and D. Kuo. The -labeling problem on graphs. SIAM Journal on Discrete Mathematics, 9(2):309–316, 1996.
- [19] G. J. Chang and C. Lu. Distance-two labelings of graphs. European Journal of Combinatorics, 24(1):53–58, 2003.
- [20] G. J. Chang, J. Wu, and X. Zhu. Rainbow domination on trees. Discrete Applied Mathematics, 158(1):8–12, 2010.
- [21] K. Chatterjee, R. Ibsen-Jensen, A. K. Goharshady, and A. Pavlogiannis. Algorithms for algebraic path properties in concurrent systems of constant treewidth components. ACM Transactions on Programming Languages and Systems, 40(3):9:1–9:43, 2018.
- [22] E. J. Cockayne, R. M. Dawes, and S. T. Hedetniemi. Total domination in graphs. Networks, 10(3):211–219, 1980.
- [23] E. J. Cockayne, P. A. Dreyer, S. M. Hedetniemi, and S. T. Hedetniemi. Roman domination in graphs. Discrete Mathematics, 278(1):11–22, 2004.
- [24] B. Courcelle and M. Mosbah. Monadic second-order evaluations on tree-decomposable graphs. Theoretical Computer Science, 109(1):49–82, 1993.
- [25] S. Czerwiński, J. Grytczuk, and W. Żelazny. Lucky labelings of graphs. Information Processing Letters, 109(18):1078–1081, 2009.
- [26] J. Edmonds. Paths, trees, and flowers. Canadian Journal of Mathematics, 17:449–467, 1965.
- [27] A. T. Egunjobi and T. W. Haynes. Perfect double Roman domination of trees. Discrete Applied Mathematics, 2020.
- [28] P. Erdos, A. L. Rubin, and H. Taylor. Choosability in graphs. In Proc. West Coast Conf. on Combinatorics, Graph Theory and Computing, Congressus Numerantium, volume 26, pages 125–157, 1979.
- [29] H. Eto, F. Guo, and E. Miyano. Distance- independent set problems for bipartite and chordal graphs. J. Comb. Optim., 27(1):88–99, Jan. 2014.
- [30] J. Fiala and P. A. Golovach. Complexity of the packing coloring problem for trees. Discrete Applied Mathematics, 158(7):771–778, 2010. Third Workshop on Graph Classes, Optimization, and Width Parameters Eugene, Oregon, USA, October 2007.
- [31] J. F. Fink and M. S. Jacobson. -Domination in Graphs, pages 283–300. John Wiley & Sons, Inc., USA, 1985.
- [32] P. Firby and J. Haviland. Independence and average distance in graphs. Discrete Applied Mathematics, 75(1):27–37, 1997.
- [33] M. Frick and M. Grohe. The complexity of first-order and monadic second-order logic revisited. Annals of Pure and Applied Logic, 130(1):3–31, 2004. Papers presented at the 2002 IEEE Symposium on Logic in Computer Science (LICS).
- [34] R. Gallant, G. Gunther, B. Hartnell, and D. Rall. Limited packings in graphs. Discrete Applied Mathematics, 158(12):1357–1364, 2010.
- [35] M. R. Garey and D. S. Johnson. Computers and Intractability: A Guide to the Theory of NP-Completeness. W. H. Freeman & Co., New York, NY, USA, 1979.
- [36] W. Goddard, S. M. Hedetniemi, S. T. Hedetniemi, J. M. Harris, and D. F. Rall. Broadcast chromatic numbers of graphs. Ars Combinatoria, 86:33–49, 2008.
- [37] W. Goddard, M. A. Henning, and C. A. McPillan. Semitotal domination in graphs. Utilitas Mathematica, 94:67–81, 2014.
- [38] D. Gonçalves. On the -labelling of graphs. In S. Felsner, editor, 2005 European Conference on Combinatorics, Graph Theory and Applications (EuroComb ’05), volume DMTCS Proceedings vol. AE, European Conference on Combinatorics, Graph Theory and Applications (EuroComb ’05) of DMTCS Proceedings, pages 81–86, Berlin, Germany, 2005. Discrete Mathematics and Theoretical Computer Science.
- [39] J. R. Griggs and R. K. Yeh. Labelling graphs with a condition at distance 2. SIAM Journal on Discrete Mathematics, 5(4):586–595, 1992.
- [40] B. Grünbaum. Acyclic colorings of planar graphs. Israel Journal of Mathematics, 14(4):390–408, 1973.
- [41] R. Halin. -functions for graphs. Journal of Geometry, 8(1–2):171–186, 1976.
- [42] F. Harary and T. W. Haynes. Double domination in graphs. Ars Combinatoria, 55:201–213, 04 2000.
- [43] T. Haynes, S. Hedetniemi, and P. Slater. Fundamentals of Domination in Graphs. Boca Raton: CRC Press, 1998.
- [44] J. He and H. Liang. Complexity of total -domination and related problems. In M. Atallah, X.-Y. Li, and B. Zhu, editors, Frontiers in Algorithmics and Algorithmic Aspects in Information and Management, pages 147–155, Berlin, Heidelberg, 2011. Springer Berlin Heidelberg.
- [45] M. A. Henning. Distance domination in graphs. In T. W. Haynes, S. T. Hedetniemi, and P. J. Slater, editors, Domination in Graphs: Advanced Topics, chapter 12. Marcel Dekker, Inc., 1997.
- [46] M. A. Henning and A. P. Kazemi. -tuple total domination in graphs. Discrete Applied Mathematics, 158(9):1006–1011, 2010.
- [47] J. E. Hopcroft and J. D. Ullman. Introduction To Automata Theory, Languages, And Computation. Addison-Wesley Longman Publishing Co., Inc., USA, 1st edition, 1990.
- [48] L. Jaffke, O. joung Kwon, T. J. F. Strømme, and J. A. Telle. Generalized Distance Domination Problems and Their Complexity on Graphs of Bounded mim-width. In C. Paul and M. Pilipczuk, editors, 13th International Symposium on Parameterized and Exact Computation (IPEC 2018), volume 115 of Leibniz International Proceedings in Informatics (LIPIcs), pages 6:1–6:14, Dagstuhl, Germany, 2019. Schloss Dagstuhl–Leibniz-Zentrum fuer Informatik.
- [49] R. M. Karp. Reducibility among Combinatorial Problems, pages 85–103. Springer US, Boston, MA, 1972.
- [50] T. Kloks. Treewidth, volume 842 of Lecture Notes in Computer Science. Springer-Verlag Berlin Heidelberg, 1 edition, 1994.
- [51] E. Kubicka and A. J. Schwenk. An introduction to chromatic sums. In Proceedings of the 17th Conference on ACM Annual Computer Science Conference, CSC ’89, pages 39–45, New York, NY, USA, 1989. Association for Computing Machinery.
- [52] V. A. Leoni and E. G. Hinrichsen. -packing functions of graphs. In P. Fouilhoux, L. E. N. Gouveia, A. R. Mahjoub, and V. T. Paschos, editors, Combinatorial Optimization, pages 325–335, Cham, 2014. Springer International Publishing.
- [53] H. Maimani, M. Momeni, S. Nazari Moghaddam, F. Rahimi Mahid, and S. Sheikholeslami. Independent double Roman domination in graphs. Bulletin of the Iranian Mathematical Society, 46:543–555, 2020.
- [54] A. Meir and J. W. Moon. Relations between packing and covering numbers of a tree. Pacific Journal of Mathematics, 61(1):225–233, 1975.
- [55] Ø. Ore. Theory of graphs, volume XXXVIII of Colloquium Publications. American Mathematical Society, Providence, 3rd edition, 1962.
- [56] N. Robertson and P. Seymour. Graph minors. III. Planar tree-width. Journal of Combinatorial Theory, Series B, 36(1):49–64, 1984.
- [57] N. Robertson and P. Seymour. Graph minors. II. Algorithmic aspects of tree-width. Journal of Algorithms, 7(3):309–322, 1986.
- [58] E. Sampathkumar and H. B. Walikar. The connected domination number of a graph. Journal of Mathematical and Physical Sciences, 13:607–613, 1979.
- [59] Z. Shao, J. Amjadi, S. M. Sheikholeslami, and M. Valinavaz. On the total double Roman domination. IEEE Access, 7:52035–52041, 2019.
- [60] C. Sloper. An eccentric coloring of trees. Australasian Journal of Combinatorics, 29:309–321, 2004.
- [61] J. A. Telle. Vertex Partitioning Problems: Characterization, Complexity and Algorithms on Partial -Trees. PhD thesis, University of Oregon, 1994.
- [62] M. Thorup. All structured programs have small tree width and good register allocation. Information and Computation, 142(2):159–181, 1998.
- [63] V. G. Vizing. Vertex colorings with given colors. Diskret. Analiz, 29:3–10, 1976.
- [64] M. Yannakakis and F. Gavril. Edge dominating sets in graphs. SIAM Journal on Applied Mathematics, 38(3):364–372, 1980.
Appendix A Problems definitions
We define here the decision versions of the problems mentioned along the paper. Other similar problems can also be modeled as -locally checkable problems.
A.1. Domination problems
Dominating set [55] | |
---|---|
Instance: | A (weighted) graph and a positive integer . |
Question: | Does there exist of size (weight) at most and such that for every ? |
Total domination [22] | |
---|---|
Instance: | A (weighted) graph and a positive integer . |
Question: | Does there exist of size (weight) at most and such that for every ? |
-tuple domination [42] | |
---|---|
Instance: | A (weighted) graph and a positive integer . |
Question: | Does there exist of size (weight) at most and such that for every ? |
Total -tuple domination [46] | |
---|---|
Instance: | A (weighted) graph and a positive integer . |
Question: | Does there exist of size (weight) at most and such that for every ? |
-domination [31] | |
---|---|
Instance: | A (weighted) graph and a positive integer . |
Question: | Does there exist of size (weight) at most and such that for every ? |
-domination [44] | |
---|---|
Instance: | A graph and a positive integer . |
Question: | Does there exist a function of weight at most and such that for every ? |
-rainbow domination [20] | |
---|---|
Instance: | A graph and a positive integer . |
Question: | Does there exist a function of weight () at most and such that for every vertex for which we have ? |
Semitotal dominating set [37] | |
---|---|
Instance: | A (weighted) graph with no isolated vertex and a positive integer . |
Question: | Does there exist a dominating set of size (weight) at most and such that every vertex in is within distance two of another vertex in ? |
Distance -domination (also called -covering) [54, 45] | |
---|---|
Instance: | A (weighted) graph and a positive integer . |
Question: | Does there exist a set of size (weight) at most and such that every vertex in is within distance from a vertex in ? |
Connected dominating set [58] | |
---|---|
Instance: | A (weighted) graph and a positive integer . |
Question: | Does there exist a dominating set of of size (weight) at most that induces a connected subgraph of ? |
Roman domination [23] | |
---|---|
Instance: | A graph and a positive integer . |
Question: | Does there exist a function of weight at most and such that every vertex for which is adjacent to at least one vertex for which ? |
Grundy total domination [13] | |
---|---|
Instance: | A graph and a positive integer . |
Question: | Does there exist a sequence of distinct vertices of such that , is a dominating set of and for each ? |
A.2. Coloring problems
-coloring [35] | |
---|---|
Instance: | A graph . |
Question: | Does there exist a function such that whenever ? |
List-coloring [28, 63] | |
---|---|
Instance: | A graph and a set of colors for each vertex . |
Question: | Does there exist a proper coloring such that for all ? |
-chromatic sum [51] | |
---|---|
Instance: | A graph . |
Question: | Is there a proper coloring of the graph such that ? |
Additive coloring (also called lucky labeling) [25] | |
---|---|
Instance: | A graph and a positive integer . |
Question: | Does there exist a function such that for every two adjacent vertices the sums of numbers assigned to their neighbors are different (that is, )? |
Acyclic coloring [40] | |
---|---|
Instance: | A graph and a positive integer . |
Question: | Does there exist a -coloring of such that of every subgraph of spanned by vertices of two of the colors is acyclic (in other words, is a forest)? |
-labeling [16] | |
---|---|
Instance: | A graph and a positive integer . |
Question: | Does there exist a labeling of its vertices by integers between and such that adjacent vertices of are labeled using colors at least apart, and vertices having a common neighbor are labeled using colors at least apart? |
A.3. Independence problems
Independent set [35] | |
---|---|
Instance: | A (weighted) graph and a positive integer . |
Question: | Does there exist an independent set of of size (weight) at least ? |
A.4. Packing problems
-packing function [52] | |
---|---|
Instance: | A graph and a positive integer . |
Question: | Does there exist a function of weight at least and such that for every ? |
-limited packing [34] | |
---|---|
Instance: | A graph and a positive integer . |
Question: | Does there exist a function of weight at least and such that for every ? |
Packing chromatic number [14] | |
---|---|
Instance: | A graph and a positive integer . |
Question: | Can be partitioned into disjoint classes where vertices in have pairwise distance greater than ? |
A.5. Problems involving edges
Matching [26] | |
---|---|
Instance: | A(n) (edge weighted) graph and a positive integer . |
Question: | Does there exist a set of pairwise non-adjacent edges of size (weight) at least ? |
Edge domination [64] | |
---|---|
Instance: | A(n) (edge weighted) graph and a positive integer . |
Question: | Does there exist of size (weight) at most and such that every edge in shares an endpoint with at least one edge in ? |
Vertex cover [49] | |
---|---|
Instance: | A (weighted) graph and a positive integer . |
Question: | Does there exist of size (weight) at most and such that every edge in has at least one endpoint in ? |
Edge cover [35] | |
---|---|
Instance: | A(n) (edge weighted) graph and a positive integer . |
Question: | Does there exist of size (weight) at most and such that every vertex in belongs to at least one edge in ? |