Mim-Width III. Graph Powers and Generalized Distance Domination Problems ∗

,


Introduction
Telle and Proskurowski [30] defined the (σ, ρ)-domination problems, or (σ, ρ) problems for short, and the more general locally checkable vertex partitioning problems (LCVP).In (σ, ρ)-domination problems, feasible solutions are vertex sets with constraints on how many neighbors each vertex of the graph has in the set.The framework generalizes important and well-studied problems such as Maximum Independent Set and Minimum Dominating Set, as well as Perfect Code, Minimum subgraph with minimum degree d and a multitude of other problems.See Table 1.Bui-Xuan, Telle and Vatshelle [7] showed that (σ, ρ)-domination and locally checkable vertex partitioning problems can be solved in time XP parameterized by mim-width, if we are given a corresponding decomposition tree.Roughly speaking, the structural parameter mim-width measures how easy it is to decompose a graph along vertex cuts inducing a bipartite graph with small maximum induced matching size [31].
In this paper, we consider distance versions of problems related to independence and domination, such as Distance-r Independent Set and Distance-r Dominating Set.The Distance-r Independent Set problem, also studied under the names r-Scattered Set and r-Dispersion (see e.g.[2] and the references therein), asks to find a set of at least k vertices whose vertices have pairwise distance strictly longer than r.Agnarsson et al. [1] pointed out that it is identical to the original Independent Set problem on the r-th power1 graph G r of the input graph G, and also showed that for fixed r, it can be solved in linear time for interval graphs, and circular arc graphs.The Distance-r Dominating Set problem was introduced by Slater [29] and Henning et al. [15].They as well observed that it is identical to solve the original Dominating Set problem on the r-th power graph.Slater presented a linear-time algorithm to solve Distance-r Dominating Set problem on forests.
We generalize all of the (σ, ρ)-domination and LCVP problems to their distance versions, which naturally captures Distance-r Independent Set and Distance-r Dominating Set.While the original problems put constraints on the size of the immediate neighborhood of a vertex, we consider the constraints to be applied to the ball of radius r around it.Consider for instance the Minimum Subgraph with Minimum Degree d problem; where the original problem is asking for the smallest (in terms of number of vertices) subgraph of minimum degree d, we are instead looking for the smallest subgraph such that for each vertex there are at least d vertices at distance at least 1 and at most r.In the Perfect Code problem, the target is to choose a subset of vertices such that each vertex has exactly one chosen vertex in its closed neighborhood.In the distance-r version of the problem, we replace the closed neighborhood by the closed r-neighborhood.This problem is known as Perfect r-Code, and was introduced by Biggs [4] in 1973.
We show that all these distance problems are in XP parameterized by mim-width if a decomposition tree is given.One of the main results of the paper is of structural nature, namely that for any positive integer r the mim-width of a graph power G r is at most twice the mim-width of G.It follows that we can reduce the distance-r version of a (σ, ρ)-domination problem to its non-distance variant by taking the graph power G r , while preserving small mim-width.
One negative aspect of the mim-width parameter is that we do not know an XP algorithm computing mim-width.The problem of deciding whether a given graph has a decomposition tree of mim-width w is NP-complete in general and W [1]-hard parameterized by w.Determining the optimal mim-width is not in APX unless NP = ZPP, making it unlikely to have a polynomial-time constant-factor approximation algorithm [28].
However, for several graph classes we are able to find a decomposition tree of constant mim-width in polynomial time, using the results of Belmonte and Vatshelle [3].These include; permutation graphs, convex graphs and their complements, interval graphs and their complements (all of which have linear mim-width 1); (circular k-) trapezoid graphs, circular permutation graphs, Dilworth-k graphs, k-polygon graphs, circular arc graphs and complements of d-degenerate graphs.Fomin, Golovach and Raymond [13] showed that we can find linear decomposition trees of constant mim-width for the very general class of H-graphs in polynomial time, given an H-representation of the input graph. 2 For all of the above graph classes, our results imply that the distance-r (σ, ρ)-domination and LCVP problems are polynomial time solvable.
Graphs represented by intersections of objects in some model are often closed under taking powers.For instance, interval graphs, and generally d-trapezoid graphs [1,12], circular arc graphs [1,27], and leaf power graphs (by definition) are such graphs.We refer to [5,Chapter 10.6] for a survey of such results.For these classes, we already know that the distance-r version of a (σ, ρ)-domination problem can be solved in polynomial time.However, this closure property does not always hold; for instance, permutation graphs are not closed under taking powers.Our result implies that to obtain such algorithmic results, we do not need to know that these classes are closed under taking powers; it is sufficient to know that classes have bounded mim-width.To the best of our knowledge, for the most well-studied distance-r (σ, ρ)-domination problem, Distance-r Dominating Set, we obtain the first polynomial time algorithms on Dilworth k-graphs, convex graphs and their complements, complements of interval graphs, k-polygon graphs, H-graphs (given an H-representation of the input graph), and complements of d-degenerate graphs.
We give results that expand our knowledge of the expressive power of mim-width.We show that powers of graphs of tree-width w − 1 or path-width w and powers of graphs of clique-width w have mim-width at most w.In fact, the statement we prove is a slight strengthening, namely: Given a nice tree decomposition of width w, all of whose join bags have size at most w, or a clique-width w-expression of a graph, one can output a decomposition tree of mim-width w of its k-th power in polynomial time.The former implies that leaf power graphs, of importance in the field of phylogenetic studies [8], have mim-width 1.These graphs are known to be strongly chordal and there has recently been interest in delineating the difference between strongly chordal graphs and leaf power graphs, on the assumption that this difference was not very big [22,24].Our result actually implies a large difference, as it was recently shown by Mengel that there are strongly chordal split graphs of mim-width linear in the number of vertices [23].
The natural question to ask after obtaining an XP algorithm is whether we can do better, e. g. can we show that for all fixed r, the distance-r (σ, ρ)-domination problems are in FPT? Fomin et al. [13] answered this in the negative by showing that (the standard, i.e. distance-1 variants of) Maximum Independent Set, Minimum Dominating Set and Minimum Independent Dominating Set problems are W [1]-hard parameterized by (linear) mim-width + solution size.We modify their reductions to extend these results to several families of (σ, ρ)-domination problems, including the maximization variants of Induced Matching, Induced d-Regular Subgraph and Induced Subgraph of Max Degree ≤ d, the minimization variants of Total Dominating Set and d-Dominating Set and both the maximization and the minimization variant of Dominating Induced Matching.
The remainder of the paper is organized as follows.In Section 2 we introduce the (σ, ρ)domination problems and define their distance-r generalization, and we give a short introduction to mim-width.In Section 3 we show that the mim-width of a graph grows by at most a factor 2 when taking (arbitrary large) powers and prove bounds on the mim-width of powers of graphs of bounded tree-width and clique-width.We discuss algorithmic consequences for (σ, ρ) problems and more generally, LCVP problems, in Section 4, and in Section 5 we present the above mentioned lower bounds.Finally, we give some concluding remarks in Section 6.

The Main Concepts
In this section, we introduce the main concepts of the paper.That is, in Section 2.2 we introduce the family of distance-r (σ, ρ)-domination problems, and in Section 2.3 we give a short introduction to the graph parameter mim-width and several of its aspects that are of importance to this work.Before we proceed, we introduce the basic terminology and notation used throughout the paper.

Preliminaries
We let the set of natural numbers be N = {0, 1, 2, . ..}, and the positive natural numbers be N + = N \ {0}.For a set S and a given property ψ, we denote by S ψ the biggest subset of S where ψ is satisfied for all elements.For instance, N + ≤k denotes the set {1, 2, . . .k}.For this particular property, we also use the shorthand [k] . .= N + ≤k .For a set X, we denote by X k the set of all size-k subsets of X.
Basic Notation for Graphs.A graph G is a pair of a vertex set V (G) and an edge set

