New Algorithms for Mixed Dominating Set

A mixed dominating set is a collection of vertices and edges that dominates all vertices and edges of a graph. We study the complexity of exact and parameterized algorithms for \textsc{Mixed Dominating Set}, resolving some open questions. In particular, we settle the problem's complexity parameterized by treewidth and pathwidth by giving an algorithm running in time $O^*(5^{tw})$ (improving the current best $O^*(6^{tw})$), as well as a lower bound showing that our algorithm cannot be improved under the Strong Exponential Time Hypothesis (SETH), even if parameterized by pathwidth (improving a lower bound of $O^*((2 - \varepsilon)^{pw})$). Furthermore, by using a simple but so far overlooked observation on the structure of minimal solutions, we obtain branching algorithms which improve both the best known FPT algorithm for this problem, from $O^*(4.172^k)$ to $O^*(3.510^k)$, and the best known exponential-time exact algorithm, from $O^*(2^n)$ and exponential space, to $O^*(1.912^n)$ and polynomial space.


Introduction
Domination problems in graphs are one of the most well-studied topics in theoretical computer science. In this paper we study a variant called MIXED DOMINATING SET: we are given a graph G = (V, E) and are asked to select D ⊆ V and M ⊆ E such that |D ∪ M | is minimized and the set D ∪ M dominates V ∪ E, where a vertex dominates itself, its neighbors, and its incident edges and an edge dominates itself, its endpoints, and all edges with which it shares an endpoint.
The notion of MIXED DOMINATING SET was first introduced in 1977 by Alavi et al. (1977), and has been studied extensively in graph theory by Alavi et al. (1992), Erdös and Meir (1977), Meir (1978) and Peled and Sun (1994). See the chapter of Haynes et al. (1998) for a survey on the MIXED DOMINATING SET problem. The computational complexity of MIXED DOMINATING SET was first studied in 1993 by Majumdar (1993), where he showed that the problem is NP-complete. The problem remains NP-complete on split graphs by a result of Zhao et al. (2011) and on planar bipartite graphs of maximum degree 4 by a result of Manlove (1999). Majumdar (1993), Lan and Chang (2013), Rajaati et al. (2017) and Madathil et al. (2019) showed that the problem is polynomial-time solvable on trees, cacti, generalized seriesparallel graphs and proper interval graphs, respectively.
MIXED DOMINATING SET is a natural variation of domination in graphs as it can be seen as a mix between four standard problems: DOMINATING SET, where vertices dominate vertices; EDGE DOMI-NATING SET, where edges dominate edges; VERTEX COVER, where vertices dominate edges; and EDGE COVER, where edges dominate vertices. In MIXED DOMINATING SET we are asked to select vertices and edges in a way that dominates all vertices and edges. As only the last of these four problems is in P, it is not surprising that MIXED DOMINATING SET is NP-hard. We are therefore motivated to study approximation, exponential-time and parameterized algorithms for this problem, and indeed this has been the topic of several recent papers. On the approximation algorithms side, the problem is well-understood: Hatami (2007) gave a 2-approximation algorithm, while more recently Dudycz et al. (2019) showed that, under the Unique Games Conjecture (see Khot (2002)), no algorithm can achieve a ratio better than 2 for EDGE DOMINATING SET. As we explain (Proposition 1) this hardness result easily carries over to MIXED DOMINATING SET, thus essentially settling the problem's approximability. Hence, in this paper we focus on parameterized and exact algorithms.
MIXED DOMINATING SET has recently been the focus of several works in this context. With respect to the natural parameter (the size k of the solution), an O * (7.465 k ) (i) algorithm was given by Jain et al. (2017), more recently improved to O * (4.172 k ) by Xiao and Sheng (2019). With respect to treewidth and pathwidth, Jain et al. (2017) gave algorithms running in O * (6 tw ) time and O * (5 pw ) time, improving upon the O * (3 tw 2 ) time algorithm of Rajaati et al. (2018). Furthermore, Jain et al. showed that no algorithm can solve the problem in O * ((2−ε) pw ) time under the Set Cover Conjecture (see Cygan et al. (2012) for more details about the Set Cover Conjecture). These works observed that it is safe to assume that the optimal solution has a specific structure: the selected edges form a matching whose endpoints are disjoint from the set of selected vertices. This observation immediately gives an O * (3 n ) algorithm for the problem, which was recently improved to O * (2 n ) by Madathil et al. (2019) by using a dynamic programming approach, which requires O * (2 n ) space.

Our results:
The state of the art summarized above motivates two basic questions: first, can the gap in the complexity of the problem for treewidth and pathwidth and the gap between the lower and upper bound for these parameters be closed, as explicitly asked by Jain et al. (2017); second, can we solve this problem faster than the natural O * (2 n ) barrier? We answer these questions and along the way obtain an improved FPT algorithm for parameter k. Specifically we show: (i) MIXED DOMINATING SET can be solved in O * (5 tw ) time. Somewhat surprisingly, this result is obtained by combining observations that exist in the literature: the equivalence of MIXED DOMINATING SET to DISTANCE-2-DOMINATING SET by Madathil et al. (2019); and the algorithm of Borradaile and Le (2016) for this problem.
(ii) MIXED DOMINATING SET cannot be solved in time O * ((5 − ε) pw ), under the SETH. This is our main result on this front, and shows that our algorithm for treewidth and the algorithm of Jain et al. (2017) for pathwidth are optimal.
(iii) MIXED DOMINATING SET can be solved in time O * (1.912 n ) and O * (3.510 k ), in both cases using polynomial space. In order to obtain these algorithms we refine the notion of nice mixed dominating set which was used in Jain et al. (2017). In particular, we show that there always exists an optimal mixed dominating set such that any selected vertex has at least two private neighbors, that is, two neighbors which are only dominated by this vertex. This allows us to speed the branching on low-degree vertices.
(i) O * notation suppresses polynomial factors in the input size.

