Theoretical Computer Science 576 (2015) 102–116
Contents lists available at ScienceDirect
Theoretical Computer Science www.elsevier.com/locate/tcs
Tractability and hardness of flood-filling games on trees Michael R. Fellows a , Uéverton dos Santos Souza b,c,∗ , Fábio Protti b , Maise Dantas da Silva d a
Charles Darwin University, Darwin, Australia Institute of Computing – Fluminense Federal University, Niterói, Brazil Federal Center of Technological Education of Rio de Janeiro, Rio de Janeiro, Brazil d Institute of Computing Science – Fluminense Federal University, Rio das Ostras, Brazil b c
a r t i c l e
i n f o
Article history: Received 1 September 2014 Received in revised form 6 February 2015 Accepted 8 February 2015 Available online 17 February 2015 Communicated by D. Peleg Keywords: Flood-It Free-Flood-It Shortest common supersequence NP-hardness W[1]-hardness Fixed-parameter tractability
a b s t r a c t This work presents new results on flood-filling games, Flood-It and Free-Flood-It, in which the player aims to make the board monochromatic with a minimum number of flooding moves. A flooding move consists of changing the color of the monochromatic component containing a vertex p (the pivot of the move). These games are originally played on grids; however, when played on trees, we have interesting applications and significant effects on problem complexity. In this paper, a complete mapping of the complexity of flood-filling games on trees is made, charting the consequences of single and aggregate parameterizations by: number of colors, number of moves, maximum distance from the pivot, number of occurrences of a color, number of leaves, and difference between number of moves and number of colors. We show that Flood-It on trees and Restricted Shortest Common Supersequence (RSCS) are analogous problems, in the sense that they can be translated from one to another, preserving complexity issues; this implies interesting FPT and W[1]-hard cases to FloodIt. Restricting attention to phylogenetic colored trees (where each color occurs at most once in any root-leaf path, in order to model phylogenetic sequences), we also show some impressive NP-hard and FPT results for both games. In addition, we prove that Flood-It and Free-Flood-It remain NP-hard when played on 3-colored trees, which closes an open question posed by Fleischer and Woeginger. Finally, we present a general framework for reducibility from Flood-It to Free-Flood-It; some NP-hard cases for Free-Flood-It can be derived using this approach. © 2015 Elsevier B.V. All rights reserved.
1. Introduction Let G be a graph equipped with a vertex-coloring ω . A monochromatic path of G is a path in which all the vertices have the same color, and two vertices a, b ∈ V (G ) are said m-connected if there is a monochromatic path between them, i.e., a and b are in the same monochromatic component (maximal monochromatic connected subgraph). A flooding move m = ( p , c ) in G consists of changing to c the color of a pivot vertex p ∈ V (G ), and of all vertices m-connected to p. The problem of determining the minimum number of flooding moves to make the graph monochromatic is called Free-Flood-It.
*
Corresponding author at: Federal Center of Technological Education of Rio de Janeiro, Rio de Janeiro, Brazil. E-mail addresses:
[email protected] (M.R. Fellows),
[email protected] (U.S. Souza),
[email protected] (F. Protti),
[email protected] (M. Dantas da Silva). http://dx.doi.org/10.1016/j.tcs.2015.02.008 0304-3975/© 2015 Elsevier B.V. All rights reserved.
M.R. Fellows et al. / Theoretical Computer Science 576 (2015) 102–116
103
Fig. 1. An optimal sequence of moves to flood a 3 × 3 grid when playing Flood-It.
Additionally, the problem of determining the minimum number of flooding moves to make the graph monochromatic using a fixed vertex as the pivot for all moves is called Fixed-Flood-It, or just Flood-It. The computational problems Flood-It and Free-Flood-It are generalizations of two combinatorial games named alike, where the input underlying graph is an m × n grid. In Flood-It on grids, the top left vertex is the fixed pivot of the game. Fig. 1 shows a sequence of moves to flood a 3 × 3 grid colored with five colors. Many complexity issues on Flood-It and Free-Flood-It have recently been investigated. In [5], Arthur, Clifford, Jalsenius, Montanaro, and Sach show that Flood-It and Free-Flood-It are NP-hard on n × n grids colored with at least three colors. Meeks and Scott [22] prove that Free-Flood-It is solvable in polynomial time on 1 × n grids, and also that Flood-It and Free-Flood-It remain NP-hard on 3 × n grids colored with at least four colors. To the best of the authors’ knowledge, the complexity of (Free-)Flood-It on 3 × n grids colored with three colors remains an open question. Free-Flood-It is known to be solvable in polynomial time on 2-colored graphs [5,19,22]. In [22], Meeks and Scott show that Free-Flood-It on paths can be solved in O (n6 ) time. Free-Flood-It on cycles can also be solved in polynomial time [12,24]. Clifford, Jalsenius, Montanaro, and Sach present in [5] a polynomial-time algorithm for Flood-It on 2 × n grids. In [23], Meeks and Scott show that Free-Flood-It remains NP-hard on 2 × n grids and it is fixed-parameter tractable when parameterized by the number of colors. Fleischer and Woeginger [10] proved that Flood-It is NP-hard on trees. In [33], Souza, Protti and Dantas da Silva describe polynomial-time algorithms to play Flood-It on C n2 or P n2 (the second power of a cycle or a path on n vertices) and 2 × n circular grids, and also show that Free-Flood-It is NP-hard on C n2 , P n2 and 2 × n circular grids. There is a nice connection between the complexity of Free-Flood-It on trees and the complexity of the problem on general graphs. Meeks and Scott have shown that the minimum number of moves required to flood any given graph G is equal to the minimum, taken over all spanning trees T of G, of the number of moves required to flood T [24]. Applications of flood-filling games. Since the 90’s, an increasing number of papers have dealt with biological applications as combinatorial problems. Vertex-colored graph problems have several applications in bioinformatics [7]. The problem of deciding whether a c-vertex-colored graph G is a subgraph of an interval graph properly colored by c (Colored Interval Sandwich Problem, or Intervalizing Colored Graphs) [3] has applications in DNA physical mapping [9,15] and in perfect phylogeny [21]; vertex-recoloring problems appear in protein-protein interaction networks and phylogenetic analysis [4, 27]; the Graph Motif Problem [7], which aims to determine whether a graph G has a connected subset of vertices with a bijection between its colors and set of colors M, was introduced in the context of metabolic network analysis [18]; and the Triangulating Colored Graph Problem [3], which examines vertex-colored graphs that can be triangulated without the introduction of edges between vertices of the same color, it is polynomially equivalent to the Perfect Phylogeny Problem [16]. Flood-Filling games on colored graphs are also related to many problems in bioinformatics. As shown in this work, FloodIt played on trees is analogous to a restricted case of the Shortest Common Supersequence Problem [17]. Consequently, these games inherit from the Shortest Common Supersequence Problem many applications in bioinformatics, such as: microarray production [29], DNA sequence assembly [2], and a close relationship to multiple sequence alignment [31]. Some problems and properties on strings and sequences are more easily observed when translated to a flood-filling dynamics, as done in [7], where a variant of the SCS problem is proved to be fixed-parameter tractable via an argument based on a translation of the problem in terms of the Flood-It game. Besides that, some disease spreading models, described in [1], work in a similar way to flood-filling games. Flood-It played on trees can also be applied to scheduling. Each color corresponds to an operation in the sequential process of manufacturing an object. In the input tree T , paths from the pivot to the leaves correspond to the manufacturing sequences for a number of different objects that share the same production line. A flooding of T then corresponds to a schedule of operations for the production line that allows all of the different objects to be manufactured. A survey on scheduling of manufacturing operations is the paper [26]. Additional definitions and notation. A subgraph H of G is adjacent to a vertex v ∈ V (G ) if v has a neighbor in V ( H ). A flood move, or just move, is a pair m = ( p , c i ) where p is the pivot of m (the vertex chosen to have its color changed by m), and c i is the new color assigned to p; in this case, we also say that color c i is played in move m. In Flood-It all moves have the same pivot. A subgraph H is said to be flooded when H becomes monochromatic. A (free-)flooding is a sequence of moves in (Free-)Flood-It which floods G (the entire board). An optimal (free-)flooding is a flooding with minimum number of moves. A vertex v is flooded by a move m if the color of v is played in m and v becomes m-connected to new vertices after playing m. In Free-Flood-It, a move m = ( p , c i ) is played on subgraph H if p ∈ V ( H ). We denote by ∝ f a reduction from a problem to a problem via a computable function f . We present below the formal definitions of the two flood-filling games studied in this work.
104
M.R. Fellows et al. / Theoretical Computer Science 576 (2015) 102–116
Flood-It (decision version) Instance: A graph G equipped with a coloring ω, a pivot vertex p, and an integer λ. Question: Does there exist a sequence of at most λ flood moves which makes the graph monochromatic, using p as the pivot in all moves? Free-Flood-It (decision version) Instance: A graph G equipped with a coloring ω, and an integer λ. Question: Does there exist a sequence of at most λ flood moves which makes the graph monochromatic (where for each move a different pivot might be chosen)? It is easy to see that both problems belong to NP. Therefore the proofs of NP-completeness presented in this paper will only demonstrate the NP-hardness of the problems. Parameters of flood-filling games on trees. Given a decision problem P and some subset S = {s1 , . . . , sn } of the aspects of P , there are 3n different basic families of variants of the problem, based on which of the aspects is declared as either: 1. an unrestricted part of the input, 2. part of the aggregate parameterization, or 3. a fixed constant (yielding part of the indexing of the family of parameterized problems). As example, indexing by a constant d (the maximum distance from the pivot) we obtain the variant of Flood-It denoted by [d]-Flood-It where the instances are restricted to graphs such that each vertex is at a distance at most d from the pivot. As said in [35], a parameter is a function which extracts a particular aspect or set of aspects of a problem from instances of that problem. As such, a parameter is both a mechanism for isolating aspects of a problem and the “container” in which these aspects are packaged for subsequent manipulation. A parameterized problem is described informally by specifying:
• A generic instance in terms of its variables. • The aspects of an instance that comprise the parameter. • A yes-no question stated in terms of the generic instance. Definition 1. Let be a flood-filling game and let S = {s1 , . . . , sn } be a subset of the aspects of . [ S 1 ]-( S 2 ) is the family of parameterized problems where the aspects in S 1 ⊆ S are fixed constants and the aspects in S 2 ⊆ S form an aggregate parameter. As an example, [d]-Flood-It(c ) is the family of parameterized problems where d (the maximum distance to the pivot is a fixed constant) and c (the number of colors) is the parameter. This work develops a multivariate investigation of the complexity of Flood-It and Free-Flood-It when played on trees. We analyze the complexity consequences of parameterizing flood-filling problems in various ways. We consider the following aspects of the problem: c – number of colors
λ – number of moves d o k r
– – – –
maximum distance to the pivot maximum orbit number of leaves number of bad moves, r = (λ − c )
Given a vertex-colored tree T , the orbit of a color b in T , ob , is the number of occurrences of b in T . We say the maximum orbit of a vertex-colored tree T is the maximum orbit of a color used in T . A good move for a color ca is a move that floods all non-flooded vertices having color ca . A move that is not good for some color is a bad move. As in Free-Flood-It there is no fixed pivot, for such a game the parameter d stands for the diameter of the graph. Our results. In Section 2, we prove that Flood-It remains NP-hard on trees whose maximum orbit is 4 and whose leaves are at distance at most d = 2 from the pivot. Furthermore, we show that Flood-It is in FPT when parameterized by the number of colors c in trees with constant d. Also in Section 2 we show that Flood-It on trees and Restricted Shortest Common Supersequence – RSCS (see definition in Section 2.1) are analogous problems, in the sense that they can be translated from one to another, preserving complexity issues; this implies that Flood-It on trees inherits several complexity results already proved for RSCS, such as some interesting FPT and W[1]-hard cases. In addition, we prove that Flood-It played on general graphs can be solved in polynomial time when considering r as the parameter. Restricting attention to trees where each
M.R. Fellows et al. / Theoretical Computer Science 576 (2015) 102–116
105
Fig. 2. (a) A graph G; (b) tree T obtained from G.
symbol occurs at most once in any path from the pivot to a leaf (each such path is analogous to a phylogenetic sequence [8]), we prove the NP-hardness of Flood-It even when restricted to such trees, and the fixed-parameter tractability of the game played on such trees when considering the number of bad moves or the maximum orbit as the parameter. In addition, we prove that Flood-It remains NP-hard when played on 3-colored trees, which settles an open problem posed by Fleischer and Woeginger [10]. We conclude Section 2 by introducing a new variant of Flood-It, called Multi-Flood-It, where each move is played on a set of fixed pivots; we consider Multi-Flood-It played on trees where the pivots are the leaves, and derive some complexity results. In Section 3, we present a general framework for reducibility from Flood-It to Free-Flood-It, by defining a special graph operator ψ such that Flood-It played on a graph class F is reducible to Free-Flood-It played on the image of F via ψ . An interesting particular case occurs when F is closed under ψ (for instance, trees are closed under ψ ). Some NP-hard cases for Free-Flood-It on trees can be derived using this approach. We conclude Section 3 by showing some results on the parameterized complexity of Free-Flood-It played on pc-trees (phylogenetic colored trees). A colored rooted tree is a pc-tree if no color occurs more than once in any path from the root to a leaf. We prove that some results valid for Flood-It on pc-trees can be inherited by Free-Flood-It on pc-trees, using another type of reducibility framework. An extended abstract containing part of this work has previously appeared in [32]. 2. Flood-It on trees We start this section by remarking that, in this work, “Flood-It played on a tree” means precisely “Flood-It played on a rooted tree whose root is the fixed pivot.” Theorem 1. [d]-Flood-It on trees remains NP-hard when d = 2. Proof. The proof uses a reduction from the Vertex Cover Problem. Given a graph G = ( V , E ) with | V | = n and | E | = m, we show that there is a vertex cover of size k in a graph G if and only if there is a flooding with n + k moves in the associated tree T . From G we construct a tree T as follows: – create a pivot root s with color c s ; – for each edge e i = uv of G, add to T a subset of vertices E i = {u i , v i , u i , v i } such that u i , v i are children of s, v i is a child of u i , and u i is a child of v i ; – define a distinct color c u for each u ∈ V (G ), and color all vertices of the form u i , u i (for all i) with the color c u . Fig. 2 shows a graph G and its associated tree T . Suppose that G has a vertex cover V of size k. By construction, the set of vertices not flooded have n colors. By playing n moves (using all the n colors, one for each move), each subset E i still contains a vertex not m-connected to s. Thus we can play these n moves in the following order: initially, moves played on colors assigned to vertices of V , and then other moves. Since every edge in G contains at least one of its endpoints in V , after these n moves the vertices in T not m-connected to s have colors associated with vertices of V . Since | V | = k, we will need at most k additional moves, and therefore the flooding will have n + k moves, as required. Now assume that T has a flooding with n + k moves. Initially, T contains only the color c s and n other colors forming a set S of colors. Hence, each color of S is played at least once. We divide the colors of S into two groups: the first group is formed by the colors played more than once, and the second group by colors played only once. Note that, the first group has cardinality at most k and in order to flood a subset E i , the first and the last moves played on it are moves played on colors of the first group. Hence, for each edge e i = (u , v ) ∈ E (G ), at least one of c u and c v must be played twice in any sequence that floods T , thus the set of colors that are played at least twice corresponds to a vertex cover of size at most k in G. 2
106
M.R. Fellows et al. / Theoretical Computer Science 576 (2015) 102–116
Theorem 2. [d]-Flood-It(c ) on trees is in FPT and admits a polynomial kernelization. Proof. Let T be a tree with n vertices and pivot p. We show below how to find a polynomial kernel (i.e., a kernel whose size is bounded by a polynomial in c) for the problem, in O (n) time. Apply the following kernelization algorithm: 1. set T = T ; 2. contract all children of p in T with color c i into a single vertex of color c i . Note that this rule can be applied since the contracted vertices will always be flooded by the same move in T ; 3. recursively repeat the previous step for each non-leaf child of p in T . After applying the above algorithm, each vertex in T has at most c children. Thus, T has at most cd vertices and is a polynomial kernel for the problem. 2 Corollary 3. [o, d]-Flood-It on trees remains NP-hard even when o = 4 and d = 2. Proof. Garey, Johnson, and Stockmeyer proved that Vertex Cover remains NP-hard even for cubic graphs [14]. By restricting the reduction presented in Theorem 1 to cubic graphs, we can also conclude that Flood-It remains NP-hard even on trees whose maximum orbit is equal to six (o = 6) and whose leaves are at distance at most two from the pivot (d = 2). To decrease the maximum orbit to 4, just contract all children of s with color c i into a single vertex of color c i . 2 When Flood-It is played on trees, there are classes of equivalent trees. Given two instances T i and T j of Flood-It on trees, they are equivalent if and only if every flooding for T i is also a flooding for T j , and vice-versa. In other words, T i and T j are equivalent if and only if by applying the algorithm presented in Theorem 2 to T i and T j in order to obtain T i and T j , and next contracting the maximal monochromatic subgraphs of T i and T j , the resulting trees are identical. 2.1. Analogous problems It can happen that two seemingly different problems are so tightly related that they are essentially equivalent, even though this might not be obvious. We offer these two examples for motivation to the definitions below that seek to capture this situation. Example 1. Consider the two well-known problems Directed Feedback Vertex Set (DFVS), and Shortest Common Supersequence for Length Two Sequences (SCSL2) (refer to [13] for definitions). A natural parameterization for DFVS is the minimum size k of a set of vertices that covers all directed cycles. A natural parameterization for SCSL2, is the minimum k such that there is a supersequence of length || + k, noting that every letter occurring in the set of length 2 sequences will have to occur at least once in a solution supersequence. We leave it as an exercise for the reader that these are essentially the same problem! (This yields a much simpler proof of the NP-hardness of SCS than the original proof given by Maier [20].) Example 2. Consider the one-player Letter Deletion Game, where one is given a set of sequences over and alphabet and move consists on choosing a letter a ∈ , and for each sequence that ends in a, deleting that letter. The goal is to make a minimum number of moves to erase all the sequences. It is easy, but not completely obvious, that this is the same as Shortest Common Supersequence. In this sense, we present some definitions which provide a useful mechanism to show the equivalence between problems and directly show the tractability and the hardness of many cases both from the classical and parameterized point of view. Definition 2. Two optimization problems and are said to be analogous if there exist linear-time reductions f , g such that: 1. ∝ f and ∝ g ; 2. every feasible solution s for an instance I of implies a feasible solution s for f ( I ) such that size(s) = size(s ); 3. every feasible solution s for an instance I of implies a feasible solution s for g ( I ) such that size(s ) = size(s). Next we have an equivalent definition for decision problems. Denote by Y () the set of all instances I of yielding a yes-answer for the question “I ∈ Y ()?”. Definition 3. Two decision problems and in NP are said to be analogous if there exist linear-time reductions f , g such that:
M.R. Fellows et al. / Theoretical Computer Science 576 (2015) 102–116
107
1. ∝ f and ∝ g ; 2. every easily checkable certificate C for the yes-answer of the question “I ∈ Y () ?” implies an easily checkable certificate C for the yes-answer of the question “ f ( I ) ∈ Y ( ) ?” such that size(C ) = size(C ), and C is computable from C in linear time; 3. every easily checkable certificate C for the yes-answer of the question “I ∈ Y ( ) ?” implies an easily checkable certificate C for the yes-answer of the question “g ( I ) ∈ Y () ?”, such that size(C ) = size(C ), and C is computable from C in linear time. Definition 4. Let and be analogous decision problems. The parameterized problems (k1 , . . . , kt ) and (k1 , . . . , kt ) are said to be p-analogous if there exist linear-time reductions f , g and a one-to-one correspondence ki ↔ ki such that: 1. (k1 , . . . , kt ) ∝ f (k1 , . . . , kt ) and (k1 , . . . , kt ) ∝ g (k1 , . . . , kt ); 2. every easily checkable certificate C for the yes-answer of the question “I ∈ Y ((k1 , . . . , kt ))?” implies an easily checkable certificate C for the yes-answer of the question “ f ( I ) ∈ Y ( (k1 , . . . , kt ))?” such that ki = ϕi (ki ) for some linear function ϕi (1 ≤ i ≤ t ); 3. every easily checkable certificate C for the yes-answer of the question “I ∈ Y ( (k1 , . . . , kt ))?” implies an easily checkable certificate C for the yes-answer of the question “g ( I ) ∈ Y ((k1 , . . . , kt ))?” such that ki = ϕi (ki ) for some linear function ϕi (1 ≤ i ≤ t ). Two straightforward consequences of the above definitions are: (a) if and are analogous problems then is in P (is NP-hard) if and only if is in P (is NP-hard); (b) if (k1 , . . . , k ) and (k1 , . . . , k ) are p-analogous problems then (k1 , . . . , k ) is in FTP (admits a polynomial kernel/is W[1]-hard) if and only if (k1 , . . . , k ) is in FTP (admits a polynomial kernel/is W[1]-hard). Fleischer and Woeginger used a reduction from the Fixed Alphabet Shortest Common Supersequence Problem [10] to prove that Flood-It on trees is NP-hard even when the number of colors is fixed. We show that Flood-It on trees and Restricted Shortest Common Supersequence(RSCS) are analogous problems. RSCS is a variant of SCS – Shortest Common Supersequence [8]. Shortest Common Supersequence (SCS) (decision version) Instance: A set of strings S = s1 , . . . , s over an alphabet , an integer . Question: Does there exist a string s ∈ of length at most that is a supersequence of each string in S? Restricted Shortest Common Supersequence (RSCS) (decision version) Instance: A set of ρ -strings R = r1 , . . . , r over an alphabet , an integer . (A ρ -string is a string with no identical consecutive symbols.) Question: Does there exist a string r ∈ of length at most that is a supersequence of each ρ -string in R? Let SCS(|1 |, 1 ) stand for the SCS problem parameterized by |1 | and 1 (1 is the number of strings). The notation RCSC(|2 |, 2 ) is used similarly. Theorem 4. SCS(|1 |, 1 ) is FPT-reducible to RSCS(|2 |, 2 ). Proof. Let I be an instance of SCS(|1 |, 1 ). Create an instance I of problem RSCS(|2 |, 2 ) as follows: for each string si of I define a ρ -string r i of I by inserting a new symbol c i after each symbol of si . After this construction, I contains 2 = 1 ρ -strings over an alphabet 2 such that |2 | = |1 | + 1 . At this point, it is easy to see that I contains a supersequence of length L if only if I contains a supersequence of length |s1 | + . . . + |s1 | + L. 2 Theorem 5. (a) Flood-It on trees and RSCS are analogous problems. (b) Flood-It(c , k, λ) on trees is p-analogous to RSCS(||, , ). Proof. We prove only item (a), the proof of (b) is similar. Given an instance I of RSCS, we create a colored tree T as follows: (i) each position of a string in I is converted into a vertex of T ; (ii) if a position of a string in I contains a character c i then the corresponding vertex of T receives color c i ; (iii) an edge is added between two vertices of T if and only if they represent consecutive positions of the same string; (iv) a pivot vertex p is created in T with a new color; (v) an edge ( p , v ) is added to T if v represents the first position of a string in I . After this construction, note that if I admits a supersequence of length L then T has a flooding with L moves, obtained by traversing the supersequence and playing color c i in the jth-move if character c i is in the jth-position of the supersequence.
108
M.R. Fellows et al. / Theoretical Computer Science 576 (2015) 102–116
Similarly, given a flooding F of T with k moves, we can construct a supersequence s of length k for I , by just adding character c i in position j of s if and only if color c i is played in the jth-move of F . On the other hand, given an instance T of Flood-It on trees, we create an instance I of RSCS as follows: (i) each color in T is associated with a character of the alphabet over which strings in I are defined; (ii) for each path P from the pivot to a leaf in T , a string r ( P ) of I is created by first contracting each maximal monochromatic subgraph of P into a single vertex with the same color, and then by adding character c i in the jth-position of r ( P ) if the vertex in P at distance j > 0 from the pivot has color c i . If T has a flooding with k moves then I admits a supersequence of length k, since, in order to flood a leaf, one needs to flood the path that connects it to the pivot. As previously, if I admits a supersequence of length L then T has a flooding with L moves, obtained by traversing the supersequence and playing color c i in the jth-move if character c i is in the jth-position of the supersequence. 2 Observation. By Theorem 2 and Theorem 5(b), the problem RSCS parameterized by ||, where ρ -strings have length bounded by a constant l, admits a polynomial kernel, namely, a data structure known as a trie [11] constructed from the input ρ -strings. Such a data structure is a prefix tree with at most ||l nodes. We remark that the book [13] (see Appendix) reports that the SCS problem is solvable in polynomial time when each string has size two. This assertion is false, as we can see by Theorems 1 and 5. This observation was also made by Timkovskii [34]. Corollary 6. Flood-It on paths with arbitrary pivot is analogous to RSCS for ≤ 2. By Theorem 5, results valid for RSCS can be inherited by Flood-It on trees: Corollary 7. [k]-Flood-It on trees can be solved in polynomial time. Proof. Follows from Theorem 5(a) and the analogous result in [20]: SCS (and thus RSCS) is solvable in polynomial time for a constant number of strings. 2 Corollary 8. Flood-It(k, c ) on trees is W[1]-hard. Proof. Follows from Theorems 4, Theorem 5(b), and the analogous result in [28]: SCS(|1 |, k1 ) is W[1]-hard.
2
We close this section by stating a theorem that applies to general graphs: Theorem 9. [r ]-Flood-It on general graphs can be solved in polynomial time. Proof. There are c r possibilities of arrangement of colors for the sequence of r bad moves. Given a sequence of r bad moves, in order to check whether it is possible to flood the input graph using these bad moves, just before and after each bad move apply all possible good moves. 2 2.2. Phylogenetic colored trees As previously described, Flood-It played on trees can be applied to scheduling manufacturing operations. In such an application, it may reasonably be the case that each object to be manufactured requires any given operation to be applied at most once. This motivates the following definition: Definition 5. A colored rooted tree is a pc-tree (phylogenetic colored tree) if no color occurs more than once in any path from the root to a leaf. Restricting attention to phylogenetic colored trees, we have significant effects on problem complexity. Note that pc-trees have previously appeared in the text. The tree obtained in the construction of Theorem 1 is indeed a phylogenetic colored tree, and hence Corollary 3 also applies to pc-trees. Furthermore, the kernelization algorithm presented in the proof of Theorem 2 can also be used to reduce an input pc-tree to another equivalent pc-tree. Corollary 10. Flood-It on trees remains NP-hard even when restricted to pc-trees with pivot root. Proof. Follows from Theorem 5(a) and the analogous result in [8]: SCS (and also RSCS) is NP-hard even for strings where no symbol occurs more than once. 2
M.R. Fellows et al. / Theoretical Computer Science 576 (2015) 102–116
109
Fig. 3. Cpc-tree T obtained from the pc-tree presented in Fig. 2(b).
Corollary 11. Flood-It(k) on pc-trees with pivot root is W[1]-hard. Proof. Follows from Theorem 5(b) and the analogous result in [8]: SCS (and also RSCS) restricted to strings where no symbol occurs more than once is W[1]-hard when parameterized by the number of strings. 2 Definition 6. A pc-tree T is a cpc-tree (complete pc-tree) if each color occurs exactly once in any path from the root to a leaf. Cpc-trees are a special subclass of pc-trees. Many hard cases of Flood-It on pc-trees are easy to solve when restricted to cpc-trees; for example, while Flood-It on pc-trees remains NP-hard for any fixed d ≥ 2, Flood-It on cpc-trees is trivially solvable IN polynomial time for any fixed d. As in biological applications the phylogenetic sequences are often complete, the complexity of flood-filling games for complete pc-trees is an interesting issue. Theorem 12. Flood-It on trees remains NP-hard even when restricted to cpc-trees with pivot root. Proof. The proof is based on modifying the construction shown in Theorem 1. Let (G , k) be the instance of Vertex Cover Problem used in Theorem 1 where | V (G )| = n and | E (G )| = m, and let T be a tree obtained as in Theorem 1. We can construct a cpc-tree T from T as follows: initially, set T = T ; replace each edge e i = ( p , v i ) (where p is the pivot) by a path P i containing 3n + k − 1 vertices; add an edge from p to the first vertex of P i , and another from v i to the last neighbor of P i ; Let {c 1 , c 2 , . . . , cn } be the set of colors in T (disregarding the pivot color). For each path P i = w 1 , w 2 , . . . , w 3n+k+1 , assign to w 1 , w 2 , . . . , w n−2 the colors c 1 , c 2 , . . . , cn , respectively (disregarding the color of v i and its children); • For j = n − 1, . . . , 3n + k − 1, assign to the vertices in level j + 1 a new color c j .
• • • •
Fig. 3 illustrates the cpc-tree T obtained from the pc-tree presented in Fig. 2(b). Let G be the graph from which T was constructed. We show that G has a vertex cover of size k if and only if T has a flooding of size 4n + 2k + 1. Suppose that G has a vertex cover V of size k. By construction, T can be flooded by first playing the colors c 1 , c 2 , . . . , cn , cn+1 , cn+2 , . . . , c 3n+k+1 and then playing a sequence of n + k moves as described in the proof of Theorem 1.
110
M.R. Fellows et al. / Theoretical Computer Science 576 (2015) 102–116
Conversely, if T has a flooding F of size 4n + 2k + 1 then no vertex in S 1 is flooded together with a vertex in V ( T ) by the same move, otherwise there exist two distinct root-leaf paths P i and P j such that no pair of vertices in S 2 ∩ ( P i ∪ P j ) is flooded by the same move, which is a contradiction since | S 2 ∩ ( P i ∪ P j )| = 4n + 2k + 2. Observe that: (a) S 1 is flooded with at least n moves; (b) S 2 is flooded with at least 2n + k + 1 moves (| S 2 ∩ P i | = 2n + k + 1 for any root-leaf path P i ); (c) V ( T ) is flooded with at most n + k moves. By (a), (b), and (c), it follows that, as in the proof of Theorem 1, G has a vertex cover of size k. 2 In Corollary 3 we proved that Flood-It remains NP-hard even when restricted to pc-trees with maximum orbit 4. Theorem 14 shows that Flood-It on cpc-trees can be solved in polynomial time when considering the maximum orbit as a constant. Lemma 13. Sibling leaves of a cpc-tree have the same color. Proof. Let w be an internal vertex of a cpc-tree T with two leaf children v and u, and assume that v and u have distinct colors. As T is a cpc-tree, the color of u occurs once in the path from the pivot to v. Consequently, in the path from the pivot to u, the color of u occurs twice, which is a contradiction. 2 Theorem 14. [o]-Flood-It on cpc-trees can be solved in polynomial time. Proof. Let o( T ) be the orbit of a tree T and let k( T ) be the number of leaves of a tree T . Given a cpc-tree T , we first apply to T the algorithm presented in Theorem 2, obtaining a reduced tree T . If T has at most two colors, clearly the maximum orbit is equal to the number of leaves (o( T ) = k( T )). Now, assume that for every reduced cpc-tree with j − 1 colors the maximum orbit is equal to the number of leaves. Now we prove that if T has j colors then the maximum orbit is equal to the number of leaves, in the following way: select a color c i with minimum orbit (different than the pivot color); Let T be the tree obtained from T as follows: for each vertex v with color c i , remove it and add edges between the parent of v and the children of v. After this step, T is a cpc-tree with j − 1 colors, and consequently o( T ) = k( T ). As T was obtained from T applying the algorithm presented in Theorem 2, each vertex of T has no pair of children with the same color. Hence, by Lemma 13, we observe that returning to T the removed vertices does not increase the number of leaves, thus T has o( T ) = k( T ) leaves. Hence, T has a fixed number of leaves and by Corollary 7, the theorem follows. 2 2.3. Weighted-Flood-It At this point, we define a natural generalization of Flood-It where each color c i of the board has cost and we search for a flooding which minimizes the sum of the costs of its moves.
ω(c i ) to be played,
Weighted-Flood-It (decision version) Instance: A graph G colored over a set C of colors, a pivot vertex p ∈ V (G ), an integer K , and a cost function ω : C → Z + . Question: Does there exist a sequence of moves S with cost at most K which makes the graph monochromatic, using p as the pivot in all moves? The cost of a sequence S is defined as:
ω( S ) =
(ω(c i ))
mc i ∈ S
where mc i is a move played on color c i ∈ C . Corollary 15. Weighted-Flood-It on cpc-trees with pivot root is in FPT when it is asked whether there is a flooding with cost at most c + K , where c is the number of colors and K is the parameter. Proof. Follows from Theorem 5(b) and the analogous result in [8]: SCS (and thus RSCS) is in FPT when every symbol occurs exactly once in each string, and the question is whether there is a common supersequence of cost bounded by || + K , where K is the parameter. 2 Corollary 16. Flood-It(r ) on cpc-trees with pivot root is in FPT. Proof. Follows from Corollary 15.
2
2.4. Flood-It on 3-colored trees Flood-It on 2-colored graphs is trivially solvable. Fleischer and Woeginger [10] proved that Flood-It remains NP-hard when restricted to 4-colored trees. Raiha and Ukkonen [30] proved that Shortest Common Supersequence over a binary
M.R. Fellows et al. / Theoretical Computer Science 576 (2015) 102–116
111
alphabet is NP-complete, and Middendorf [25] proved that Shortest Common Supersequence over a binary alphabet remains NP-complete even if the given strings have the same length and each string contains exactly two ones. In Middendorf’s proof the instances of Shortest Common Supersequence do not have two consecutive ones. We can then define the following NP-complete problem: q-Shortest Common Supersequence over {0,1} (q-SCS) (decision version) Instance: A set of strings S = s1 , . . . , s over the alphabet {0, 1}, such that each string contains exactly two non-consecutive ones; two integers and q (q ≤ − 2). Question: Does there exist a string s of length at most that is a supersequence of each string in S and contains at least q zeros? Note that q-SCS generalizes Middendorf’s problem taking q equal to the size of a string minus two. Moreover, for any integer there exists a value q such that no supersequence of S of length (if any) contains more than q zeros, and some of them contain exactly q zeros. Now we have all the elements to state the following theorem: Theorem 17. [c ]-Flood-It on trees remains NP-hard when c = 3. Proof. We use a reduction from q-SCS. Given an instance I of q-SCS, we construct an instance I of RSCS by adding a new string r of size q composed only by the character ‘0’, and then inserting for every string the character ‘2’ after each occurrence of a ‘0’. If for I there is a supersequence of length containing q zeros then there is a supersequence of length + q for I . If for I there is a supersequence s of length + q then s contains, say, + q − 2q ones and q zeros. Removing from s the occurrences of ‘2’ we obtain a supersequence s for I containing + q − 2q ones and q zeros. As r has q zeros then q ≥ q, and consequently s is a supersequence for I of length less than or equal to and containing at least q zeros. Given the instance I of RSCS, an associated 3-colored tree can be constructed assigning the color ‘2’ to the pivot. 2 Theorem 18. [c ]-Flood-It(d) on trees is in FPT. Proof. Given a c-colored tree whose leaves are at distance at most d from the pivot, just apply the algorithm presented in Theorem 2 to obtain T , and next contract the maximal monochromatic subgraphs of T . The resulting c-colored tree is a kernel of size (c − 1)d . 2 2.5. Multi-Flood-It on trees In this subsection we deal with a new variant of Flood-It, Multi-Flood-It, where each move is played on a set of fixed pivots. We assume that, before a move m, all the pivots have the same color. The effect of playing a color c i in move m is assigning c i to the pivots and to every vertex m-connected to some pivot immediately before playing m. We consider Multi-Flood-It played on trees where the pivots are precisely the leaves, called Multi-Flood-It on trees for short. Theorem 19. Flood-It on trees with pivot root is reducible to Multi-Flood-It on trees. Proof. Let T be an instance of Flood-It on trees with pivot root. We create an instance T of Multi-Flood-It on trees with leaf pivots as follows:
• for each path P i in T from the root to a leaf li do:
1. create two copies P i1 and P i2 of P i , keeping the same colors of the vertices in P i , j
j
j
j
2. let r i and li denote, respectively, the copy of the root of T in P i and the copy of li in P i , j = 1, 2, 3. add an edge (l1i , l2i ); • contract the vertices r i1 (for all i) into a single vertex r; • create a new vertex u with the same color as r, and add an edge (u , r ). Fig. 4 illustrates an instance T of Multi-Flood-It on trees obtained from the tree presented in Fig. 2(b). At this point, it is easy to see that T has a flooding of size λ using the pivot root if and only if T has a flooding of size λ using the leaf pivots. 2
112
M.R. Fellows et al. / Theoretical Computer Science 576 (2015) 102–116
Fig. 4. Instance of Multi-Flood-It obtained from the tree presented in Fig. 2(b).
Corollary 20. Multi-Flood-It on trees is NP-hard. Proof. Follows from Theorems 1 and 19.
2
Corollary 21. Multi-Flood-It(k, c ) on trees is W[1]-hard. Proof. From Theorem 19 it is easy to see that Flood-It on trees and Multi-Flood-It on trees, both parameterized by the number of leaves and number of colors, are p-analogous. Thus, by Corollary 8, the result follows. 2 Theorem 22. Multi-Flood-It(k, r ) on trees is in FPT. Proof. Suppose the color ca is chosen for a move of the game. For each path P i from a leaf li to the root, one of the following statements must be true: (1) color ca is the first color of p i (different from the pivot color) and does not otherwise occur in P i ; (2) color ca does not occur in P i ; (3) color ca occurs once in P i , but is not the first color; (4) color ca occurs more than once in P i . If for a move of the game only (1) and (2) occur, we call this a good move. A move that is not good is bad. Our algorithm is based on the following straightforward claims: Claim 1. If at least r bad moves are played in some flooding sequence S then | S | ≥ c + r. Claim 2. For any yes-instance of the problem, there is a flooding with at most r bad moves. As in [8], we can describe an FPT-algorithm based on the method of search trees [6]. By Claim 2, if the answer is “yes” then there is a game that completes with no more than r bad moves. The algorithm is as follows: (0) The root node of the search tree is labeled with the given input. (1) A node of the search tree is expanded by making a sequence of good moves (arbitrarily) until no good move is possible. For each possible nontrivial bad move (i.e., one that floods at least one vertex), create a child node labeled with the set of sequences that result after this bad move. (2) If a node is labeled by the set of empty sequences, then answer “yes”. (3) If a node has depth r in the search tree, then do not expand it any further. The correctness of the algorithm follows from Claims 1 and 2, and the fact that the sequence of good moves in step (1) can be made in any order without increasing the number of moves. The running time of the algorithm is bounded by O (kr n). 2 Corollary 23. Flood-It(k, r ) on trees is in FPT. Proof. It is easy to see that we can extend the FPT-algorithm in Theorem 22 to Flood-It on trees with pivot root. 3. Free-Flood-It on trees Now we present a general framework for reducibility from Flood-It to Free-Flood-It.
2
M.R. Fellows et al. / Theoretical Computer Science 576 (2015) 102–116
113
Definition 7. Let G be a graph equipped with a coloring ω , v ∈ V (G ), and a positive integer. The graph ψ(G , v , ) is constructed as follows: (i) create disjoint copies G 1 , . . . , G of G; (ii) contract the copies v 1 , v 2 , . . . , v of v into a single vertex v ∗ ; (iii) color each vertex u of ψ(G , v , ) with the same initial color of its corresponding vertex w ∈ V (G ). Definition 8. Let F be a class of graphs. Then:
ψ(F ) = {G | G = ψ(G , v , ) for some triple (G ∈ F , v ∈ V (G ), > 0)}. Definition 9. A class F of graphs is closed under operator ψ if ψ(F ) ⊆ F . Examples of classes closed under ψ are chordal graphs and bipartite graphs. Theorem 24. For every colored graph G with a pivot vertex p, there exists a graph ψ(G , p , n) such that Flood-It on G is reducible in polynomial time to Free-Flood-It on ψ(G , p , n), where n = | V (G )|. Proof. Let G be the input graph of Flood-It. Assume | V (G )| = n and p as the pivot vertex of G. We create an instance for Free-Flood-It by constructing the graph G = ψ(G , p , n). Now we show that there is a flooding for G with at most λ moves if and only if there is a free-flooding for G with at most λ moves, as follows. First, note that every flooding F for G implies a free-flooding F for G with the same number of moves as F , by simply using p ∗ as the pivot of all moves in F and repeating the same sequence of colors played in F . Conversely, if there is a flooding F for G with at most λ moves, then: (i) If on every subgraph G i (1 ≤ i ≤ n) of G a move is played that does not change the color of p ∗ then λ ≥ | F | ≥ n; in this case, it is easy to see that there is a flooding for G with at most λ moves, since | V (G )| = n and thus n − 1 moves suffice to flood G. (ii) If there is a subgraph G i such that every move played on G i changes the color of p ∗ then, without loss of generality, the same sequence of colors played in such moves can be used to flood G, using p as a fixed pivot. 2 Corollary 25. Flood-It played on F is reducible in polynomial time to Free-Flood-It played on ψ(F ). If F is closed under ψ , then Flood-It played on F is reducible in polynomial time to Free-Flood-It played on F . NP-hardness results valid for Flood-It can be inherited by Free-Flood-It: Corollary 26. [d]-Free-Flood-It on trees remains NP-hard even if the diameter d of the input tree is 4. Proof. Follows from Theorem 24 and Theorem 1.
2
Corollary 27. Free-Flood-It on cpc-trees is NP-hard. Proof. Follows from Theorem 24 and Corollary 12.
2
Corollary 28. [c ]-Free-Flood-It on trees remains NP-hard even when c = 3. Proof. Follows from Corollary 25 and Theorem 17.
2
Lemma 29. In Free-Flood-It on pc-trees, there always exists an optimal free-flooding which uses the root as the pivot of the last move. Proof. Let T be a pc-tree with root p. By definition, the color of p occurs only once in T . Let F be an optimal free-flooding of T which maximizes the occurrences of p as a pivot, and let m be the last move of F . If no move in F uses p as the pivot, then immediately before playing m the tree T contains a monochromatic component containing p, a monochromatic component with a color c distinct from the pivot color, and some (possibly none) additional monochromatic components colored with the pivot color. Note that no move in F uses a vertex m-connected to p as the pivot, otherwise we could replace this pivot by p, obtaining another optimal free-flooding F with one occurrence of p as a pivot, which is a contradiction because F is an optimal free-flooding of T which maximizes the occurrences of p as a pivot. Hence, as the color of p occurs only once (T is a pc-tree), another optimal free-flooding can be construct by replacing any move m of F \ {m} which uses the pivot color by another move m with the same pivot and using the color c, and next by replacing the last move m by a move played on p using the color c, which is a contradiction. Now, suppose that m p is the last move of F which uses p as the pivot. Observe that after m p no move uses a vertex m-connected to p as the pivot, otherwise we could replace this pivot by p, obtaining another optimal free-flooding F with more occurrences of p as a pivot than F , which is a contradiction because, as previously mentioned, F maximizes the occurrences of p as a pivot. Let cm p be the color played in m p . The sequence of moves of F played after m p first creates some monochromatic components, and then m-connects them to the root by playing cm p . Hence, after playing F \ {m p }, the tree
114
M.R. Fellows et al. / Theoretical Computer Science 576 (2015) 102–116
contains a monochromatic component containing p and some monochromatic components colored by cm p . Consequently, another optimal free-flooding can be construct playing first F \ {m p } and then m p . 2 Theorem 30. In Free-Flood-It on pc-trees, there always exists an optimal free-flooding which is a flooding with pivot root. Proof. Let T be a pc-tree with pivot vertex p. As a base case, consider | V ( T )| ≤ 2. Clearly, T has an optimal free-flooding which is a flooding with pivot root. For the induction hypothesis, suppose that for some fixed k ≥ 2, any pc-tree with less than k vertices has an optimal free-flooding which is a flooding with pivot root. Now, consider | V ( T )| = k. Let F be an optimal free-flooding of T , and assume m as the last move of F . Suppose m has p as the pivot; by Lemma 29 such a free-flooding always exists. Let T m be the initial tree T after playing all but the last move of flooding F . Note that T m is colored with two colors and at least one leaf of T m is not m-connected to p. Denote by C v the monochromatic component of T m which contains v ∈ V ( T m ), and let S be the set of leaves do not m-connected to p in T m . If C v is a single vertex for each leaf v ∈ S, then every vertex in S has the same color in T m , and there exists a subset R (possibly empty) of moves of F \ {m} played on S which makes S monochromatic. Hence, a flooding F of T can be obtained by playing an optimal flooding F with fixed pivot p of T [ V ( T ) \ S ] and next playing at most | R | + 1 moves with pivot p to m-connect p to S. Since ( F \ {m}) \ R is a free-flooding of T [ V ( T ) \ S ], by hypothesis | F | ≤ |( F \ {m}) \ R |. Hence, | F | is an optimal free-flooding of T which uses p as the pivot of all moves. Now, suppose that | V (C v )| ≥ 2 for some v ∈ S. Let C w be a maximum monochromatic component of T m such that w ∈ S. As C w is monochromatic, for every vertex v ∈ V (C w ) ∩ S there is a move m v of F \ {m} which m-connects v to its parent. If, for some vertex v ∈ V (C w ) ∩ S, m v only m-connects v to the component containing its parent then a flooding F of T can be obtained by playing an optimal flooding with fixed pivot p of T [ V ( T ) \ { v }] and next playing a move with pivot p to m-connect p to v. On the other hand, suppose that, for every vertex v in C w ∩ S, m v m-connects v and another vertex u to the parent of v. First, note that for every vertex in C w its children also belong to C w , otherwise the last move of F cannot use p as the pivot. Let v be the last leaf in C w to be m-connect to its parent. Every vertex u m-connected to the parent of v by m v is also a leaf, otherwise either the last move of F cannot use p as the pivot, or T is not a pc-tree. Let Q be the set of vertices of C w m-connected to the parent of v by m v , and let R be a set (possibly empty) of moves of F \ {m} played on Q which makes Q monochromatic. A flooding F of T can be obtained by playing an optimal flooding F with fixed pivot p of T [ V ( T ) \ Q ] and next playing at most | R | + 1 moves with pivot p to m-connect p to Q . Since ( F \ {m}) \ R is a free-flooding of T [ V ( T ) \ Q ], by hypothesis | F | ≤ |( F \ {m}) \ R |. Hence, | F | is an optimal free-flooding of T which uses p as the pivot of all moves. 2 The above theorem implies that Flood-It on pc-trees and Free-Flood-It on pc-trees are analogous, and parameterized versions of these problems are p-analogous. Thus: Corollary 31. Free-Flood-It(k) on pc-trees is W[1]-hard. Proof. Follows from Theorem 30 and Corollary 11.
2
Corollary 32. Free-Flood-It(k, r ) on pc-trees with pivot root is in FPT. Proof. Follows from Theorem 30 and Corollary 23.
2
Corollary 33. Free-Flood-It(r ) on cpc-trees with pivot root is in FPT. Proof. Follows from Theorem 30 and Corollary 16.
2
4. Conclusions In this work, we develop a multivariate investigation of the complexity of Flood-It and Free-Flood-It when played on trees, analyzing the complexity consequences of parameterizing flood-filling problems by one or two of the following parameters: c – number of colors; λ – number of moves; d – maximum distance from the pivot (or diameter, in the case of Free-Flood-It); o – maximum orbit; k – number of leaves; r – number of bad moves. During our analysis we have shown that Flood-It on trees is analogous to Restricted Shortest Common Supersequence, and Flood-It remains NP-hard on 3-colored trees, settling an open question. We also present a general framework for reducibility from Flood-It to Free-Flood-It. The obtained results are summarized in the table below.
M.R. Fellows et al. / Theoretical Computer Science 576 (2015) 102–116
115
Complexity of flood-filling games on trees Problem
Instance
Flood-It
cpc-trees trees pc-trees graphs cpc-trees cpc-trees pc-trees graphs cpc-trees trees graphs trees trees pc-trees trees trees trees
Free-Flood-It
cpc-trees trees trees pc-trees cpc-trees trees pc-trees
Fixed constant
Parameters
Complexity
Reference
c≥3
– – c d – k – r c, d c, o c, k c, r – d, k o, k k, r
NP-hard NP-hard FPT FPT FPT Polynomial W[1]-hard Polynomial FPT FPT FPT W[1]-hard FPT NP-hard FPT W[1]-hard FPT
Theorem 12 Theorem 17 Trivial Trivial Trivial Theorem 14 Corollary 11 Theorem 9 Corollary 16 Theorem 2 Trivial Corollary 8 Trivial Corollary 3 Trivial Corollary 11 Corollary 23
– – – k r o, k k, r
NP-hard NP-hard NP-hard W[1]-hard FPT W[1]-hard FPT
Corollary Corollary Corollary Corollary Corollary Corollary Corollary
λ o r
d ≥ 2, o ≥ 4
c≥3 d≥4
27 28 26 31 33 31 32
4.1. Open problems In Section 2.3 it was shown, using Corollary 15 or Corollary 16, that Weighted-Flood-It and Flood-It on cpc-trees are fixed-parameter tractable when considering the number of bad moves (r) as the parameter. We present two open problems on flood-filling games:
• Does Flood-It(r ) remain fixed-parameter tractable on general pc-trees? • Does Weighted-Flood-It(r ) remain fixed-parameter tractable on general pc-trees? We conjecture that the answer to both questions is “yes.” References [1] C. Aschwanden, Spatial simulation model for infectious viral disease with focus on SARS and the common flu, in: Proceedings of the 37th Annual Hawaii International Conference on System Sciences, 2004, p. 60137b. [2] P. Barone, P. Bonizzoni, G.D. Vedova, G. Mauri, An approximation algorithm for the shortest common supersequence problem: an experimental analysis, in: ACM Symposium on Applied Computing – SAC, 2001, pp. 56–60. [3] H.L. Bodlaender, M.R. Fellows, M.T. Hallett, T. Wareham, T. Warnow, The hardness of perfect phylogeny, feasible register assignment and other problems on thin colored graphs, Theoret. Comput. Sci. 244 (2000) 167–188. [4] B. Chor, M.R. Fellows, M.A. Ragan, F.A. Rosamond, S. Snir, Connected coloring completion for general graphs: algorithms and complexity, in: Proceedings of the 13th Conference on Computing and Combinatorics – COCOON, in: Lecture Notes in Computer Science, vol. 4598, 2007, pp. 75–85. [5] R. Clifford, M. Jalsenius, A. Montanaro, B. Sach, The complexity of flood-filling games, Theory Comput. Syst. 50 (1) (2012) 72–92. [6] R.G. Downey, M.R. Fellows, Parametrized computational feasibility, in: P. Clote, J. Remmel (Eds.), Feasible Mathematics II, Birkhauser, Boston, 1995, pp. 219–244. [7] M.R. Fellows, G. Fertin, D. Hermelin, S. Vialette, Sharp tractability borderlines for finding connected motifs in vertex-colored graphs, in: Proceedings of the 34th International Colloquium on Automata, Languages and Programming – ICALP, in: Lecture Notes in Computer Science, vol. 4596, 2007, pp. 340–351. [8] M.R. Fellows, M.T. Hallett, U. Stege, Analogs & duals of the MAST problem for sequences & trees, J. Algorithms 49 (1) (2003) 192–216. [9] M.R. Fellows, M.T. Hallett, H.T. Wareham, DNA physical mapping: three ways difficult, in: Proceedings of the 1st Annual European Symposium on Algorithms – ESA, 1993, pp. 157–168. [10] R. Fleischer, G.J. Woeginger, An algorithmic analysis of the honey-bee game, Theoret. Comput. Sci. 452 (2012) 75–87. [11] E. Fredkin, Trie memory, Commun. ACM 3 (1960) 490–499. [12] H. Fukui, A. Nakanishi, R. Uehara, T. Uno, Y. Uno, The complexity of free flooding games, IPSJ SIG Notes (2011) 1–5. [13] M.R. Garey, D.S. Johnson, Computers and Intractability: A Guide to the Theory of NP-Completeness, Freeman, 1979. [14] M.R. Garey, D.S. Johnson, L. Stockmeyer, Some simplified NP-complete problems, in: Proceedings of the Sixth Annual ACM Symposium on Theory of Computing, 1974, pp. 47–63. [15] M. Golumbic, H. Kaplan, R. Shamir, On the complexity of DNA physical mapping, Adv. in Appl. Math. 15 (1994) 251–261. [16] D. Gusfield, Efficient algorithms for inferring evolutionary trees, Networks 21 (1981) 19–28. [17] M.T. Hallett, An integrated complexity analysis of problems from computational biology, PhD thesis, University of Victoria, 1996. [18] V. Lacroix, C.G. Fernandes, M.F. Sagot, Motif search in graphs: application to metabolic networks, EEE/ACM Trans. Comput. Biol. Bioinform. 3 (4) (2006) 360–368. [19] A. Lagoutte, M. Noual, E. Thierry, Flooding games on graphs, Discrete Appl. Math. 164 (2) (2014) 532–538.
116
[20] [21] [22] [23] [24] [25] [26] [27] [28] [29] [30] [31] [32] [33] [34] [35]
M.R. Fellows et al. / Theoretical Computer Science 576 (2015) 102–116
D. Maier, The complexity of some problems on subsequences and supersequences, J. ACM 25 (2) (1978) 322–336. F.R. McMorris, T.J. Warnow, T. Wimer, Triangulating vertex-colored graphs, SIAM J. Discrete Math. 7 (2) (1994) 296–306. K. Meeks, A. Scott, The complexity of flood-filling games on graphs, Discrete Appl. Math. 160 (2012) 959–969. K. Meeks, A. Scott, The complexity of Free-Flood-It on 2 × n boards, Theoret. Comput. Sci. 500 (2013) 25–43. K. Meeks, A. Scott, Spanning trees and the complexity of flood-filling games, Theory Comput. Syst. 54 (2014) 731–753. M. Middendorf, More on the complexity of common superstring and supersequence problems, Theoret. Comput. Sci. 125 (1994) 205–228. L. Mönch, J.W. Fowler, S. Dauzère-Pérès, S.J. Mason, O. Rose, A survey of problems, solution techniques, and future challenges in scheduling semiconductor manufacturing operations, J. Sched. 14 (6) (2011) 583–599. S. Moran, S. Snir, Convex recolorings of strings and trees: definitions, hardness results and algorithms, in: Proceedings of the 9th International Workshop on Algorithms and Data Structures – WADS, 2005, pp. 218–232. K. Pietrzak, On the parameterized complexity of the fixed alphabet shortest common supersequence and longest common subsequence problems, J. Comput. System Sci. 67 (4) (2003) 757–771. S. Rahmann, The shortest common supersequence problem in a microarray production setting, Bioinformatics 19 (Suppl. 2) (2003) ii156–ii161. K.-J. Raiha, E. Ukkonen, The shortest common supersequence problem over binary alphabet is NP-complete, Theoret. Comput. Sci. 16 (1981) 187–198. J. Sim, K. Park, The consensus string problem for a metric is NP-complete, J. Discrete Algorithms 1 (1) (2003) 111–117. U.S. Souza, F. Protti, M. Dantas da Silva, Parameterized complexity of flood-filling games on trees, in: Proceedings of the 19th International Computing and Combinatorics Conference – COCOON, in: Lecture Notes in Computer Science, vol. 7936, 2013, pp. 531–542. U.S. Souza, F. Protti, M. Dantas da Silva, An algorithmic analysis of Flood-It and Free-Flood-It on graph powers, Discrete Math. Theor. Comput. Sci. 16 (3) (2014) 279–290. V.G. Timkovskii, Complexity of common subsequence and supersequence problems and related problems, Cybernetics 25 (5) (1989) 565–580. H.T. Wareham, Systematic parameterized complexity analysis in computational phonology, PhD thesis, University of Victoria, 1999.