2
. For an edge {u, v} ∈ E(G), we use the shorthand notation 'uv'.For a set of edges F ⊆ E(G), we denote by V (F ) the set of vertices that are contained in the edges of F , i.e.V (F ) . .= uv∈F {u, v}.A cut of a graph is a 2-partition of its vertex set.
(Induced) Subgraphs.For graphs G and H we say that H is a subgraph of G, denoted by with X = ∅ and Y = ∅, there is an edge xy ∈ E(G) such that x ∈ X and y ∈ Y .A connected graph all of whose vertices have degree two is called a cycle.A graph that does not contain a cycle as a subgraph is called a forest and a connected forest is a tree.The vertices of degree one in a tree are called the leaves and the remaining vertices the internal vertices.A tree of maximum degree two is called a path and the leaves of a path are called endpoints.A tree T is called a caterpillar if it contains a subgraph P ⊆ T such that P is a path and each vertex in V (T ) \ V (P ) has a neighbor in V (P ).The length of a path P is |E(P )|, i.e. the number of its edges.Given a graph G and two of its vertices u, v ∈ V (G), the distance from u to v in G, denoted by dist G (u, v), is the smallest length of any path P ⊆ G with endpoints u and v.
there are no other edges than the edges in M in the subgraph of G induced by V (M ).
such that X and Y are independent sets, and we call a bipartite graph G with partition (X, Multigraphs/Subdivisions. Let G and H be two graphs.A bijection ϕ : If there is an isomorphism from G to H then say that G and H are isomorphic. A multigraph is a pair of a set of vertices V (G) and a multiset of size-2 subsets of V (G), called the edges of G and denoted by E(G).For a (multi-) graph H, we let Let G be a (multi-) graph.An edge subdivision of an edge e ∈ E(G) with endpoints u and v is the operation of adding to G a new vertex x and replacing the edge e by a path with endpoints u and v, consisting of an edge between u and x and an edge between x and v.We call the vertex x a subdivision vertex.A graph G is called a subdivision of G if it can be obtained from G by a series of edge subdivisions.

Distance-r (σ, ρ)-Domination Problems
Let σ and ρ be finite or co-finite subsets of the natural numbers σ, ρ ⊆ N.For a graph G, a vertex set S ⊆ V (G) is a (σ, ρ)-dominating set, or simply (σ, ρ) set if -for each vertex v ∈ S it holds that |N (v) ∩ S| ∈ σ, and For instance, a ({0}, N) set is an independent set as there are no edges between the vertices in the set, and we do not care about adjacencies between S and V (G) \ S. For another example, a (N, N + )-set is a dominating set as we require that for each vertex in V (G) \ S, it has at least one neighbor in S.
We naturally generalize (σ, ρ)-domination problems to their distance-r version: For a graph G and a vertex v ∈ V (G), let N r G (v) denote the ball of radius r around v, i. e.Let σ and ρ be finite or co-finite subsets of N.Then, a vertex set S ⊆ V (G) is called a distance-r (σ, ρ)-dominating set, if -for each vertex v ∈ S it holds that |N r (v) ∩ S| ∈ σ, and We associate with these sets minimization, maximization, and existence problems in the natural way.
The d-value of a distance-r (σ, ρ) problem is a constant which will ultimately affect the runtime of the algorithm.For a set µ ⊆ N, the value d(µ) should be understood as the highest value in N we need to enumerate in order to describe µ.Hence, if µ is finite, it is simply the maximum value in µ, and if µ is co-finite, it is the maximum natural number not in µ (1 is added for technical reasons).

Mim-width and Applications
Maximum induced matching width, or mim-width for short, was introduced in the Ph.D. thesis of Vatshelle [31], used implicitly by Belmonte and Vatshelle [3], and is a structural graph parameter defined over decomposition trees (sometimes called branch decompositions), similar to graph parameters such as rank-width and module-width.Decomposition trees naturally appear in divide and conquer style algorithms where one recursively partitions the pieces of a problem into two parts.When the algorithm is at the point where it combines solutions of its subproblems to form a full solution, the structure of the cuts are (unsurprisingly) important to the runtime; this is especially true for dynamic programming when one needs to store multiple partial solutions at each intermediate node.We will briefly introduce the necessary machinery here, but for a more comprehensive introduction we refer the reader to [31].
A graph of maximum degree at most 3 is called subcubic.A decomposition tree for a graph G is a pair (T, L) where T is a subcubic tree and L : V (G) → L(T ) is a bijection between the vertices of G and the leaves of T .Each edge e ∈ E(T ) naturally represents a cut of G, i. e. a 2-partition of V (G): Let T e 1 and T e 2 denote the two connected components of T − e.For i ∈ [2], let A e i denote the set of vertices that are mapped to leaves in T e i via L.Then, (A e 1 , A e 2 ) is a cut of G which in the following we refer to as the cut associated with e.One way to measure the complexity of a cut is by considering the maximum size of an induced matching in the bipartite subgraph of G that it induces.For a vertex set A ⊆ V (G), we let mim G (A) denote the maximum size of an induced matching in Definition 2 (mim-width).Let G be a graph, and let (T, L) be a decomposition tree for G.The mim-width of (T, L) is defined as mimw G (T, L) . .= max where for an edge e ∈ E(T ), (A e 1 , A e 2 ) denotes the cut associated with e.The mim-width of the graph G, denoted mimw(G), is the minimum value of mimw G (T, L) over all possible decomposition trees (T, L).The linear mim-width of the graph G is the minimum value of mimw G (T, L) over all possible decomposition trees (T, L) where T is a caterpillar.
Note that the definition of a decomposition tree (T, L) allows T to have nodes of degree two.Suppose there is a node t ∈ V (T ) of degree two with incident edges e 1 and e 2 .Then, up to renaming the sets, we have that A e 1 1 = A e 2 1 and A e 1 2 = A e 2 2 , where for i ∈ [2], (A e i 1 , A e i 2 ) is the cut associated with e i .Let t i denote the endpoint of e i other than t.The observation we just made implies that the decomposition tree (T , L), where T is obtained from T by removing t and making t 1 and t 2 adjacent, is equivalent to (T, L) both in terms of their mim-width, as well as their structural properties.To that end, for ease of exposition, we will assume in algorithmic applications that a decomposition tree does not have degree two nodes, while when proving bounds on the mim-width of some decomposition tree, we may allow it to have degree two nodes.
Given a decomposition tree, one can subdivide an arbitrary edge and let the newly created vertex be the root of T , in the following denoted by r.For two nodes t, t ∈ V (T ), we say that t is a descendant of t if t lies on the path from r to t in T .For t ∈ V (T ), we denote by V t the set of vertices that are mapped to a leaf that is a descendant of t, i.e.
In previous work, Bui-Xuan et al. [7] and Belmonte and Vatshelle [3] showed that all (σ, ρ) problems can be solved in time n O(w) where w denotes the mim-width of a decomposition tree that is provided as part of the input.As we state the runtime bounds more tightly than what can be read from the statements in the original works, we provide a sketch of the proof of the following result due to [3,7], mainly focusing on aspects that affect the runtime rather than the correctness of the algorithms.

Proposition 3 ([3, 7]
).There is an algorithm that given a graph G and a decomposition tree (T, L) of G with w . .= mimw G (T, L) solves each (σ, ρ) problem Π with d . .= d(Π) Sketch of the Proof.For a positive integer d, and a set A ⊆ V (G), we call two subsets X ⊆ A and Y ⊆ A d-neighbor equivalent w.r.t.A, and we write We denote by nec(≡ d A ) the number of equivalence classes of ≡ d A , and for X ⊆ A, by rep d A (X) an equivalence class representative for X.
The crucial insight that makes the dynamic programming algorithm work within the claimed runtime bound is: when tabulating the partial solutions with respect to a node t ∈ V (T ), it suffices to store one optimum partial solution for each pair (R t , R t ), where R t is an equivalence class representative for ≡ d Vt and R t is an equivalence class representative for ≡ d Vt .In this way, an upper bound on nec(≡ d A ) gives an upper bound on the number of table entries to be considered.Now, let be a leaf of T and v ∈ V (G) be such that L(v) = .Then, there are two equivalence classes for ≡ d {v} , and d + 1 equivalence classes for ≡ d V (G)\{v} , so we only have O(d) partial solutions to consider.For an internal node t ∈ V (T ) with children a and b, we can compute the necessary partial solutions in the following way.For each triple (R a , R b , R t ) of an equivalence class representative R a of ≡ d Va , an equivalence class representative R b of ≡ d V b , and an equivalence class representative , and update the table entry for (R t , R t ) according to the partial solution obtained from combining the partial solution stored for (R a , R a ) with the one stored for Next, there are at most nec d (T, L) 3 triples of equivalence class representatives to consider, and the remaining computations take time at most O(n 3 ), applying the latter of the two aforementioned tasks (finding a pointer to an equivalence class representative), and noting that each representative is of size at most O(n), and that log(nec d (T, L)) ≤ O(n).Therefore, we compute all table entries for t ∈ V (T ) in time at most O(nec d (T, L) 3 • n 3 ) .As |V (T )| = O(n), and the computation for a leaf node takes constant time, the whole algorithm takes time at most O(nec d (T, L) 3 • n 4 ).
. Hence the dynamic programming algorithms that we sketched above run in time O(n 4+3d•w ), where w = mimw(T, L), proving item (ii).For item (i), we observe that for an internal node t ∈ V (T ) with children a and b such that b is a leaf node, the number of triples to consider reduces to O(nec d (T, L) 2 ), as there are only O(1) many equivalence class representatives to consider for ≡ d V b .If T is a caterpillar, then each internal node of T is of that shape, implying that in this case, the algorithms run in time O(n 4+2d•w ).

Mim-width on Graph Powers
In this section we discuss the structural results of this work, regarding the mim-width of graph powers.These are formally defined as follows.
Definition 4 (The r-th Power of a Graph).Let r be a positive integer and let G = (V, E) be a graph.The r-th power of G, denoted G r , is the graph obtained from G by adding, for each pair of distinct non-adjacent vertices u, v ∈ V (G) with dist G (u, v) ≤ r, the edge uv.
We show in Section 3.1 that taking an (arbitrarily large) power of a graph only increases its mim-width by a factor of at most two.In Section 3.2 we prove results concerning powers of graphs of bounded tree-width and clique-width.

Arbitrary Graphs
Theorem 5. Let r be a positive integer and let G be a graph.Then, mimw(G r ) ≤ 2 • mimw(G).Moreover, any decomposition tree of G of mim-width w has mim-width at most 2w for G r .
Proof.Assume that there is a decomposition tree of mim-width w for the graph G.We show that the same decomposition tree has mim-width at most 2w for G r .
We consider a cut (A, A) associated with some edge of the decomposition tree.Let M be a maximum induced matching across the cut for G r .To prove our claim, it suffices to construct an induced matching M in G across the cut (A, A) such that |M | ≥ |M | 2 .We begin by noticing that for an edge uv ∈ M , the distance between u and v is at most r in G.For each such edge uv ∈ M , we let P uv denote some shortest path between u and v in G (including the endpoints u and v).
Claim 5.1.Let uv, wx ∈ M be two distinct edges of the matching.Then P uv and P wx are vertex disjoint.
Proof.We may assume that u, w ∈ A and v, x ∈ A. Now assume for the sake of contradiction there exists a vertex y ∈ V (P uv ) ∩ V (P wx ).Because both paths have length at most r, we have that Since uv and wx are both in M , there cannot exist edges ux and wv in G r .Hence, their distance in G is strictly greater than r, i.e. dist G (u, y) Putting these together, we obtain our contradiction: This concludes the proof of the claim.Because for each uv ∈ M , one endpoint of P uv lies in A and the other one lies in A, there must exist at least one point at which the path crosses from A to A. For each uv ∈ M with u ∈ A and v ∈ A, we let u v ∈ E(P uv ) denote an edge in G such that u ∈ A and v ∈ A.
We plan to construct our matching M by picking a subset of such edges.However, we cannot simply take all of them, since some pairs may be incompatible in the sense that they will not form an induced matching across the cut (A, A).We examine the structures that arise when two such edges u v and w x are incompatible, and cannot both be included in the same induced matching across the cut.For easier readability, we let α d be a shorthand notation for dist G (α, α ) for α ∈ {u, v, w, x}.
Claim 5.2.Let uv, wx ∈ M with {u, w} ⊆ A and {v, x} ⊆ A be two distinct edges of M and let u v and w x be edges on the shortest paths as defined above.If there is an edge u x ∈ E(G), then all of the following hold.See Figure 1.
Proof.(a) Since ux is not an edge in G r , the distance between u and x must be at least r + 1 in G, and so u d + x d must be at least r.It remains to show that u d + x d ≤ r for equality to hold.Similarly to the proof of Claim 5.1, we know that P uv and P wx both are of length at most r.We get ( The '−2' at the end is because we do not include the length contributed by edges u v and w x in our sum.Now assume for the sake of contradiction that u d + x d ≥ r + 1.Then we get that and the edge vw would hence exist in G r .This contradicts that uv and wx were both in the same induced matching M .(b) Assume for the sake of contradiction that u d + v d ≤ r − 2.Then, rather than Equation 1, we get the following bound: We will now construct our induced matching M .(Recall for the following arguments that u ∈ A and v / ∈ A.) We construct two candidates for M , and we will pick the biggest one.First, we construct M 0 by including u v for each edge uv ∈ M where dist G (u, u ) is even.Symmetrically, M 1 is constructed by including u v if dist G (u, u ) is odd.Clearly, at least one of M 0 and M 1 contains at least |M | 2 edges.It remains to show that M indeed forms an induced matching across the cut (A, A) in G.
Consider two distinct edges u v and w x from M .By Claim 5.1, the corresponding paths P uv and P wx are vertex disjoint.If there is an edge violating that u v and w x are both in the same induced matching, it must be either u x or v w .Without loss of generality we may assume it is an edge of the type u x .By Claim 5.2(c), we then have that the parities of dist G (u, u ) and dist G (w, w ) are different.However, by the construction of M , this is not possible.This concludes the proof.

Graphs of Bounded Tree-Width or Clique-Width
In [31, Section 4.2], it is shown that any graph of clique-width w or tree-width w − 1 has mim-width at most w.Theorem 5 hence implies that any power of a graph of clique-width w or tree-width w − 1 has mim-width at most 2w.In this section we give tighter bounds on the mim-width of powers of graphs of bounded clique-width and powers of graphs of bounded tree-width.
In particular, we show that r-th powers of graphs of tree-width w − 1, path-width w, or cliquewidth w all have mim-width at most w.We begin by proving the bound for graphs of bounded tree-width with the following lemma capturing the essential property used in the proof.Lemma 6.Let r and w be positive integers and let (A, B, C) be a vertex partition of graph G such that there are no edges between A and C and B has size w.
Suppose for a contradiction that mim H (A ∪ B) > w.Let {y 1 z 1 , y 2 z 2 , . . ., y t z t } be an induced matching of size t ≥ w + 1 in H[A ∪ B, C].There are distinct integers t 1 , t 2 ∈ {1, 2, . . ., t} and an integer j ∈ {1, 2, . . ., w} such that which contradicts the assumption that y t 1 z t 2 and y t 2 z t 1 are not edges in H.We conclude that mim H (A ∪ B) ≤ w.Definition 7. A tree decomposition of a graph G is a pair (T, B) consisting of a tree T and a family B = {B t } t∈V (T ) of sets B t ⊆ V (G), called bags, satisfying the following three conditions: (ii) for every edge uv of G, there exists a node t of T such that u, v ∈ B t , and The width of a tree decomposition (T, B) is max{|B t | − 1 : t ∈ V (T )}.The tree-width of G is the minimum width over all tree decompositions of G.A tree decomposition (T, B = {B t } t∈V (T ) ) is a nice tree decomposition with root node r ∈ V (T ) if T is a rooted tree with root node r, and every node t of T is one of the following: (1) A leaf node, i.e. t is a leaf of T and B t = ∅.
(2) An introduce node, i.e. t has exactly one child t and B t = B t ∪ {v} for some v ∈ V (G) \ B t .
(3) A forget node, i.e. t has exactly one child t and B t = B t \ {v} for some v ∈ B t .
(4) A join node, i.e. t has exactly two children t 1 and t 2 , and Theorem 8. Let r and w be positive integers and G be a graph that admits a nice tree decomposition of width w, all of whose join bags are of size at most w.Then the r-th power of G has mim-width at most w.Furthermore, given such a nice tree decomposition, we can output a decomposition tree of mim-width at most w in polynomial time.
Proof.Let H . .= G r , and let (T, B = {B t } t∈V (T ) ) be a nice tree decomposition of G of width w, all of whose join bags have size at most w, with root node r.We may assume that B r = ∅ and subsequently that r is a forget or a join node.(Otherwise, we add a path of forget nodes on top of r and make the last node the new root of T .) We obtain a decomposition tree (T , L) as follows: -Let T be the tree obtained from T by, for each forget node t ∈ V (T ) forgetting a vertex v, attaching a leaf node v to t, and assigning L(v) . .= v .
-We obtain T from T by deleting degree 1 nodes that are not assigned by L.
Since r is either a forget node or a join node in (T, B), r has not been removed in the second step, so r ∈ V (T ), and r has degree 2 in T .Furthermore, since for each vertex v ∈ V (G), there is a unique forget node forgetting v in (T, B), and all leaves that are not assigned by L have been removed, the map L constructed above is a bijection.Thus, (T , L) is a (rooted) decomposition tree with root node r.
We consider a cut (V t , V t ) for some node t ∈ V (T ) in the rooted decomposition tree.If t is a leaf node, then mim H (V t ) ≤ 1. Assume t is an internal node, then t also appears in (T, B).Note that V t consists precisely of all vertices that have been forgotten below t in (T, B).We argue that we can find a set of at most w vertices S ⊆ V t such that S separates V t from V t \ S which by Lemma 6 will yield the claim.
Let S . .= N (V t ) ∩ V t and consider a vertex x ∈ S. By definition, x is a neighbor of some vertex y that has been forgotten below t.By (ii) of the definition of a tree decomposition there is a node, say t , such that B t contains both x and y.Since y has been forgotten below t, t is below t.As x ∈ V t , there is also a node above t, say t , such that B t contains x (e.g. the bag below the one that forgets x).Since t lies on the path between t and t in T , we have by property (iii) of the definition of a tree decomposition that x ∈ B t .We have that S ⊆ B t .
Furthermore, S separates V t from V t \ S. If t is a forget node, then by definition |B t | ≤ w and hence |S| ≤ w.If t is a join node, then by assumption |B t | ≤ w and hence |S| ≤ w.If t is an introduce node introducing a vertex u ∈ V (G), then u cannot have any neighbor in V t , since all vertices in V t have been forgotten below t.Hence, S ⊆ B t \ {u} and we can conclude that |S| ≤ w.
It is well-known (see e.g.[21]) that any tree decomposition can be transformed in polynomial time to a nice tree decomposition of the same width.As in a tree decomposition of width w − 1, all bags (in particular bags at join nodes) have size at most w, the previous theorem implies the following.Note that the bound for pathwidth is slightly tighter than the one for tree-width, as in a path decomposition there are no join nodes.Corollary 9. Let r and w be positive integers and let G be a graph of tree-width w − 1 (path-width w).Then the r-th power of G has mim-width at most w and given a tree decomposition (path decomposition) of G of width w − 1 (w), one can compute a decomposition tree of mim-width w in polynomial time.
The following notions are of importance in the field of phylogenetic studies, i.e. the reconstruction of ancestral relations in biology, see e.g.[8].A graph G is a leaf power if there exists a threshold r and a tree T , called a leaf root, whose leaf set is V (G) such that uv ∈ E if and only if the distance between u and v in T is at most r.Similarly, G is called a min-leaf power if uv ∈ E if and only if the distance between u and v in T is more than r.Thus, G is a leaf power if and only if its complement is a min-leaf power.It is easy to see that trees admit nice tree decompositions all of whose join bags have size 1 and since every leaf power graph is an induced subgraph of a power of some tree, it has mim-width at most 1 by Theorem 8. Together with [31,Lemma 3.7.3],stating that the mim-width of a graph is 1 if and only if the mim-width of its complement is 1, we have the following result.
Corollary 10.The leaf powers and min-leaf powers have mim-width at most 1 and given a leaf root, we can compute in polynomial time a decomposition tree witnessing this.
Next, we consider powers of graphs of bounded clique-width.A graph is w-labeled if there is a labeling function f : V (G) → [w], and we call f (v) the label of v.For a w-labeled graph G, we call the set of all vertices with label i the label class i of G.The following can be thought as a generalization of Lemma 6. Proof.Suppose for contradiction that mim H (A) > w.Let {y 1 z 1 , y 2 z 2 , . . ., y t z t } be an induced matching of size at least w + 1 in H[A, B].For i ∈ {1, 2, . . ., t}, there is a path P i of length at most r from y i to z i in G. Let A * ⊆ A be the set of vertices in A that have a neighbor in B. Let Q i be the subpath of P i from the last vertex in A * to z i , and q i be the endpoint of Q i different from z i , and let R i be the subpath of P i from y i to q i .Let a i be the length of R i and b i be the length of Q i .By construction, a i + b i ≤ r.
(For an illustration of the following argument, see Figure 2.) Since t ≥ w + 1, there are two integers t 1 , t 2 ∈ {1, 2, . . ., t} such that q t 1 and q t 2 are contained in the same label class of G In this case, we show that the distance from y t 1 to z t 2 in G is at most r, which contradicts the assumption that y t 1 z t 2 is not an edge of H.Note that two vertices in a label class of G[A] have the same neighborhood in B. Let x denote the vertex on Q t 2 that is adjacent to q t 2 .Then, as q t 1 and q t 2 are in the same label class of G[A], we have that q t 1 is also adjacent to Analogously we can show that if ] contains a path of length at most r from y t 2 to z t 1 .But this is a contradiction and we conclude that mim H (A) ≤ w.
Definition 12.The clique-width of a graph G is the minimum number of labels needed to construct G using the following four operations: (1) Creation of a new vertex v with label i (denoted by i(v)).
(2) Disjoint union of two labeled graphs G and H (denoted by G ⊕ H).
(3) Joining by an edge each vertex with label i to each vertex with label j (i = j, denoted by η i,j ).( 4) Renaming label i to j (denoted by ρ i→j ).
A string of operations given in the previous definition is called a clique-width w-expression or shortly a w-expression if it uses at most w distinct labels.We can represent this expression as a tree-structure and such trees are known as syntactic trees associated with w-expressions.An easy observation is that for a node t in a syntactic tree associated with a w-expression, and the vertex set V t consisting of vertices introduced in some descendants of t, G[V t ] is a w-labeled graph where two vertices in the same label class has the same neighborhood in V (G) \ V t .
Theorem 13.Let r and w be positive integers and G be a graph of clique-width w.Then the r-th power of G has mim-width at most w.Furthermore, given a clique-width w-expression, we can output a decomposition tree of mim-width at most w in polynomial time.
Proof.Let H be the r-th power of G and let φ be the given clique-width w-expression defining G, and T be the syntactic tree of φ with root node r.We can assume that G contains at least two vertices which implies that T has at least one join node.Let r be the join node in T with minimum dist T (r, r ).Note that if r itself is a join node, then r = r.Note also that for every vertex v of G, there is a node of T creating v, see the first operation in the definition of clique-width.In the following, we call such a node an introduce node.We obtain a decomposition tree (T , L) as follows: -We obtain T from T as follows: If r = r , we first remove all vertices in the path from r to r in T other than r .We fix r to be the root node of T .
-For each introduce node v introducing a vertex v, we assign L(v) . .= v .
For the first step, note that if the root r of T is not a join node, then it must have degree one in T .This implies that T is connected, and that each introduce node is a descendant of r .Consider a cut (V t , V t ) for some t ∈ V (T ), where V t is the set of vertices that are introduced below t in T , and note that by construction this is also the set of vertices of G that are mapped to leaves in the subtree of T rooted at t.If t is a leaf node, then mim H (V t ) ≤ 1. Assume t is an internal node.
Then t also appears in T .We observe that G[V t ] is a w-labeled graph such that for any pair of vertices x, y in the same label class, x and y have the same neighborhood in V (G) \ V t .So we can apply Lemma 11 to conclude that we have mim H (V t ) ≤ w which implies that H has mim-width at most w.

Algorithmic Consequences
Using the results from the previous section, we now give algorithmic consequences for distance-r versions of (σ, ρ) problems and more generally of LCVP problems (introduced below).In particular, the results in this section follow from Theorem 5 which states that taking an arbitrary power of a graph never increases its mim-width by more than a factor of two.The second ingredient is the following simple observation about neighborhoods of r-th powers of graphs.
Observation 14.For a positive integer r, a graph G and a vertex u ∈ V (G), the r-neighborhood of u is equal to the neighborhood of u in G r , i.e.N r G (u) = N G r (u).The observation above shows that solving a distance-r (σ, ρ) problem on G is the same as solving the same standard distance-1 variation of the problem on G r .Hence, we may reduce our problem to the standard version by simply computing the graph power.Combining Theorem 5 with the algorithms provided in Proposition 3, we have the following consequence.Proof.Let G be the input graph and (T, L) the provided decomposition tree.We apply the following algorithm: Step 1. Compute the graph G r .
Step 2. Solve the standard (distance-1) version of the problem on G r , providing (T, L) as the decomposition tree.
Step 3. Return the answer of the algorithm ran in Step 2 without modification.
Computing G r in Step 1 takes at most O(n 3 ) time using standard methods, Step 3 takes constant time.The worst time complexity is hence found in Step 2. By Theorem 5, the mim-width of (T, L) on G r is at most twice that of the same decomposition on G.The stated runtime then follows from Proposition 3. The correctness of this procedure follows immediately from Observation 14.
LCVP Problems.A generalization of (σ, ρ) problems are the locally checkable vertex partitioning (LCVP) problems which we now discuss.A degree constraint matrix D is a q × q matrix where each entry is a finite or co-finite subset of N. For a graph G and a partition of its vertices V = {V 1 , V 2 , . . .V q } (where some parts of the partition may possibly be empty), we say that it is a D-partition if and only if, for each i, j ∈ [q] and each vertex v For instance, let D 3 be the 3 × 3 matrix whose diagonal entries are {0} and the non-diagonal ones are N, i. e.
Then, a graph G admits a 3-coloring if and only if it admits a D 3 -partition.
Typically, the natural algorithmic questions associated with LCVP properties are existential. 3nteresting problems which can be phrased in such terms include the H-Covering and Graph H-Homomorphism problems where H is fixed, as well as q-coloring, Perfect Matching Cut and more.We refer to [30] for an overview.
We generalize LCVP properties to their distance-r version, by considering the ball of radius r around each vertex rather than just the immediate neighborhood.
Definition 16 (Distance-r neighborhood constraint matrix).A distance-r neighborhood constraint matrix D is a q × q matrix where each entry is a finite or co-finite subset of N. For a graph G and a partition of its vertices V = {V 1 , V 2 , . . .V q } (where some parts of this partition may be empty), we say that it is a D-distance-r-partition if and only if, for each i, j ∈ [q] and each vertex v We say that an algorithmic problem is a distance-r LCVP problem if the property in question can be described by a distance-r neighborhood constraint matrix.For example, the distance-r version of a problem such as q-coloring can be interpreted as an assignment of at most q colours to vertices of a graph such that no two vertices are assigned the same colour if they are at distance r or closer.
For a given distance-r LCVP problem Π, its d-value d(Π) is the maximum d-value over all the sets in the corresponding neighborhood constraint matrix.
As in the case of (σ, ρ) problems, combining Theorem 5 with Observation 14 and the works [3,7] we have the following result.
Corollary 17.There is an algorithm that for all r ∈ N, given a graph G and a decomposition tree (T, L) of G with w . .= mimw G (T, L) solves each distance-r LCVP problem Π with d . .= d(Π) As we state the runtime bounds in the previous corollary in a different way than in [7] where they have been proved first, we would like to note that this is justified by an argument parallel to the one we provided in the sketch of the proof of Proposition 3 presented in this work.

Lower Bounds
We show that several (σ, ρ) problems are W[1]-hard parameterized by linear mim-width plus solution size.Our reductions are based on two recent reductions due to Fomin, Golovach and Raymond [13] who showed that Independent Set and Dominating Set are W[1]-hard parameterized by linear mim-width plus solution size.In fact they show hardness for the above mentioned problems on H-graphs (the parameter being the number of edges in H plus solution size) which we now define formally.
Definition 18 (H-Graph).Let X be a set and S a family of subsets of X.The intersection graph of S is a graph with vertex set S such that S, T ∈ S are adjacent if and only if S ∩ T = ∅.Let H be a (multi-) graph.We say that G is an H-graph if there is a subdivision H of H and a family of subsets We make an immediate observation from the definition of H-graphs that will be useful in later proofs of this section.For a graph H, we can construct a H-representation of itself: We subdivide each edge of H once to obtain H .Then, we create an H-representation M of H by adding for each Observation 19.Any graph H is an H-graph.
All of the hardness results presented in this section are obtained via reductions to the respective problems on H-graphs, and the hardness for linear mim-width follows from the following proposition.
Proposition 20 (Theorem 2 in [13]).Let G be an H-graph.Then, G has linear mim-width at most 2 • ||H|| and a corresponding decomposition tree can be computed in polynomial time given an H-representation of G.

Maximization Problems
The first lower bound concerns several maximization problems that can be expressed in the (σ, ρ) framework.Recall that the (Maximum) Independent Set problem can be formulated as Max-({0}, N).The following result states that a large class of (σ, ρ) maximization problems that are related to the Independent Set problem according to their (σ, ρ) formulation are W [1]-hard on H-graphs parameterized by ||H|| plus solution size.These problems include Induced Matching, Dominating Induced Matching, Induced d-Regular Subgraph, and Induced Subgraph of Maximum Degree d, see Table 1 for the details.Proof.To prove the theorem, we provide a reduction from Multicolored Clique where given a graph G and a partition V 1 , . . ., V k of V (G), the question is whether G contains a clique of size k using precisely one vertex from each V i (i ∈ [k]).This problem is known to be W [1]-complete [11,25].
Let (G, V 1 , . . ., V k ) be an instance of Multicolored Clique.We can assume that k ≥ 3 and that (Note that adding isolated vertices does not change the answer to the problem.)For i ∈ [k], we denote by v i 1 , . . ., v i p the vertices of V i .We first describe the reduction of Fomin et al. [13] and then explain how to modify it to prove the theorem.
The subdivisions done for a pair (i, j).
Figure 3: Illustration of the construction of Fomin et al. [13].
The Construction of Fomin, Golovach and Raymond [13].The graph H is obtained as follows, see Figure 3a.
2. For every 1 ≤ i < j ≤ k, construct a node w i,j and two pairs of parallel edges u i w i,j and u j w i,j .
We then construct the subdivision H of H by first subdividing each edge p times.We denote the subdivision nodes for 4 edges of H constructed for each pair 1 p , and y (j,i) 1 , . . ., y (j,i) p .This subdivision process is depicted in Figure 3b.To simplify notation, we assume that We now construct the H-graph G by defining its H-representation M = {M v } v∈V (G ) where each M v is a connected subset of V (H ).(Recall that G denotes the graph of the Multicolored Clique instance.)1.For each i ∈ [k] and s ∈ [p], construct a vertex z i s with model s,t with: Throughout the following, for i ∈ [k] and 1 ≤ i < j ≤ k, we use the notation , respectively.We now observe the crucial property of G .Observation 21.1 (Claim 18 in [13]).For every 1 We now describe how to obtain from G a graph G that will be the graph of the instance of Max-(σ * , N ≥x ) Domination, by adding a gadget attached to each set Z(i) and R(i, j) (for all 1 ≤ i < j ≤ k).
The graph G is obtained from G by adding the gadgets B(Z(i)) for all i ∈ [k] and the gadgets B(R(i, j)) for all 1 ≤ i < j ≤ k.To prove the theorem, we require G to be a K-graph for some graph K whose number of edges is bounded by a function of k, and possibly d, as d is fixed.We will show that G is a K-graph for some supergraph K of H that meets this requirement.
Motivated by Observation 19, and the fact that the bipartite graph in each gadget B(•) has O(d 2 ) edges, we do the following to obtain K from H: For each i ∈ [k], we add the gadget B({u i }), which will be used to encode B(Z(i)) in G ; furthermore, for each 1 ≤ i < j ≤ k, we add the gadget B({w (i,j) }), which will be used to encode B(R(i, j)) in G .For an illustration of K, see Figure 4. We obtain a subdivision K of K as follows: (K1) For all edges in E(K) ∩ E(H), we do the same subdivisions that were made to obtain H from H.
(K2) For each gadget B(•), we perform the edge subdivisions due to Observation 19 that allow for encoding the bipartite graph in B(•) as a B(•)-graph.
Then, for each h ∈ [d], we subdivide the edge u i β i 1,h , and denote the corresponding subdivision node by s(i, h).(K4) Similarly, for each 1 2,d−1 } be the vertices of B({w (i,j) }).Then, for each h ∈ [d], we subdivide the edge u i β (i,j) 1,h , and denote the corresponding subdivision node by s((i, j), h).