Preliminaries
We assume familiarity with the basics of parameterized complexity (e.g. treewidth, pathwidth, and the SETH), as given by Cygan et al. (2015). Let G = (V, E) be a graph with |V | = n vertices and |E| = m edges. For u ∈ V , N (u) denotes the set of neighbors of u, d(u) = |N (u)| and N [u] = N (u) ∪ {u}. For U ⊆ V and u ∈ V , we note N U (u) = N (u) ∩ U and use d U (u) to denote |N U (u)|. Furthermore, for U ⊆ V we denote N (U ) = ∪ u∈U N (u). For an edge set E ′ , we use V (E ′ ) to denote the set of endpoints of E ′ . For V ′ ⊆ V , we use G[V ′ ] to denote the subgraph of G induced by V ′ . An edge cover of a graph G = (V, E) is a set of edges M ⊆ E such that V (M ) = V . Recall that an edge cover M of a graph G = (V, E) must have size |M | ≥ V 2 , since each edge can cover at most two vertices. A mixed dominating set of a graph G = (V, E) is a set of vertices D ⊆ V and edges M ⊆ E such that (i) all vertices of V \ (D ∪ V (M )) have a neighbor in D (ii) all edges of E \ M have an endpoint in D ∪ V (M ).
We note that the minimization problem MIXED DOMINATING SET is harder than the more well-studied EDGE DOMINATING SET (EDS) problem, by a reduction that preserves most parameters from an FPT viewpoint and the size of the optimal solution. Hence, essentially all hardness results for the latter problem, such as its inapproximability obtained by Dudycz et al. (2019) or its W[1]-hardness for clique-width from Fomin et al. (2010), carry over to MIXED DOMINATING SET.
Proposition 1 There is an approximation and parameter-preserving reduction from EDGE DOMINATING SET to MIXED DOMINATING SET.
Proof: Given an instance G = (V, E) of EDS we seek a set M of k edges such that all edges have an endpoint in V (M ). We add a new vertex u connected to all of V and attach to u |V | + 2 leaves. The new graph has a mixed dominating set of size k + 1 if and only if G has an edge dominating set of size k. ✷ We now define a restricted notion of mixed dominating set.
Definition 1 A nice mixed dominating set of a graph G = (V, E) is a mixed dominating set D ∪ M which satisfies the following: (i) D ∩ V (M ) = ∅ (ii) for all u ∈ D there exists at least two private neighbors of u, that is, two vertices We note that a similar notion of nice mixed dominating set was used in the algorithms of Jain et al. (2017), with the key difference that these algorithms do not use the fact that every vertex of D must have at least two private neighbors, that is, two neighbors which are dominated only by this vertex, though these algorithms use the fact that such vertices have at least one private neighbor.
Let us now prove that restricting ourselves to nice solutions does not change the value of the optimal. The idea of the proof is to reuse the arguments of Madathil et al. (2019) to obtain an optimal solution satisfying the first property; and then while there exists u ∈ D with at most one private neighbor, we replace it by an edge while maintaining a valid solution satisfying the first property. (ii) Lemma 1 For any graph G = (V, E) without isolated vertices, G has a mixed dominating set D ∪ M of size at most k if and only if G has a nice mixed dominating set D ′ ∪ M ′ of size at most k.
(ii) In the conference version of this paper (IPEC 2020) we used a definition of nice mixed dominating set that included the additional property that M is a matching, and erroneously claimed that an optimal solution satisfying this definition always exists. We are grateful to an anonymous reviewer who pointed out to us that this is not the case. As a result, we use here a definition of nice mixed dominating set that is slightly weaker that the one in the conference version and give a corrected version of Lemma 1. However, the results we obtain remain the same.
Proof: On direction is trivial, since any nice mixed dominating set is also by definition a mixed dominating set. For the other direction, we first recall that it was shown by Madathil et al. (2019) that if a graph has a mixed dominating of size k, then it also has such a set that satisfies the first condition of Definition 1. Suppose then that D ∪ M is such that D ∩ V (M ) = ∅.
We will now edit this solution so that we obtain the missing desired property, namely the fact that all vertices of D have two private neighbors. Our transformations will be applicable as long as there exists a vertex u ∈ D without two private neighbors, and will either decrease the size of the solution, or decrease the size of D, while maintaining a valid solution satisfying the first property of Definition 1. As a result, applying these transformations at most n times yields a nice mixed dominating set. Let If there exists u ∈ D with exactly one private neighbor, let v ∈ I be this private neighbor. We set D ′ = D \ {u} and M ′ = M ∪ {(u, v)} to obtain another solution. This solution is valid because N (u)\ {v} is dominated by (D ∪M )\ {u}, otherwise u would have more that one private neighbor.
Let us now consider u ∈ D such that u has no private neighbor. If N (u) ⊆ D, then we can simply remove u from the solution and obtain a beter solution (recall that u is not an isolated vertex). Otherwise, let v ∈ N (u) \ D. We set D ′ = D \ {u} and M ′ = M ∪ {(u, v)} to obtain another feasible solution with fewer vertices, while still satisfying the first property. We repeat these modifications until we obtain the claimed solution. ✷ In the remainder, when considering a nice mixed dominating set D ∪M of a graph G = (V, E), we will associate with it the partition V = D ∪ P ∪ I where P = V (M ) and I = V \ (D ∪ P ). We will call this a nice mds partition. We have the following properties: (i) M is an edge cover of G[P ] since P = V (M ) and M is a set of edges (ii) I is an independent set because if there were two adjacent vertices in I then the edge between them would not be dominated (iii) D dominates I because if there was a vertex in I not dominated by D it would not be dominated at all (iv) each u ∈ D has two private neighbors We also note the following useful relation.
Lemma 2 For any graph G = (V, E) and any nice mds partition V = D ∪ P ∪ I of G, there exists a minimal vertex cover C of G such that D ⊆ C ⊆ D ∪ P .
Proof: Since I is an independent set of G, D ∪ P is a vertex cover of G and hence contains some minimal vertex cover. We claim that any such minimal vertex cover C ⊆ D ∪ P satisfies D ⊆ C. Indeed, for each u ∈ D there exists two private neighbors v 1 , v 2 / ∈ D ∪ P . Hence, if u / ∈ C, the edge (u, v 1 ) is not covered, contradiction. ✷

Treewidth
We begin with an algorithm for MIXED DOMINATING SET running in time O * (5 tw ). We rely on three ingredients: (i) the fact that MIXED DOMINATING SET on G is equivalent to DISTANCE-2-DOMINATING SET on the incidence graph of G by a result of Madathil et al. (2019) (ii) the standard fact that the incidence graph of G has the same treewidth as G (iii) and an O * (5 tw ) algorithm (by Borradaile and Le (2016)) for DISTANCE-2-DOMINATING SET.
Theorem 2 There is an O * (5 tw )-time algorithm for MIXED DOMINATING SET in graphs of treewidth tw.
Proof: We are given an instance of MIXED DOMINATING SET G = (V, E). We first construct the incidence graph of G, which has vertex set V ∪ E, and has an edge between v ∈ V and e ∈ E if e is incident on v in G. We denote this graph as I(G). In other words, I(G) is obtained by sub-dividing every edge of G once. We now note the standard fact that tw(I(G)) ≤ tw(G). Indeed, if G is a forest, then I(G) is also a forest; while if tw(G) ≥ 2, then we can take any tree decomposition of G and for each e = (u, v) we observe that it must contain a bag with both u and v. We create a bag containing u, v, e and attach it to the bag containing u, v. Note that this does not increase the width of the decomposition. We thus obtain a decomposition of I(G).
Second, as observed by Madathil et al. (2019), every mixed dominating set of G corresponds to a distance-2 dominating set of I(G). Recall that a distance-2 dominating set of a graph is a set of vertices D such that all vertices of V \ D are at distance at most 2 from D.
Finally, we use the algorithm of Borradaile and Le (2016) to solve DISTANCE-2-DOMINATING SET in time O * (5 tw ) in I(G), which gives us the optimal mixed dominating set of G. ✷ The main result of this section is a lower bound matching Theorem 2. We prove that, under SETH, for all ε > 0, there is no algorithm for MIXED DOMINATING SET with complexity O * ((5 − ε) pw ). The starting point of our reduction is the problem q-CSP-5 (see Lampis (2020)). In this problem we are given a CONSTRAINT SATISFACTION (CSP) instance with n variables and m constraints. The variables take values in a set of size 5, say {0, 1, 2, 3, 4}. Each constraint involves at most q variables and is given as a list of acceptable assignments for these variables, where an acceptable assignment is a q-tuple of values from the set {0, 1, 2, 3, 4} given to each of the q variables. The following result was shown by Lampis (2020) to be a natural consequence of the SETH.
Lemma 3 (Theorem 3.1 by Lampis (2020)) If the SETH is true, then for all ε > 0, there exists a q such that n-variable q-CSP-5 cannot be solved in time O * ((5 − ε) n ).
Note that in the Theorem of Lampis (2020) it was shown that for any alphabet size B, q-CSP-B cannot be solved in time O * ((B − ε) n ) under the SETH, but for our purposes only the case B = 5 is relevant, for two reasons: because this corresponds to the base of our target lower bound; and because in our construction we will represent the B = 5 possible values for a variable with a path of five vertices in which there exists exactly five different ways of selecting one vertex and one edge among these five vertices. Our plan is therefore to produce a polynomial-time reduction which, given a q-CSP-5 instance with n variables, produces an equivalent MIXED DOMINATING SET instance whose pathwidth is at most n + O(1). Then, the existence of an algorithm for the latter problem running faster than O * ((5 − ε) pw ) would give an O * ((5 − ε) n ) algorithm for q-CSP-5, contradicting the SETH.
Before giving the details of our reduction let us sketch the basic ideas, which follow the pattern of other SETH-based lower bounds which have appeared in the literature: see Hanaka et al. (2018), Jaffke and Jansen (2017), , Katsikarelis et al. (2019) and Lokshtanov et al. (2018). The constructed graph consists of a main selection part of n paths of length 5m, divided into m sections. Each path corresponds to a variable and each section to a constraint. The idea is that the optimal solution will follow for each path a basic pattern of selecting one vertex and one edge among the first five vertices and then repeat this pattern throughout the path (see Figure 1). There are 5 natural ways to do this, so this can represent all assignments to the q-CSP-5 instance. We will then add verification gadgets to each section, connected only to the vertices of that section that represent variables appearing in the corresponding constraint (thus keeping the pathwidth under control), in order to check that the selected assignment satisfies the constraint. The main difficulty in completing the proof is showing that the optimal solution has the desired form, and in particular, that the pattern that is selected for a variable is kept constant throughout the construction. This is in general not possible to prove, but using a technique introduced by Lokshtanov et al. (2018), we work around this difficulty by making polynomially many copies of our construction, gluing them together, and arguing that a large enough consistent copy must exist.

Construction
We are given a q-CSP-5 instance ϕ with n variables x 1 , . . . , x n taking values over the set {0, 1, 2, 3, 4}, and m constraints c 0 , . . . , c m−1 . For each constraint we are given a set of at most q variables which are involved in this constraint and a list of satisfying assignments for these variables. Without loss of generality, we make the following assumptions: (i) each constraint involves exactly q variables, because if it has fewer variables, we can add to it new variables and augment the list of satisfying assignments so that the value of the new variables is irrelevant (ii) all constraints have lists of satisfying assignments of size C = 5 q − 1; note that this is an upper bound on the size of the list of satisfying assignments since if a constraint has 5 q different satisfying assignments then it is always satisfied and thus is redundant; and for each constraint which has fewer we add several copies of one of its satisfying assignments to its list (so the list may repeat an assignment). We define two "large" numbers F = (4n + 1)(2n + 1) and A = 12 and we set our budget to be k = 8AF mn + 2F mn + 2F mq(C − 1) + n + 1.
We now construct our graph as follows: 1. We construct a vertex s and attach to it two leaves s 1 , s 2 .
2. For i ∈ {1, . . . , n} we construct a path on 5F m vertices: the vertices are labeled u i,j , for j ∈ {0, 1, . . . , 5F m − 1} and for each i, j the vertex u i,j is connected to u i,j+1 . We call these paths the main part of our construction.
3. For each j ∈ {0, 1, . . . , F m − 1}, let j ′ = j mod m. We construct a checker gadget H j as follows (see Figure 2): (a) For each satisfying assignment σ in the list of the constraint c j ′ , we construct an independent set Z σ,j of size 2q (therefore, C such independent sets). The 2q vertices are partitioned so that for each of the q variables involved in c j ′ we reserve two vertices. In particular, if , 1, 2, 3, 4} we add the following edges: ii. Let β = (α + 2) mod 5 and γ = (α + 3) mod 5. We add the edges (u i,5j+β , z 1 σ,j,i ) and (u i,5j+γ , z 2 σ,j,i ). (c) For all assignments σ = σ ′ of c j ′ , add all edges between Z σ,j and Z σ ′ ,j .
(d) We construct an independent set W j of size 2q(C − 1).
(e) Add all edges between W j and Z σ,j , for all assignments σ of c j ′ .
(f) For each w ∈ W j , we construct an independent set of size 2k + 1 whose vertices are all connected to w and to s.
5. For each i ∈ {1, . . . , n} and j ∈ {0, . . . , F m − 1} construct A copies of the gadget Q i,j and connect them to the main part as described above.
This completes the construction. The target size is k, as defined above. We now argue that the reduction is correct and G has the desired pathwidth.
Lemma 4 If ϕ is satisfiable, then there exists a mixed dominating set in G of size at most k.