We now give the
, where each M v is a connected subset of V (K ); for an illustration of G see Figure 5.
, where M v is the model of v defined given in the construction of Fomin et al. which we described above.Note that each such vertex is either some vertex z i s or some vertex r (i,j) s,t for appropriate choices for i, j, s, and t.
. By the subdivisions we did in Step K2, we obtain a corresponding complete bipartite graph on vertices , comes with a model from the subdivision of the complete bipartite graph of B({u i }), which we initially use as M b i t,h .(R3) We proceed analogously to Step R2 with each B({w (i,j) }), where 1 ≤ i < j ≤ k. (R4) For each i ∈ [k], and each h ∈ [d], we add the node s(i, h) to the models of z i s for all s ∈ [p], and we add s(i, h) to the model (in we add the node s((i, j), h) to the model of r (i,j) s,t , and we add s((i, j), h) to the model (in M ) of b We count the size of K.
We introduce some more notation.For 1 . We furthermore use the notation We now turn to the correctness proof of the reduction.We let k . .= 2d • (k + k 2 ) and show that G has a multicolored clique if and only if G has a (σ * , N ≥x ) set of size k .We first prove the forward direction.Note that the following claim yields the forward direction of the correctness proof, since a ({d}, {d + 1, . . ., d Proof.Let {v 1 h 1 , . . ., v k h k } be the vertex set in G that induces the multicolored clique.By Observation 21.1 we can verify that is an independent set in G .We let S . .= I ∪ B and observe that S is a ({d}, {d + 1, . . ., d + k}) set: By construction, there is no edge between any pair of distinct sets of B(i), B(i ), B(i, j), B(i , j ), for any choice of 1 ≤ i < j ≤ k and 1 ≤ i < j ≤ k.Consider any vertex x ∈ S and suppose that x ∈ Z +B (i) for some i ∈ [k].(The case when x ∈ R +B (i, j) can be argued for analogously.)Let y ∈ V (G ) \ S and note that ( Since the only additional neighbors of y in S are in the set R i . .= 1≤j<i R(j, i) ∪ i<j≤k R(i, j) and R i ∩ S ⊆ I, we can conclude that |N (y) ∩ (S \ B)| ≤ k − 1, since I contains precisely one vertex from each set R(i, j).We have argued that d + 1 ≤ |N (y) ∩ S| ≤ d + k.If y ∈ R(i, j) for some 1 ≤ i < j ≤ k, we can argue as before that |N (y) ∩ S| ≥ d + 1 and since all neighbors of y in S \ B(i, j) are contained either in Z(i) or Z(j), we can conclude that d It remains to count the size of S. Clearly, |I| = k + k 2 and as observed above, |B| = (2d − 1)(k + k 2 ), so We now prove the backward direction of the correctness of the reduction.We begin by making several observations about the structure of (σ * , N ≥x ) sets in the graph G .
(ii) Any (σ * , N ≥x ) set contains at most 2d vertices from each Z +B (i) or R +B (i, j).
(iii) If a (σ * , N ≥x ) set S contains 2d vertices from some Z +B (i) (R +B (i, j)), then it contains at least one vertex from Z(i) (R(i, j)) and each such vertex in S ∩ Z(i) (S ∩ R(i, j)) has at least d neighbors in S ∩ Z +B (i) (S ∩ R +B (i, j)).
Proof.(i) We prove the claim for a set Z(i) ∪ B 1 (i).The proof for a set R(i, j) ∪ B 1 (i, j) works analogously.Suppose for the sake of a contradiction that there is a set S ⊆ V (G ) that contains at least d + 2 vertices from some Z(i) ∪ B 1 (i).Since |B 1 (i)| = d, we know that S contains a vertex from Z(i), say x.However, by construction, all vertices in S ∩ (Z(i) ∪ B 1 (i)) \ {x} are adjacent to x, implying that x has at least d + 1 neighbors in S, a contradiction with the fact that S is a (σ * , N ≥x ) set.
(ii) follows as a direct consequence, since (iii).The claim that S contains at least one vertex from , of which there are at least d as we just argued, are neighbors of x.Similar for R +B (i, j).
Equipped with the previous claim, we can now finish the correctness proof of the reduction.
Proof.Let S be a (σ * , N ≥x ) set of size k in G .By Claim 21.3(ii), we can conclude that S contains precisely 2d vertices from each Z +B (i) and each R +B (i, j) (where 1 ≤ i < j ≤ k).Consider any pair i, j with 1 ≤ i < j ≤ k.By Claim 21.3(iii) we know that there are vertices z i s i ∈ Z(i) ∩ S, z j s j ∈ Z(j) ∩ S, and r (i,j) . By Observation 21.1, we then have that s i = t i and s j = t j .We can conclude that v i s i v j s j ∈ E(G) and since the argument holds for any pair of indices i, j, G has a multicolored clique.
We would like to remark that by the proof of the previous claim, we have established that any (σ * , N ≥x ) set S in G of size k in fact contains all vertices from B and one vertex from each Z(i) and from each R(i, j).Since this is precisely the shape of the set constructed in the forward direction of the correctness proof, this shows that any (σ * , N ≥x ) set of size k in G is a ({d}, {d+1, . . ., d+k}) set (assuming k ≥ 3).

Minimization Problems
In this section we prove W [1]-hardness of minimization versions of several (σ, ρ) problems parameterized by linear mim-width plus solution size.We obtain our results by modifying a reduction from Multicolored Independent Set to Minimum Dominating Set on H-graphs parameterized by solution size plus ||H|| due to Fomin et al. [13].In the Multicolored Independent Set problem we are given a graph G and a partition V 1 , . . ., V k of its vertex set V (G) and the question is whether there is an independent set {v 1 , . . ., -hardness of this problem follows immediately from the W[1]-hardness of the Multicolored Clique problem.The Reduction of Fomin et al. [13].Let G be an instance of Multicolored Independent Set with partition V 1 , . . ., V k of V (G).Again we can assume that k ≥ 3 and that |V i | = p for all i ∈ [k].If the latter condition does not hold, let p . .= max i∈[k] |V i | and for each i ∈ [k], add p − |V i | vertices to V i that are adjacent to all vertices in each V j where j = i.It is clear that the resulting instance has a multicolored independent set if and only if the original instance does.
The graph G of the Minimum Dominating Set instances is obtained as follows.We take the graph G as constructed in the proof of Theorem 21, and for each i ∈ [k], we add a vertex b i whose model is {u i }, i. e. it is adjacent to all vertices in Z(i) and nothing else.We argue that G has a multicolored independent set if and only if G has a dominating set of size k.
For the forward direction, if G has a multicolored independent set I . .= {v 1 h 1 , . . ., v k h k }, then using Observation 21.1, one can verify that D . .= {z 1 h 1 , . . ., z k h k } is a dominating set in G : Clearly, for each i ∈ [k], the vertices in Z(i) ∪ {b i } are dominated by z i h i ∈ D. Suppose there is a vertex r (i,j) s,t ∈ R(i, j) that is not dominated by D, then in particular it is neither adjacent to z i h i nor to z j h j .By Observation 21.1, this implies that G contains the edge v i h i v j h j , a contradiction with the fact that I is an independent set.
For the backward direction, suppose that G has a dominating set D of size k.Due to the vertices b i (for i ∈ [k]), we can conclude that for all i ∈ [k], D ∩ (Z(i) ∪ {b i }) = ∅.If D contains b i for some i ∈ [k], then we can replace b i by any vertex in Z(i) such that the resulting set is still a dominating set of D, so we can assume that D = {z 1 h 1 , . . ., z k h k }.We claim that {v 1 h 1 , . . ., v k h k } is an independent set in G. Suppose that for i, j ∈ [k], there is an edge v i h i v j h j ∈ E(G).Observation 21.1 implies that r (i,j) h i ,h j is neither adjacent to z i h i nor to z j h j , so r (i,j) h i ,h j is not dominated by D, a contradiction.Remark 23.We would like to remark that the above reduction is to the Min-(σ * , ρ * ) Domination problem, for all σ * ⊆ N with 0 ∈ σ * and ρ * ⊆ N + with {1, 2} ⊆ ρ * .Proposition 24 ([13]).For σ * ⊆ N with 0 ∈ σ * and ρ * ⊆ N + with {1, 2} ⊆ ρ * , Min-(σ * , ρ * ) Domination is W[1]-hard on H-graphs parameterized by the number of edges in H plus solution size, and the hardness holds even when an H-representation of the input graph is given.
Adaption to Total Domination Problems.Recall that the (σ, ρ) formulation for Dominating Set is (N, N + ).We now explain how to modify the above reduction to obtain hardness for total dominating set problems where each vertex in the solution has to have at least one neighbor in the solution as well.These problems include Total Dominating Set and Dominating Induced Matching, which can be formulated as (N + , N + ) and ({1}, N + ), respectively.The minimization problem of either of them is known to be NP-complete.
Proof.We modify the above reduction from Multicolored Independent Set as follows.For each i ∈ [k], we add another vertex c i to G which is only adjacent to b i .We let B . .= i∈[k] {b i } and C . .= i∈[k] {c i }.Note that these new vertices can be 'hardcoded' into H with the number of edges in H increasing only by k.To argue the correctness of the reduction, we now show that G has a multicolored independent set if and only if G has a (σ * , ρ * ) set of size k . .= 2k.
For the forward direction, suppose that G has an independent set for some 1 ≤ i < j ≤ k, then y is either dominated by one of z i h i and z j h j or by both and it cannot have any other neighbors in D by construction.Since 1 ∈ σ * and {1, 2} ⊆ ρ * , D is a (σ * , ρ * ) set and clearly, |D| = 2k.
For the backward direction, suppose that G has a (σ * , ρ * ) set D of size 2k.Let i ∈ [k].Since 0 / ∈ σ * and 0 / ∈ ρ * , we have that at least one of c i and b i is contained in D (either c i is dominating or it needs to be dominated).Suppose c i ∈ D. Since each vertex in D has to have at least one neighbor in D and b i is the only neighbor of c i , we can conclude that b i ∈ D. So, in either case, we have that b i is contained in D and subsequently we have that B ⊆ D. Since 0 / ∈ σ * , all vertices of B have a neighbor in D. Suppose for some i ∈ [k] that neighbor is c i .Then, we can replace c i with some z i h i ∈ Z(i), without changing the fact that D is a (σ * , ρ * ) set.We can assume that for each i ∈ [k], the neighbor of b i that is contained in D is a vertex z i h i ∈ Z(i).We have that D = B ∪ {z 1 h 1 , . . ., z k h k } and since D is a dominating set (in other words, 0 / ∈ ρ * ), we can again argue using Observation 21.1 that {v 1 h 1 , . . ., v k h k } is an independent set in G.
As a somewhat orthogonal result to Theorem 21, we now show hardness of several problems related to the d-Dominating Set problem, where each vertex that is not in the solution set has to be dominated by at least some fixed number of d neighbors in the solution.
Adaption to d-Domination Problems.We use a similar gadget as the one constructed in the proof of Theorem 21 to prove hardness of several (σ, ρ) problems where each vertex has to be dominated by at least d vertices.In particular, we prove the following theorem.Note that the analogous statement of the following theorem for d = 1 is proved by the reduction explained in the beginning of this section, see Remark 23.Proof.We modify the reduction from Multicolored Independent Set to Dominating Set on H-graphs due to Fomin et al. [13] that we summarized in the beginning of this section.Let G be a graph with vertex partition V 1 , . . ., V k and |V i | = p for all i ∈ [k] and assume k ≥ 3.
We first describe the gadget we use and then we describe how to construct the graph is additionally adjacent to all vertices in Z(i) as well as to all vertices in R(i, j) for j > i. (Note that c i 1,d does not have these additional adjacencies.)Throughout the following, we let The graph G is now obtained by constructing the graph G as in the proof of Theorem 21 and then, for each i ∈ [k], adding the gadget C(i) and adding a 'satellite vertex' s i , adjacent to all vertices in Z(i) ∪ C 1 (i).G is a K-graph for the graph K ⊇ H, obtained by 'hardcoding' each C(i), for i ∈ [k], into H.That is, for each i ∈ [k], we add a complete bipartite graph with bipartition ({γ i 1,1 , . . ., γ i 1,d }, {γ i 2,1 , . . ., γ i 2,d }), and make all vertices γ i 1,h , where h ∈ [d − 1], adjacent to u i as well as to all vertices w (i,j) with j > i.For an illustration of K see Figure 6.Note that We illustrate the structure of the graph G in Figure 7.We now argue that G is a K-graph.We begin by constructing a subdivision K of K. First, we do Step K1 that was taken in the proof of Theorem 21 (see page 19) to construct the subdivision, and then the analogue of Step K2 in the proof of Theorem 21 for the gadgets C(i).We continue with the following two steps.
} be the vertices of the copy of the graph of C(i) in K.For each h ∈ [d − 1], we subdivide the edge u i γ i 1,h once, and denote the corresponding subdivision node by s(i, h).
(K4) Furthermore, for each i ∈ [k], for each i < j ≤ k, and h ∈ [d − 1] we subdivide the edge w (i,j) γ i 1,h once, and denote the corresponding subdivision node by s((i, j), h).
s i s j We now sketch how to obtain a K-representation of G , M = {M v } v∈V (G ) , where each M v is a connected subset of V (K ); for an illustration of G see Figure 7.As these steps are very similar to Steps (R1) to (R5) in the proof of Theorem 21 (see page 20), we focus on pointing out how to adapt them rather than fully restating all of them.
First, for each i ∈ [k], the model for the vertex s i consists of the vertex u i , i.e. we add the model M s i . .= {u i } to M .Then we do the steps analogous to Steps R1 and R2 taken in the proof of Theorem 21.Following that, we take the steps analogous to R4 and R5, where in Step R4 we consider vertex c i 1,h instead of vertex b i 1,h , and in Step R5, we consider vertex c i 1,h instead of vertex b (i,j) 1,h .Furthermore, in Step R4, we additionally add s(i, h) to the model of s i .This completes the construction of the K-representation for G .Proof.Let {v 1 h 1 , . . ., v k h k } be the independent set in G.By the reduction proving Proposition 24 in the beginning of this section, we have that D Since each vertex in V (G ) \ (D ∪ C) is adjacent to precisely d − 1 vertices in C 1 and to either one or two vertices in D (and In what follows, the strategy is to argue that each (σ * , ρ * ) set of size k Proof.We first show that each such D contains at least d vertices from C(i).Suppose not, then  Now suppose that s i ∈ D.Then, after swapping s i with any vertex in Z(i), the resulting set remains a (σ * , ρ * ) set: Clearly, the condition of being a (σ * , ρ * ) set is not violated by any vertex in Z + (i).For i < j ≤ k, consider any vertex x ∈ R(i, j).Then, N (x) ∩ D contains the d − 1 vertices C 1 (i) \ {c i 1,d }, and at most one more each from Z(i) and Z(j), as D can contain at most one vertex from each Z(i ), i ∈ [k].Now, if we swapped s i with some vertex from Z(i), then this means that initially, D contained d neighbors from N (x), namely C 1 (i) \ {c i 1,d } and one vertex from Z(j).Hence, after swapping, D contains d + 1 vertices and since d + 1 ∈ ρ * , D remained a (σ * , ρ * ) set.An analogous argument can be given for any R(j , i), where 1 ≤ j < i.
We are now ready to conclude the correctness proof of the reduction.Similarly to above, a combination of the previous two theorems with Proposition 20 yields the following hardness results for (σ, ρ) minimization problems on graphs of bounded linear mim-width.Furthermore, the hardness holds even if a corresponding decomposition tree is given.

Conclusion
We have introduced the class of distance-r (σ, ρ) and LCVP problems.This generalizes well-known graph distance problems like distance-r domination, distance-r independence, distance-r coloring and perfect r-codes.It also introduces many new distance problems for which the standard distance-1 version naturally captures a well-known graph property.
Using the graph parameter mim-width, we showed that all these problems are solvable in polynomial time for many interesting graph classes.These meta-algorithms will have runtimes which can likely be improved for a particular problem on a particular graph class.For instance, blindly applying our results to solve Distance-r Dominating Set on permutation graphs yields an algorithm that runs in time O(n 8 ): Permutation graphs have linear mim-width 1 (with a corresponding decomposition tree that can be computed in linear time) [3, Lemmas 2 and 5], so we can apply Corollary 15(i).However, there is an algorithm that solves Distance-r Dominating Set on permutation graphs in time O(n 2 ) [26]; a much faster runtime.
Recently, Chiarelli et al. [10] gave algorithms for the (Total) k-Dominating Set problems on proper interval graphs that run in time O(n 3k ).The mim-width framework yields an algorithm for these problems that runs in time O(n 2k+4 ) which follows from Proposition 3(i) and the result that interval graphs have linear mim-width 1 [3].Hence the work [10] improves the generic mim-width based algorithm whenever k < 4. We would like to remind the reader however that prior to this work, the result formulated in Proposition 3(i) has not been explicitly stated anywhere.
Regarding lower bounds, we expanded on the previous results by Fomin et al. [13] and showed that many (σ, ρ) problems are W [1]-hard parameterized by mim-width.However, it remains open whether there exists a problem which is NP-hard in general, yet FPT parameterized by mim-width.In particular, several (σ, ρ) problems are not covered by the W[1]-hardness results of Fomin et al. [13] and the ones presented in this paper.Examples include Perfect Code and Perfect Dominating Set, see e.g.Table 1.Even so, we conjecture that every NP-hard (distance) (σ, ρ) problem is W[1]-hard parameterized by mim-width.
Somewhat surprisingly, we proved that powers of graphs of bounded tree-width or clique-width have bounded mim-width.Heggernes et al. [14] showed that the clique-width of the k-th power of a path of length k(k + 1) is exactly k.This also shows that the expressive power of mim-width is much stronger than clique-width, since all powers of paths have mim-width just 1.As a special case, we show that leaf power graphs have mim-width 1.We believe the notion of mim-width can be of benefit to the study of leaf power graphs.We remark that it is a big open problem whether leaf power graphs can be recognized in polynomial time [6,8,22,24].Knowing that leaf powers have mim-width 1, we can connect this open problem to the open problem regarding the recognition of graphs of bounded mim-width which has been repeatedly stated (e.g.[18,31]): A polynomial-time algorithm that recognizes graphs of mim-width 1 could prove itself useful in devising a recognition algorithm for leaf power graphs.

Figure 1 :
Figure 1: Structure of two paths P uv and P wx when the edge u x exists in G. Dashed edges appear in G r , solid edges appear in G, squiggly lines are (shortest) paths existing in G (possibly of length 0, and possibly crossing back and forth across the cut).
By (a) we know that u d + x d = r, so by a similar argument as above we get that v d + w d ≤ r − 3, obtaining a contradiction.An analogous argument holds for w d + x d .(c)This follows immediately by substituting (a) into (b).

Lemma 11 .
Let r and w be positive integers and let (A, B) be a vertex partition of graph G such that G[A] is w-labeled and for every pair of vertices x, y in the same label class of G[A], x and y have the same neighborhood in B. Let H . .= G r .Then, mim H (A) ≤ w.

Figure 2 :
Figure 2: Illustration of the situation in the proof of Lemma 11.

Corollary 15 .
There is an algorithm that for all r ∈ N, given a graph G and a decomposition tree(T, L) of G with w . .= mimw G (T, L) solves each distance-r (σ, ρ) problem Π with d . .= d(Π) (i) in time O(n 4+4d•w ), if T is a caterpillar, and(ii) in time O(n 4+6d•w ), otherwise.

Theorem 21 .
For any fixed d ∈ N and x ≤ d + 1, the following holds.Let σ * ⊆ N ≤d with d ∈ σ * .Then, Max-(σ * , N ≥x ) Domination is W[1]-hard on H-graphs parameterized by the number of edges in H plus solution size, and the hardness holds even if an H-representation of the input graph is given.

Figure 4 :
Figure 4: The graph K with respect to which the graph G constructed in the proof of Theorem 21 is a K-graph.In this example, we have k = 3 and d = 4.

Figure 5 :
Figure 5: A part of the graph G , where 1 ≤ i < j ≤ k and d = 4.

and the vertices b i 2 , 1 , . . . , b i 2 ,d− 1 and if x = b i 2 ,
for some ∈ [d − 1], then it is adjacent to the vertices b i 1,1 , . . ., b i 1,d .Hence, in all cases, x has precisely d neighbors in S.
Claims 21.2 and 21.4 establish the correctness of the reduction.We observe that |V (G )| = O(|V (G)| + d 2 • k 2 ) and clearly, G can be constructed from G in time polynomial in |V (G)|, d and k as well.Furthermore, by (2), ||K|| = O(d 2 • k 2 ) which implies that ||K|| = O(k 2 ) since d is a fixed constant and the theorem follows.By Proposition 20, the previous theorem has the following consequence.

Corollary 22 .
For any fixed d ∈ N and x ≤ d + 1, the following holds.Let σ * ⊆ N ≤d with d ∈ σ * .Then, Max-(σ * , N ≥x ) Domination is W[1]-hard parameterized by linear mim-width plus solution size, and the hardness holds even if a corresponding decomposition tree is given.
all vertices in V (G ) \ C by the same argument as above and D . .= D ∪ B dominates all vertices of G .Furthermore, each x ∈ D has precisely one neighbor in D: For each such x, either x = z i h i or x = b i for some i ∈ [k].In the former case, N (x) ∩ D = {b i } and in the latter case, N (x)

Figure 6 :
Figure 6: An example graph K w.r.t. which the graph G constructed in the proof of Theorem 26 is a K-graph.In this example, k = 3.

Figure 7 :
Figure 7: Illustration of a part of G constructed in the proof of Theorem 26, where 1 ≤ i < j ≤ k and d = 4.

Claim 26 . 2 .
For all i ∈ [k], any (σ * , ρ * ) set D in G contains at least d vertices from C(i) and at least d + 1 vertices from Z + (i).

i 1 ,
d has to have either d or d + 1 neighbors in D. However, D already contains the d − 1 vertices C 1 (i) \ {c i 1,d } that are not adjacent to c i 1,d , and D contains d + 1 vertices from Z + (i).So, at most two neighbors of c i 1,d are contained in D. If at most one neighbor of c i 1,d is contained in D, this immediately gives a contradiction with D being a (σ * , ρ * ) set since d ≥ 2. However, if d = 2, and two neighbors of c i 1,d are contained in D, then each vertex in Z(i) has only d − 1 neighbors in D, namely the ones in C 1 (i) \ {c i 1,d }, again a contradiction with D being a (σ * , ρ * ) set.We can conclude that C 1 (i) ⊆ D.

Claim 26 . 4 .
If G has a (σ * , ρ * ) set of size k = k(d + 1), then G has a multicolored independent set.Proof.Let D be a (σ * , ρ * ) set of size k .By Claim 26.3, we can assume thatD = C 1 ∪ {z 1 h 1 , . . ., z k h k } for some h 1 , . . ., h k ∈ [p].Now, since for each 1 ≤ i < j ≤ k, all vertices in R(i, j) have precisely d − 1 neighbors in C 1 ,each of them has to have at least one of z i h i and z j h j as a neighbor.By Observation 21.1, this allows us to conclude that {v 1 h 1 , . . ., v k h k } is an independent set in G. Claims 26.1 and 26.4 establish the correctness of the reduction.Clearly, |V (G )| = O(|V (G)| + d 2 • k) (and G can be constructed in polynomial time) and by (4), ||K|| = O(k 2 • d + k • d 2 ).Since d is a fixed constant we have that ||K|| = O(k 2 ) and the theorem follows.

Table 1 :
[13] vertex subset properties expressible as (σ, ρ)-sets, with N = {0, 1, ...} and N + = {1, 2, ...}.Column d shows d = max(d(σ), d(ρ)).For each problem, at least one of the minimization, the maximization and the existence problem is NP-complete.For problems marked with max ( min ) in the rightmost column, W[1]-hardness of the maximization (minimization) problem parameterized by mim-width + solution size is shown in the present paper.For problems marked with • max (• min ) the W[1]-hardness of maximization (minimization) in the same parameterization was shown by Fomin et al.[13]. max d cannot have d or more neighbors in D. But |C 2 (i)| = d, a contradiction.We can assume that c i 1,d ∈ D. Furthermore, there is at least one vertex c i 2, for ∈ [d] with c i 2, / ∈ D. To ensure that c i 2, has at least d neighbors in D, we would have to include all remaining vertices from C 1 (i) in D, but then |D ∩ C(i)| ≥ d, a contradiction.The second part of the claim now follows since the vertex s i only has neighbors in Z + (i) and at most d − 1 neighbors in C(i) ∩ D (namely C 1 (i) \ {c i 1,d }): Since D is a (σ * , ρ * ) set, it either has to contain s i or at least one additional neighbor of s i .Claim 26.3.For all i ∈ [k], any (σ * , ρ * ) set D of size at most k = k(d + 1) contains C 1 (i).We furthermore can assume that it additionally contains some z i h i ∈ Z(i), where h i ∈ [p].Proof.By Claim 26.2 we have that D contains d + 1 vertices from each Z + (i ), i ∈ [k], and no other vertices.Consider any vertex z i s ∈ Z(i) (where s ∈ [p]) that is not contained in D. Recall that z i s has to have at least d neighbors in D. By Claim 26.2, z i s has precisely one neighbor in (Z(i) ∪ {s i }) ∩ D and since D does not any vertex from any R(j, i) (1 ≤ j < i) or R(i, j ) (i < j ≤ k), the only possible neighbors of z i s in D are (C 1 (i) ∪ {s i }) \ {c i 1,d }.Furthermore, we observe that c i 1,d ∈ D: for if c i 1,d / ∈ D, then c