Fig. 2: (Double edges between two sets of vertices represent all edges between the two sets.) Left: Checker gadget
Hj connected to the main part. Here we have considered an instance where the clause c j ′ has only two variables, x1 and x2. Moreover, only the independent set Zσ 1 ,j is shown connected to the main part. The possible assignment σ1 of c j ′ is (x1 = 0, x2 = 2). We have supposed that this assignment is satisfiable, and we have marked the corresponding mixed dominating set: filled vertices are in D, thick edges are in M . Right: Checker gadget Qi,j connected to the main part, that is to the path corresponding to the variable xi. Only the independent sets Bi,j,1 and Bi,j,3 are shown connected to the main part. We have supposed that the assignment (xi = 3) is satisfiable, and we have marked the corresponding mixed dominating set: filled vertices are in D, thick edges are in M .
2. Let U ′ be the set of vertices u i,j of the main part which were not selected in the previous step and which do not have a neighbor selected in the previous step. We add to the solution all edges of a maximum matching of G[U ′ ], as well as all vertices of U ′ left unmatched by this matching.
Let us first argue why this solution has size at most k. In the first step we select F nm vertices. In the second step we select at most F nm+ n elements. To see this, note that if u i,j is taken in the previous step, then u i,j+5 is also taken (assuming j + 5 < 5F m), which leaves two adjacent vertices (u i,j+2 , u i,j+3 ). These vertices will be matched in G[U ′ ] and in our solution. Note that, for a variable x i , if ρ(x i ) = 2, then at most one vertex is left unmatched by the matching taken, so the cost for this variable is at most F m + 1. If ρ(x i ) = 2, then at most two vertices are left matched by the matching taken, so the cost for this variable is at most (F m − 1) + 2. Furthermore, for each H j we select |W j | = 2q(C − 1) edges. For each copy of Q i,j we select 8 edges, for a total cost of 8AF mn. Taking into account s, the total cost is at most F nm + F nm + n + 2F mq(C − 1) + 8AF mn + 1 = k.
Let us argue why the solution is feasible. First, all vertices u i,j and all edges connecting them to each other are dominated by the first two steps of our selection since we have taken a maximum matching in G[U ′ ] and all vertices left unmatched by this matching. Second, for each H j , the vertex s together with the endpoints of selected edges form a vertex cover of H j , so all internal edges are dominated. Furthermore, s dominates all vertices which are not endpoints of our solution, except Z σ,j , where σ is the selected assignment of c j ′ , with j ′ = j mod m. We then need to argue that the vertices of Z σ,j and the edges connecting it to the main part are covered.
Recall that the 2q vertices of Z σ,j are partitioned into pairs, with each pair z 1 σ,j,i , z 2 σ,j,i reserved for the variable x i involved in c j ′ . We now claim that z 1 σ,j,i , z 2 σ,j,i are dominated by our solution, since we have selected the vertex u i,5j+α , where α = ρ(x i ). Furthermore, u i,5j+β , u i,5j+γ , where β = (a + 2) mod m, γ = (a + 3) mod m, belong in U ′ and therefore the edges incident to them are covered. Finally, to see that the Q i,j gadgets are covered, observe that for each such gadget only 2 vertices of some B i,j,ℓ are not in P . The common neighbor of these vertices is in D, and their other neighbors in the main part are in P . ✷ The idea of the proof of the next Lemma is the following: by partitioning the graph into different parts and lower bound the cost of these parts, we prove that if a mixed dominating set in G has not the same form as in Lemma 4 in a sufficiently large copy, then it has size strictly greater than k, enabling us to produce a satisfiable assignment for ϕ using the mixed dominating set which has the desired form.
Lemma 5 If there exists a mixed dominating set in G of size at most k, then ϕ is satisfiable.
Proof: Suppose that we are given, without loss of generality (Lemma 1), a nice mixed dominating set of G of minimum cost. We therefore have a partition of V into V = D ∪ P ∪ I. Before proceeding, let us define for a set S ⊆ V its cost as cost(S) = |S ∩ D| + |S∩P | 2 . Clearly, cost(V ) ≤ k since |M | ≥ |P |/2, and for disjoint sets S 1 , S 2 we have cost(S 1 ∪ S 2 ) = cost(S 1 ) + cost(S 2 ). Our strategy will therefore be to partition V into different parts and lower bound their cost.
First, we give some notation. Consider some j ∈ {0, . . . , F m − 1} and i ∈ {1, . . . , n}: recall that we have constructed A copies of the gadget Proof: We begin with some easy observations. First, it must be the case that s ∈ D. If not, either s 1 or s 2 are in D, which contradicts the niceness of the solution. Consider some j ∈ {0, . . . , F m − 1} and i ∈ {1, . . . , n}. We will say that, for In other words, Q r i,j is normal if locally the solution has the form described in Lemma 4.
We now observe that for all i, j, r we have cost(Q r i,j ) ≥ 8. To see this, observe that if there exists a ∈ A i,j ∩ I, then the 2k + 1 neighbors of a must be in D ∪ P , so the solution cannot have cost Following this reasoning we also observe that if Q r i,j is not normal, then we have cost(Q r i,j ) > 8. In other words, 8 is a lower bound for the cost of every copy of Q i,j , which can only be attained if a copy is normal.
Consider some j ∈ {0, . . . , F m − 1} and i ∈ {1, . . . , n} and suppose that none of the A copies of Q i,j is normal. We will then arrive at a contradiction. Indeed, we have cost( r Q r i,j ) ≥ 8A + A/2 ≥ 8A + 6. We create another solution by doing the following: take the five vertices u i,5j , u i,5j+1 , . . . , u i,5j+4 , and take in all Q i,j a matching so that Q i,j is normal. This has decreased the total cost, while keeping the solution valid, which should not be possible.
We can therefore assume from now on that for each i, j at least one copy of Q i,j is normal, hence, there Indeed, if we consider the normal copy of Q i,j which has B i,j,ℓ ⊆ I, the two vertices of B i,j,ℓ have three neighbors in S i,j , and at least one of them must be in D to dominate the vertices of B i,j,ℓ .
In addition, we claim that for all j ∈ {0, . . . , F m − 1} we have cost(H j ) ≥ 2q(C − 1). The reasoning here is similar to Q i,j , namely, the vertices of W j cannot belong to I (otherwise we get 2k + 1 vertices in D ∪ P ) ; and from the 2qC vertices in σ Z σ,j at most 2q can belong to I.
We now have the lower bounds we need: cost(S j ) ≥ 2q(C − 1) + 2n + 8An. ✷ Now, if for some j we have cost(S j ) > 2q(C − 1) + 2n + 8An we will say that j is problematic.
Claim 4 There exists a contiguous interval J ⊆ {0, . . . , F m − 1} of size at least m(4n + 1) in which all j ∈ J are not problematic.
We will now consider the longest contiguous interval J ⊆ {0, . . . , F m − 1} such that all j ∈ J are not problematic. We have |J| ≥ F m/(|L| + 1) ≥ m(4n + 1). ✷ Before we proceed further, we note that if j is not problematic, then for any i ∈ {1, . . . , n}, all edges of M which have an endpoint in S i,j , must have their other endpoint also in the main part, that is, they must be edges of the main paths. To see this note that if j is not problematic, all Q i,j are normal, so there are 8 vertices in A i,j ∩ P which must be matched to the 8 vertices of ( ℓ B i,j,ℓ ) ∩ P . Similarly, in H j the 2q(C − 1) vertices of W j ∩ P must be matched to the 2q(C − 1) vertices of ( σ Z σ,j ) ∩ P , otherwise we would increase the cost and j would be problematic.
Consider now a non-problematic j ∈ J and i ∈ {1, . . . , n} such that cost(S i,j ) = 2. We claim that the solution must follow one of the five configurations below (see also Figure 1): Indeed, these configurations cover all the cases where exactly one vertex of S i,j is in D and exactly two are in P . This is a condition enforced by the fact that all of the Q i,j copies are normal, and that cost(S i,j ) = 2.
Claim 5 There exists a contiguous interval J ′ ⊆ J of size at least m in which all j ∈ J ′ are not problematic and for all j 1 , j 2 ∈ J ′ , S i,j1 and S i,j2 are in the same configuration.
Proof: Given the five configurations shown in Figure 1, we now make the following simple observations, where statements apply for all i ∈ {1, . . . , n} and j such that j, j + 1 ∈ J: (d) and (e) by this fact, and cannot be in configuration (c) because otherwise cost(S i,j ) > 2.
We note that S i,j+1 cannot be in configuration (e) because otherwise the vertex u i,5(j+1) is not dominated.
• If S i,j is in configuration (c), then S i,j+1 is in configuration (c) or (d). We note that S i,j+1 cannot be in configuration (a) since D ∩ P = ∅, nor in configuration (b) and (e) because otherwise cost(S i,j+1 ) > 2.
• If S i,j is in configuration (d), then S i,j+1 is in configuration (a) or (d). We note that S i,j+1 cannot be in configuration (b) and (e) because otherwise the edge (u i,5j+4 , u i,5(j+1) ) is not dominated, nor in configuration (c) because otherwise cost(S i,j ) > 2.
• If S i,j is in configuration (e), then S i,j+1 is in configuration (a), (b), (d) or (e). We note that S i,j+1 cannot be in configuration (c) since D ∩ P = ∅.
We will now say for some i ∈ {1, . . . , n}, j ∈ J, that j is shifted for variable i if j + 1 ∈ J but S i,j and S i,j+1 do not have the same configuration. We observe that there cannot exist distinct j 1 , j 2 , j 3 , j 4 , j 5 ∈ J such that all of them are shifted for variable i. Indeed, if we draw a directed graph with a vertex for each configuration, and an arc (u, v) expressing the property that the configuration represented by v can follow the one represented by u, if we take into account the observations above, the graph will be a DAG with maximum path length 4. Hence, a configuration cannot shift 5 times, as long as we stay in J (the part of the graph where the minimum local cost is attained everywhere).
By the above, the number of shifted indices j ∈ J is at most 4n. Hence, the longest contiguous interval without shifted indices has length at least |J|/(4n + 1) ≥ m. Let J ′ be this interval. ✷ We are now almost done: we have located an interval J ′ ⊆ {0, . . . , F m − 1} of length at least m where for all i ∈ {1, . . . , n} and all j 1 , j 2 ∈ J ′ we have the same configuration in S i,j1 and S i,j2 . We now extract an assignment from this in the natural way: if u i,5j+ℓ ∈ D, for some j ∈ J ′ , ℓ ∈ {0, . . . , 4}, then we set x i = ℓ. We claim this satisfies ϕ. Consider a constraint c j ′ of ϕ. There must exist j ∈ J ′ such that j ′ = j mod m, because |J ′ | ≥ m and J ′ is contiguous. We therefore check H j , where there exists σ such that Z σ,j ⊆ I (this is because j is not problematic, that is, H j attains the minimum cost). But because the vertices and incident edges of Z σ,j are dominated, it must be the case that the assignment we extracted agrees with σ, hence c j ′ is satisfied. ✷ We now show that the pathwidth of G is at most n + O(1).

Lemma 6
The pathwidth of G is at most n + O(q5 q ).
Proof: We will show how to build a path decomposition. First, we can add s to all bags, so we focus on the rest of the graph. Second, after removing s from the graph, some vertices become leaves. It is a wellknown fact that removing all leaves from a graph can only increase the pathwidth by at most 1. To see this, let G ′ be the graph obtained after deleting all leaves of G and suppose we have a path decomposition of G ′ of width w. We obtain a path decomposition of G by doing the following for every leaf v: find a bag of width at most w that contains the neighbor of v and insert after this bag, a copy of the bag with v added. Clearly, the width of the new decomposition is at most w + 1. Because of the above we will ignore all vertices of G which become leaves after the removal of s. For all j ∈ {0, . . . , F m − 1}, let S j be defined as in Equation 1. We will show how to build a path decomposition of G[S j ] with the following properties: • The first bag of the decomposition contains vertices u i,5j , for all i ∈ {1, . . . , n}.
• The width of the decomposition is n + O(q5 q ).
If we achieve the above then we can obtain a path decomposition of the whole graph: indeed, the sets S j partition all remaining vertices of the graph, while the only edges not covered by the above decompositions are those between u i,5j+4 and u i,5(j+1) . We therefore place the decompositions of S j in order, and then between the last bag of the decomposition of S j and the first bag of the decomposition of S j+1 we have 2n "transition" bags, where in each transition step we add a vertex u i,5(j+1) in the bag, and then remove u i,5j+4 .
Let us now show how to obtain a decomposition of G[S j ], having fixed the contents of the first and last bag. First, H j has order O(q5 q ), so we place all its vertices to all bags. The remaining graph is a union of paths of length 4 with the Q i,j gadgets attached. We therefore have a sequence of O(n) bags, where for each i ∈ {1, . . . , n} we add to the current bag the vertices of S i,j , then add and remove one after another whole copies of Q i,j , then remove S i,j except for u i,5j+4 . ✷ We are now ready to present the main result of this section. By putting together Lemmas 4, 5, 6 and the negative result for q-CSP-5 (Lemma 3), we get the following theorem: Theorem 6 Under SETH, for all ε > 0, no algorithm solves MIXED DOMINATING SET in time O * ((5 − ε) pw ), where pw is the input graph's pathwidth.
Proof: Fix ε > 0 and let q be sufficiently large so that Lemma 3 is true. Consider an instance ϕ of q-CSP-5. Using our reduction, create an instance (G, k) of MIXED DOMINATING SET. Thanks to Lemma 4 and Lemma 5, we know that ϕ is satisfiable if and only if there exists a mixed dominating set of size at most k in G.
Suppose there exists an algorithm which solves MIXED DOMINATING SET in time O * ((5 − ε) pw ). With this algorithm and our reduction, we can determine if ϕ is satisfiable in time O * ((5 − ε) pw ), where pw = n + O(q5 q ) = n + O(1), so the total running time of this procedure is O * ((5 − ε) n ), contradicting the SETH. ✷

Exact Algorithm
In this section, we describe an algorithm for the MIXED DOMINATING SET problem running in time O * (1.912 n ). Let us first give an overview of our algorithm. Consider an instance G = (V, E) of the MIXED DOMINATING SET problem and fix, for the sake of the analysis, an optimal solution which is a nice mixed dominating set D ∪ M . Such an optimal solution must exist by Lemma 1, so suppose it gives the nice mds partition V = D ∪ P ∪ I. By Lemma 2, there exists a minimal vertex cover C of G for which D ⊆ C ⊆ D ∪ P . Our first step is to "guess" C, by enumerating all minimal vertex covers of G. This decreases our search space, since we can now assume that vertices of C only belong in D ∪ P , and vertices of V \ C only belong in P ∪ I.
For our second step, we branch on the vertices of V , placing them in D, P , or I. The goal of this branching is to arrive at a situation where our partial solution dominates V \ C. The key idea is that any vertex of C that may belong in D must have at least two private neighbors, hence this allows us to significantly speed up the branching for low-degree vertices of D. Finally, once we have a partial solution that dominates all of V \ C, we show how to complete this optimally in polynomial time using a minimum edge cover computation.
We now describe the three steps of our algorithm in order and give the properties we are using step by step. In the remainder we assume that G has no isolated vertices (since these are handled by taking them in the solution). Therefore, by Lemma 1 there exists an optimal nice mixed dominating set. Denote the corresponding partition as V = D ∪ P ∪ I.
Step 1: Enumerate all minimal vertex covers of G, which takes time O * (3 n/3 ) by a result of Moon and Moser (1965). For each such vertex cover C we execute the rest of the algorithm. In the end output the best solution found.
Thanks to Lemma 2, there exists a minimal vertex cover C with D ⊆ C ⊆ D ∪ P . Since we will consider all minimal vertex covers, in the remainder we focus on the case where the set C considered satisfies this property. Let Z = V \ C. Then Z is an independent set of G. We now get two properties we will use in the branching step of our algorithm: 1. For all u ∈ C, u can be either in D or in P , because C ⊆ D ∪ P .
2. For all v ∈ Z, v can be either in P or in I, because D ⊆ C.
Step 2: Branch on the vertices of V as described below. The branching step of our algorithm will be a set of Reduction and Branching Rules over the vertices of C or Z. In order to describe a recursive algorithm, it will be convenient to consider a slightly more general version of the problem: in addition to G, we are given three disjoint sets D f , P f , P ′ f ⊆ V , and the question is to build a nice mds partition V = D ∪ P ∪ I of minimum cost which satisfies the following properties: D f ⊆ D ⊆ C, P f ⊆ P ∩ C, and P ′ f ⊆ P ∩ Z. Clearly, if D f = P f = P ′ f = ∅ we have the original problem and all properties are satisfied. We will say that a branch where all properties are satisfied is good, and our proof of correctness will rely on the fact that when we branch on a good instance, at least one of the produced branches is good. The intuitive meaning of these sets is that when we decide in a branch that a vertex belongs in D or in P in the optimal partition we place it respectively in D f , P f or P ′ f (depending on whether the vertex belongs in C or Z). We now describe a series of Rules which, given an instance of MIXED DOMINATING SET and three sets D f , P f , P ′ f , will recursively produce subinstances where vertices are gradually placed into these sets. Our algorithm will consider the Reduction and Branching Rules in order and apply the first Rule that can be applied. Note that we say that a vertex u is decided if it is in one of the sets D f ⊆ D, P f ⊆ P , or P ′ f ⊆ P . All the other vertices are considered undecided. Throughout the description that follows, we will use U to denote the set of undecided vertices which are not dominated by D f , that is, ). We will show that when no rule can be applied, U is empty, that is, all vertices are decided or dominated by D f . In the third step of our algorithm we will show how to complete the solution in polynomial time when U is empty. Since our Rules do not modify the graph, we will describe the subinstances we branch on by specifying the tuple (D f , P f , P ′ f ). To ease notation, let U C = U ∩ C and U Z = U ∩ Z. Recall that for u ∈ V , we use d UC (u) and d UZ (u) to denote the size of the sets N (u) ∩ U C = N UC (u) and N (u) ∩ U Z = N UZ (u), respectively. We will present each Rule individually and directly after explain why it is correct and its associated running-time, to ease presentation while having a consistent analysis.
Reduction Rule (R1): If there exists u ∈ U C such that d UZ (u) ≤ 1, then put u in P f , that is, recurse on the instance (D f , P f ∪ {u}, P ′ f ).
• Observe that no neighbor of u in U C can be private neighbor of u since U C ⊆ C ⊆ D ∪ P , and because d UZ (u) ≤ 1, the vertex u can have at most one private neighbor, so it must be the case that u ∈ P .
Reduction Rule (R2): If there exists v ∈ U Z such that d UC (v) = 0, then put u in P ′ f , that is, recurse on the instance (D f , P f , P ′ f ∪ {v}).
• The vertex v must be dominated, but it has no neighbor in U C , so it must be the case that v ∈ P . Now that we have presented the two Reduction Rules which we first apply in our algorithm, we will describe the Branching Rules. Thus, we need first to define our measure of progress. We define it to be the size of the set In other words, we count the undecided vertices of U C that have at least two undecided, non-dominated vertices in U Z , and the undecided, non-dominated vertices of U Z that have at least one undecided neighbor in C. This is motivated by the fact that undecided vertices that do not respect these degree bounds are eliminated by the Reduction Rules and hence do not affect the running time. Let l denote the number of the vertices that we counted according to this measure. Clearly, l ≤ n. Let T (l) be the maximum number of branches produced for an instance where the measure has value l. We now consider each Branching Rule individually: Branching Rule (B1): If there exists u ∈ U C such that d UZ (u) ≥ 4, then branch on the following two subinstances: • Branching Rule B1 is correct from U C ⊆ C ⊆ D ∪ P .
• We have T (l) ≤ T (l − 1) + T (l − 5), since in the branch where u ∈ D f at least 4 vertices of U Z become dominated.
Note that we may now assume that all vertices of U C have d UZ ∈ {2, 3}. The following two rules eliminate vertices u ∈ U C with d UZ (u) = 2.
Branching Rule (B2.1): If there exists u 1 , u 2 ∈ U C such that d UZ (u 1 ) = 3, d UZ (u 2 ) = 2, and N UZ (u 1 ) ∩ N UZ (u 2 ) = ∅ then branch on the following instances: • Branching Rule B2.1 is correct because if u 1 ∈ D, then u 2 cannot have two private neighbors and it is forced to be in P .
• We have T (l) ≤ T (l − 1) + T (l − 5), since in the branch where u 1 ∈ D f we also set u 2 ∈ P f and 3 vertices of U Z become dominated.
, then all vertices u ′ ∈ U C adjacent to v 1 must have d UZ (u ′ ) = 2. This is because Rules R1, B1 and B2.1 do not apply. Let s be the number of vertices of {v 1 , v 2 } which have at least two neighbors in U C . We consider the following cases: , because when u ∈ P f , v 1 , v 2 no longer contribute to l (they have no other neighbor in U C ).
. To see this, let u ′ ∈ U C be a neighbor of {v 1 , v 2 }.
As we said, d UZ (u ′ ) = 2, so setting u ∈ D f will activate Rule R1 on u ′ , decreasing l by 4.
On the other hand, if u ∈ P f , then one of {v 1 , v 2 } is deleted by Rule R2.
In this case Rule B2.2 (and Rules R1, R2) will be applied successively to u, u ′ giving T (l) ≤ 3T (l − 4). -If none of the above applies, then s = 2 and we have T (l) ≤ T (l − 5) + T (l − 1), because when u ∈ D f we force at least two other vertices of U C into P f .
We now have that all vertices u ∈ U C have d UZ (u) = 3. Let us now branch on vertices of U Z to ensure that these also do not have too low degree.
and (D f , P f ∪ {u 1 , u 2 }, P ′ f ). • Branching rule B3.2 is correct since we have the three following cases: u 1 ∈ D; or u 1 ∈ P and u 2 ∈ D; or u 1 and u 2 ∈ P .
If we cannot apply any of the above Rules, for all u ∈ U C we have d UZ (u) = 3 and for all v ∈ U Z we have d UC (v) ≥ 3. We now consider three remaining cases: (i) two vertices of U C have two common neighbors in U Z ; (ii) there exists a vertex v ∈ U Z with d UC (v) = 3; (iii) everything else.
Branching Rule (B4): • Branching Rule B4 is correct because if u 1 ∈ D, then u 2 cannot have two private neighbors since d UZ (u 2 ) = 3.
that is, X i is the set of vertices of U C that share a neighbor with u i in U Z other than v. Then we branch on the following 8 instances: • Branching Rule B5 is correct since we have the following cases: (i) all vertices u 1 , u 2 and u 3 are in P ; (ii) or exactly one of them is in D; (iii) or exactly two of them are in D; (iv) or all of them are in D. Note first that u 1 , u 2 and u 3 only share v as neighbor in U Z since Branching Rule B4 is not triggered. Branching Rule B5 is correct by the following arguments: (i) v must be dominated so it must be the case that v ∈ P ; (ii) The two vertices not in D necessarily are in P ; (iii) Since u i and u j share v as common neighbor and both have exactly three neighbors in U Z , the vertices of X i and X j have to be in P because otherwise u i and u j do not have two private neighbors; (iv) For the same reason, the vertices of X 1 , X 2 and X 3 have to be in P .
• We have T (l) ≤ T (l − 4) + 3T (l − 6) + 3T (l − 12) + T (l − 14). Indeed we have: (i) the branch where u 1 , u 2 , u 3 ∈ P f , which also effectively eliminates v; (ii) the branch where u 1 ∈ D f and u 2 , u 3 ∈ P f , which also dominates N UZ (u 1 ) (plus two more symmetric branches); (iii) the branch where u 1 , u 2 ∈ D f and u 3 ∈ P f (plus two more symmetric branches). Here we first observe that {v, u 1 , u 2 , u 3 } ∪((N (u 1 ) ∪ N (u 2 )) ∩ U Z ) contains exactly 8 distinct vertices, because d UZ (u 1 ) = d UZ (u 2 ) = 3, while N UZ (u 1 ) and N UZ (u 2 ) share exactly one common element (v), since Rule B4 does not apply. In addition to eliminating these 8 vertices, this branch also eliminates X 1 ∪ X 2 . We argue that X 1 alone contains at least 4 additional vertices, distinct from the 8 eliminated vertices. Let N UZ (u 1 ) = {v, w 1 , w 2 }. We know that d UC (w 1 ), d UC (w 2 ) ≥ 3, since Rule B3.2 did not apply. Furthermore, since w 1 , w 2 share u 1 as a common neighbor in U C , they cannot share another, as Rule B4 would apply. In addition, neither w 1 nor w 2 can be connected to u 2 or u 3 , since together with v, u 1 this would active Rule B4. Hence, we eliminate at least 12 vertices for each of these three branches. Finally, the case (iv) where u 1 , u 2 , u 3 ∈ D f is similar, except we also eliminate two additional neighbors of u 3 in U Z which now become dominated.
Branching Rule (B6): Consider u ∈ U C and let N UZ (u) = {v 1 , v 2 , v 3 }. We branch on the following instances: • Branching Rule B6 is correct because if u ∈ D, then either v 1 is one of its private neighbors, or both v 2 and v 3 are its private neighbors.
• We have T (l) ≤ T (l − 1) + T (l − 7) + T (l − 10). Here we use the fact that since Rule B5 does not apply, d UC (v i ) ≥ 4 and also that since Rule B4 does not apply, Hence, the branch where u ∈ D f and v 1 is a private neighbor of u forces three more vertices of U C into P f , and the branch where v 2 , v 3 are private neighbors of u forces six more vertices of U C into P f .
Our algorithm applies the above Rules in order as long as possible. Since we have proved the correctness of our Rules individually, we can explain what happens when no Rule is applicable. But first, let us establish a useful property.

Lemma 7 If none of the Rules can be applied then U = ∅.
Proof: Observe that by applying rules R1, B1, B2.2, B6, we eventually eliminate all vertices of U C , since these rules alone cover all the cases for d UZ (u) for any u ∈ U C . So, if none of these rules applies, U C is empty. But then applying R2 will also eliminate U Z , which makes all of U empty. ✷ Step 3: When U is empty, reduce the problem to EDGE COVER. We now show how to complete the solution in polynomial time.
Lemma 8 Let (D f , P f , P ′ f ) be a good tuple such that no Rule can be applied. Then it is possible to construct in polynomial time a mixed dominating set of size at most |D| + |M |.
Proof: Because no Rule can be applied, by Lemma 7, we have that Let M ′ be a minimum edge cover of G[P f ∪ P ′ f ]. Then, we claim that |D| + |M | ≥ |D f | + |M ′ |. First, |D| ≥ |D f | because D f ⊆ D. We now claim that |M | ≥ |M ′ |. Note that P f ⊆ P ∩ C and P ′ f ⊆ P ∩ Z, so P f ∪ P ′ f ⊆ P . M is an edge cover of G[P ], and M ′ is a minimum edge cover of G[P f ∪ P ′ f ], with P f ∪ P ′ f ⊆ P , so necessarily |M | ≥ |M ′ |. Since EDGE COVER is in P, we have constructed in polynomial time a mixed dominating set of size at most |D| + |M |. ✷ We can now prove the main result of this section : Theorem 7 MIXED DOMINATING SET can be solved in time O * (1.912 n ) and polynomial space.
Proof: The algorithm first enumerates all minimal vertex covers C; then applies all Rules exhaustively; and then for each branch invokes Lemma 8. In the end we output the best solution found. By Lemma 1 and Lemma 2 we obtain (assuming we have already taken isolated vertices) that there exists an optimal nice mds partition V = D ∪ P ∪ I and a minimal vertex cover with D ⊆ C ⊆ D ∪ P , so consider the execution of the algorithm on C. We have proven that one of the branches will end up with a good tuple, and by Lemma 7 when we can no longer apply any Rules, U is empty, so we correctly solve the resulting instance in polynomial time by Lemma 8. Hence, the algorithm produces a correct solution.
Let us now analyze the running time. First, enumerating all minimal vertex cover takes time at most O * (3 n/3 ), which is also an upper bound on the number of such covers by a result of Moon and Moser (1965). Moreover, we observe that we can decide if a Rule applies in polynomial time, and the algorithm of Lemma 8 runs in polynomial time. We therefore only need to bound the number of subinstances the branching step will produce, as a function of n.
Of all the branching vectors, the worst case is given by Branching Rule B5, which leads to a complexity of 1.3252 l . Taking into account the cost of enumerating all minimal vertex covers and the fact that l ≤ n, the running time of our algorithm is O * (3 n/3 · 1.3252 n ) = O * (1.912 n ). ✷

FPT Algorithm
In this section, we describe an algorithm for the MIXED DOMINATING SET problem parameterized by the solution size k running in time O * (3.510 k ). Let us give an overview of our algorithm. Consider an instance (G = (V, E), k) of the MIXED DOMINATING SET problem parameterized by k, and fix, for the sake of the analysis, a solution of size k which is a nice mixed dominating set. If a solution of size k exists, then a nice solution must exist by Lemma 1 (assuming without loss of generality that G has no isolated vertices), so suppose it gives the nice mds partition V = D ∪ P ∪ I. Note that for such a solution D ∪ M of size k, we have k ≥ |D| + |P |/2 since |M | ≥ |P |/2. Our algorithm begins by performing a branching step similar in spirit to that of the algorithm of Theorem 7, trying to guess a part of this partition. In particular, we gradually build up two disjoint sets D f , P f which store the vertices that must belong to D and P respectively. Let U = V \ (D f ∪ P f ) be the set of "undecided vertices" and, furthermore, let U * = U \ N (D f ) be the set of undecided vertices which are not currently dominated by the solution. Our algorithm proceeds in the following steps: (i) first, we branch with the goal of eliminating U * , that is, with the goal of finding a partial solution that dominates all vertices (ii) then, because the considered solution is nice, we observe that we cannot place any more vertices in D f ; we therefore perform a simple "vertex cover"-type branching in G[U ], until we arrive at a situation where the maximum degree of G[U ] is 1 (iii) then, we invoke a result of Xiao and Sheng (2019) to complete the solution in polynomial time. As with the algorithm of Theorem 7, we use the fact that the sought solution is nice to speed up the branching on low-degree vertices.
Step 1: Branch to eliminate U * .
Recall that we have fixed for the analysis an optimal nice mds partition V = D ∪ P ∪ I. As with the algorithm of Theorem 7, it will be convenient to describe a recursive algorithm which is given two disjoint sets of vertices D f , P f . We will say that the sets (D f , P f ) are good if D f ⊆ D and P f ⊆ P . Clearly, these conditions are satisfied if D f = P f = ∅. We will describe a series of Rules, which must be applied exhaustively, always selecting the first Rule that can be applied. For correctness, we will show that for each branching Rule, if the current instance is characterized by a good pair (D f , P f ), at least one of the produced instances is also good. When no Rule can be applied, we will proceed to the next step.
Recall that we denote U = V \ (D f ∪ P f ) and U * = U \ N (D f ). Our strategy will be to branch in a way that eliminates U * as quickly as possible because, as we will see in the next step, once this is done the problem becomes much easier. We begin branching from low-degree vertices, which will allow us to assume that all remaining vertices are high-degree as we consider later Rules. Here, for a vertex u ∈ U * we are mostly interested in its degrees in G[U ] and in G[ As in the algorithm of Theorem 7, we will present each Rule individually and directly after explain why it is correct and its associated running-time. Recall for the sake of the analysis that an instance is good if D f ⊆ D and P f ⊆ P .
• The Sanity Check Rule will reject if either the currently decided vertices in D f and P f have total cost more than k (which implies that this is not a good instance, as the correct partition has cost at most k); or if a vertex u ∈ D f has at most one private neighbor in U * . Since the number of private neighbors of u can only diminish if we add vertices to D f , if u ∈ D this would contradict the niceness of the partition D ∪ P ∪ I. Hence, in this case also the current instance is not good.
Reduction Rule (R1): If there exists u ∈ U * with d U (u) = 0, then put u in P f , that is, recurse on the instance (D f , P f ∪ {u}).
• If the current instance is good, then u ∈ D (because it would not have two private neighbors) and u ∈ I (because it would not be dominated). Hence, the new instance is also good.
Now that we have presented our Sanity Check Rule and our only Reduction Rule which we first apply in our algorithm, we will describe the Branching Rules. Thus, we need first to define our measure of progress. We define it to be l = 2k − 2|D f | − |P f |. Initially, l = 2k, and we observe that because of the Sanity Check Rule in all produced instances we have l ≥ 0. We will therefore upper bound the number of produced instances by measuring how much each Branching Rule decreases l. Let T (l) be the maximum number of branches produced for an instance where measure has value l. We now consider each Branching Rule individually: Branching Rule (B1): If there exists u ∈ U * with d U (u) = 1, then let N U (u) = {v}. Branch on the following two subinstances: (D f , P f ∪ {u}) and (D f ∪ {v}, P f ).
• We note that u ∈ D, because it would not have two private neighbors. If u ∈ I, then v ∈ D, because u must be dominated. Hence, one of the branches is good.
We are now at a situation where all vertices u ∈ U * have d U (u) ≥ 2.
• We again have u ∈ D, because it would not have two private neighbors. If u ∈ I, then {v 1 , v 2 } ⊆ D ∪ P and we consider all such possibilities, except v 1 , v 2 ∈ P , because u must be dominated.
Before presenting Branching Rule 2.2, we make a simple observation we will use several times in the rest of the algorithm: for a vertex u ∈ U * with two neighbors v 1 , v 2 ∈ U , if we put u in D f with v 1 and v 2 its private neighbors, then we must put (N U (v 1 ) ∪ N U (v 2 )) \ {u} in P f in order to have v 1 and v 2 the private neighbors of u.
Let us also introduce another helpful definition. For v 1 , v 2 ∈ U , we will say that In other words, {v 1 , v 2 } is not feasible, if placing both vertices in D f would immediately activate the Sanity Check rule because one of the two vertices would not have enough private neighbors.
Branching Rule (B2.2): If there exists u ∈ U * with d U (u) = 2, then let N U (u) = {v 1 , v 2 }. Branch on the following subinstances: • We have the same cases as before, but now it is possible that u ∈ D. However, in this case v 1 , v 2 must be private neighbors of u, hence (N U (v 1 ) ∪ N U (v 2 )) \ {u} must be a subset of P .
• Since B2.1 does not apply, we have We consider the following cases: Also, the Sanity Check Rule is activated for the instance where v 1 , v 2 ∈ D f . Taking into account the remaining instances we have: T (l) ≤ T (l − 1) + 3T (l − 3).
We are now at a situation where all vertices u ∈ U * have d U (u) ≥ 3.
Branching Rule (B3.1): If there exists u ∈ U * with d U (u) = 3 and d U * (u) ≤ 2, then let • We observe that if u ∈ D, then v 1 , v 2 must be its private neighbors, so again (N U (v 1 ) ∪ N U (v 2 )) \ {u} must be a subset of P . If u ∈ I we consider all partitions of N U (u) into D and P , while ensuring that u is dominated.
Branching Rule (B3.2): If there exists u ∈ U * with d U (u) = 3 such that there exist at least two feasible pairs in N U (u), then we do the following.
. Furthermore, branch on the instances (D f , P f ∪{u}) and, for each non-empty • We branch in a similar fashion as in Branching 3.1, except that for all i, j ∈ {1, 2, 3} with i < j, we consider the case that v i , v j are private neighbors of u, when u ∈ D.
• We make a variation of the previous branching by arguing that if u ∈ D then either v 1 is its private neighbor, or both v 2 , v 3 are its private neighbors.
• Now at least two pairs in {v 1 , v 2 , v 3 } are not feasible (otherwise we would have applied B3.2). Then, the Sanity Check Rule eliminates all branches where D contains an infeasible pair. From the remaining branches we get T (l) ≤ T (l − 1) + 5T (l − 4) + T (l − 5).
We are now at a situation where all vertices u ∈ U * have d U (u) ≥ 4. The next case we would like to handle is that of a vertex u ∈ U * with d U (u) = d U * (u) = 4. For such a vertex let N U (u) = {v 1 , v 2 , v 3 , v 4 }. Let us now give one more helpful definition. For some i ∈ {1, 2, 3, 4}, we will say that v i is compatible for u, if N U * (v i ) contains at least two vertices which are not neighbors of any v j , for j ∈ {1, 2, 3, 4} \ {i}. In other words, v i is compatible if it has two private neighbors, which will remain private even if we put all of {v 1 , v 2 , v 3 , v 4 } in D f . Using this definition, we distinguish the following two cases: and all v i are compatible for u, then we branch on the following instances: • The branching is similar to B3.2: if u ∈ D, then two of its neighbors must be private and we consider all possibilities.
• If all v i ∈ U * and all v i are compatible for u that means that for all i, j ∈ {1, 2, 3, 4}, with i < j, where we use that v i has at least two neighbors in U which are not connected to v j (and vice-versa) and that d U (v i ), d U (v j ) ≥ 4 since previous Rules do not apply. We therefore have T (l) ≤ T (l − 1) + 4T (l − 5) + 6T (l − 6) + 10T (l − 7) + T (l − 8).
If the previous rule does not apply, vertices u ∈ U * with d U (u) = 4 have either d U * (u) ≤ 3 or a neighbor v i ∈ N U (u) is not compatible for u. Branching Rule (B4.2): If there exists u ∈ U * with d U (u) = 4, then let N U (u) = {v 1 , v 2 , v 3 , v 4 }. Suppose without loss of generality that for all 1 ≤ j ≤ d U * (u) we have v j ∈ U * (that is, vertices of N U * (u) are ordered first), and that if there exists a feasible pair in N U * (u), then {v 1 , v 2 } is feasible. We produce the instances: (D f , P f ∪ {u}); for each non-empty subset S ⊆ N U (u), let S c = N U (u) \ S, we branch on (D f ∪ S, P f ∪ S c ); if d U * (u) ≥ 2 we produce the branch (D f ∪ {u}, P f ∪ ((N U (v 1 ) ∪ N U (v 2 )) \ {u})); for 3 ≤ j ≤ d U * (u) we produce the branch (D f ∪ {u}, P f ∪ (N U (v j ) \ {u})).
• Either u ∈ P (which we consider), or u ∈ I, so we consider all partitions of N U (u) into D, P that dominate u, or u ∈ D. For the latter to happen it must be the case that d U * (u) ≥ 2. In that case, either v 1 , v 2 are both private neighbors, or v 3 is a private neighbor (if v 3 ∈ U * ), or v 4 is a private neighbor (if v 4 ∈ U * ).
-If d U * (u) = 4, we note that it cannot be the case that {v 1 , v 2 , v 3 , v 4 } ⊆ D, since this would mean that all v i are compatible for u and Rule B4.1 would have applied. The branch corresponding to S = {v 1 , v 2 , v 3 , v 4 } is therefore eliminated by the Sanity Check Rule. We consider two subcases: * At least one feasible pair exists in N U * (u), therefore, {v 1 , v 2 } is a feasible pair. Then T (l) ≤ T (l − 1) + 6T (l − 5) + 6T (l − 6) + 5T (l − 7).
* No feasible pair exists. In this case the Sanity Check Rule eliminates all sets S ⊆ N U (u) that contain two or more vertices. We have T (l) ≤ T (l − 1) + 7T (l − 5).
We are now at a situation where all vertices u ∈ U * have d U (u) ≥ 5.
Branching Rule (B5): If there exists u ∈ U * with d U (u) ∈ {5, 6, 7, 8}, then select such a u with minimum d U (u) and let i = d U (u) and N U (u) = {v 1 , . . . , v i }. Again, without loss of generality we order the vertices of N U * (u) first, that is, for 1 ≤ j ≤ d U * (u), we have v j ∈ U * . Branch on the following: (D f , P f ∪ {u}); for each non-empty subset • We generalize the previous branching to higher degrees in the obvious way: if u ∈ D, either the two first of its d U * (u) neighbors in U * are its private neighbors, or one of its remaining d U * (u) − 2 neighbors in U * is private.
• Let i = d U (u). Note that we then assume that d U (v j ) ≥ i for all j ∈ {1, . . . , d U * (u)}, since we selected u with the minimum d U (u). Hence the branches where u ∈ D f diminish l by at least i + 1. We then have T (l) ≤ T (l − 1) + (i − 1)T (l − i − 1) + i j=1 i j T (l − i − j), which corresponds to the case where d U * (u) = d U (u).
Theorem 8 MIXED DOMINATING SET parameterized by the size of the solution k can be solved in time O * (3.510 k ).
Proof: The algorithm applies the Rules exhaustively and when no Rule applies invokes Lemma 10. Fix an optimal nice mds partition V = D ∪ P ∪ I. We assume that no isolated vertices exist, so such a nice partition exists by Lemma 1. For correctness, we need to argue that if the cost |D| + |P | 2 is at most k, the algorithm will indeed output a solution of cost at most k. Observe that the initial instance is good, and we always produce a correct instance when we branch since all our Rules are correct, and by Lemma 10 the solution is optimally completed when no Rule applies, so if the optimal partition has cost at most k, the algorithm will produce a valid solution of cost at most k.
Let us now analyse the running time. We observe first that we can decide if a Rule applies in polynomial time, and the algorithm of Lemma 10 runs in polynomial time. We therefore only need to bound the number of subinstances the branching step will produce, as a function of k.
Of all the branching vectors, the worst case if given by Branching Rule B3.2, which leads to a complexity of 1.8734 l . Taking into account that l ≤ 2k, the running time of our algorithm is O * (1.8734 l ) = O * (3.510 k ). ✷

Conclusion
In this paper, we study the MIXED DOMINATING SET problem from the exact and parameterized viewpoint. We prove first that the problem can be solved in time O * (5 tw ), and we prove that this algorithm and the one for pathwidth running in time O * (5 pw ) (Jain et al. (2017)) are optimal, up to polynomial factors, under the SETH. Furthermore, we improve the best exact algorithm and the best FPT algorithm parameterized by the solution size k, from O * (2 n ) and exponential space to O * (1.912 n ) and polynomial space, and from O * (4.172 k ) to O * (3.510 k ), respectively. Concerning FPT algorithms for some parameters, an interesting study would be to obtain such tight results for other parameters such as bandwidth, now that the questions for pathwidth, treewidth and cliquewidth are closed. Moreover, it seems hard to improve our exact and FPT algorithms parameterized by k using the standard technique of running time analysis we have used, but using the measure-and-conquer method could give improved bounds.