On Complexity of Flooding Games on Graphs with Interval Representations

On Complexity of Flooding Games on Graphs with Interval Representations

Hiroyuki Fukui111The class of co-comparability graphs properly contains interval graphs and hence caterpillars and proper interval graphs. Since this game is polynomial time solvable on a co-comparability graph, so they follow., Yota Otachi222In [FNU11], the authors gave an algorithm. However, it can be improved to easily in the same way in [LNT11]., Ryuhei Uehara33footnotemark: 3, Takeaki Uno44footnotemark: 4, and Yushi Uno55footnotemark: 5
Japan Advanced Institute of Science and Technology (JAIST), Nomi, Ishikawa 923-1292, Japan. {s1010058,otachi,uehara}@jaist.ac.jp
National Institute of Informatics (NII), Chiyoda-ku, Tokyo 101-8430, Japan. uno@nii.jp
Osaka Prefecture University, Naka-ku, Sakai 599-8531, Japan. uno@mi.s.osakafu-u.ac.jp
Abstract

The flooding games, which are called Flood-It, Mad Virus, or HoneyBee, are a kind of coloring games and they have been becoming popular online. In these games, each player colors one specified cell in his/her turn, and all connected neighbor cells of the same color are also colored by the color. This flooding or coloring spreads on the same color cells. It is natural to consider the coloring games on general graphs. That is, once a vertex is colored, the flooding flows along edges in the graph. Recently, computational complexities of the variants of the flooding games on several graph classes have been studied. In this paper, we investigate the flooding games on some graph classes characterized by interval representations. Our results state that the number of colors is a key parameter to determine the computational complexity of the flooding games. If the number of colors is not bounded, the flooding game is NP-complete even on caterpillars and proper interval graphs. On the other hand, when the number of colors is a fixed constant, the game can be solved in polynomial time on interval graphs. We also state similar results for split graphs.

Keywords: Computational complexity, fixed parameter tractable, flooding game, graph coloring, interval graph, split graph.

1 Introduction

The flooding game is played on a precolored board, and a player colors a cell on the board in a turn. When a cell is colored with the same color as its neighbor, they will be merged into one colored area. If a player changes the color of one of the cells belonging to a colored area of the same color, the color of all cells in the area are changed. The game finishes when all cells are colored with one color. The objective of the game is to minimize the number of turns (or to finish the game within a given number of turns). This one player flooding game is known as Flood-It (Figure 2). In Flood-It, each cell is a precolored square, the board consists of cells, the player always changes the color of the top-left corner cell, and the goal is to minimize the number of turns. This game is also called Mad Virus played on a honeycomb board (Figure 2). One can play both the games online (Flood-It (http://floodit.appspot.com/) and Mad Virus (http://www.bubblebox.com/play/puzzle/539.htm)).

Figure 1: A sequence of four moves on a Flood-It board.
Figure 2: The initial screen of the Mad Virus (http://www.bubblebox.com/play/puzzle/539.htm). The player changes the cell having eyes.

In the original flooding games, the player colors a specified cell. However, it is natural to allow the player to color any cell. The original game is called fixed and this extended game is called free. The flooding games are intractable in general on the grid board; it is NP-hard on rectangular boards when the number of colors is 4 [MS12b], and it is still NP-hard on rectangular boards when the number of colors is [MS11]. On the other hand, Meeks and Scott also show an time algorithm for the flooding game on boards when the number of colors is , where is an explicit function of [MS11].

In recent literature, the game board has been generalized to general graph; that is, the vertex set corresponds to the set of precolored cells, and two cells are neighbors if and only if the corresponding vertices are adjacent in the graph. It is also natural to parameterize the number of colors. The generalized flooding games on general graphs have been well investigated from the viewpoint of computational complexity. We summarize recent results in Table 1. (The other related results can be found in [MS12a, CJMS12].)

Graph classes fixed fixed, is bounded
general graphs NP-C NP-C if [ACJ10]
P if (trivial)
(//hex.) grids NP-C NP-C if [LNT11]
paths/cycles [LNT11] [LNT11]
co-comparability graphs P [FW10] P [FW10]
split graphs NP-C [FW10] P [FW10]
caterpillars P111The class of co-comparability graphs properly contains interval graphs and hence caterpillars and proper interval graphs. Since this game is polynomial time solvable on a co-comparability graph, so they follow. (This)
proper interval graphs P111The class of co-comparability graphs properly contains interval graphs and hence caterpillars and proper interval graphs. Since this game is polynomial time solvable on a co-comparability graph, so they follow. (This)
interval graphs P111The class of co-comparability graphs properly contains interval graphs and hence caterpillars and proper interval graphs. Since this game is polynomial time solvable on a co-comparability graph, so they follow. (This)
Graph classes free free, is bounded
general graphs NP-C NP-C if [ACJ10]
P if [Lag10, LNT11]
(//hex.) grids NP-C NP-C if [LNT11]
paths/cycles [FNU11]222In [FNU11], the authors gave an algorithm. However, it can be improved to easily in the same way in [LNT11]. [FNU11]222In [FNU11], the authors gave an algorithm. However, it can be improved to easily in the same way in [LNT11].
split graphs NP-C (This) (This)
caterpillars NP-C (This,[MS11]) (This)
proper interval graphs NP-C (This) (This)
interval graphs NP-C (This) (This)
Table 1: Computational complexities of the flooding games on some graph classes.

Since the original game is played on a grid board, the extension to the graph classes having geometric representation is natural and reasonable. For example, each geometric object corresponding to a vertex can be regarded as a “power” or an “influence range” of the vertex. That is, when a vertex is colored, the influence propagates according to the geometric representation. Therefore, this game models epidemics, fires, and rumors on social networks. In this paper, we first consider the case that the propagation is in one dimensional. That is, we first investigate the computational complexities of the flooding game on graphs that have interval representations. We will show that even in this restricted case, the problem is already intractable in general.

From the viewpoint of the geometric representation of graphs, the notion of interval graphs is a natural extension of paths. (We here note that path also models rectangular boards of the original game.) A path is an interval graph such that each vertex has an influence on at most two neighbors. In other words, each vertex has least influence to make the network connected. In this case, the flooding games can be solved in polynomial time [LNT11, FNU11]. However, we cannot extend the results for a path to an interval graph straightforwardly. There are two differences between paths and interval graphs. First, in an interval graph, short branches exist. That is, one vertex can have three or more neighbors of degree one. Second, interval graphs have twins; two (or more) vertices are called twins if their (closed) neighbor sets coincide. Interestingly, one of these two differences is sufficient to make the flooding game intractable:

Theorem 1

The free flooding game is -complete even on (1) proper interval graphs, and (2) caterpillars. These results still hold even if the maximum degree of the graphs is bounded by 3.

Both of the classes of caterpillars and proper interval graphs consist of very simple interval graphs. If the maximum degree is bounded by 2, these classes degenerate to the set of paths. Thus the results are tight.

General interval graphs have rich structure since vertices correspond to intervals of variant lengths. Therefore, it is not easy to solve the free flooding game efficiently. However, when the number of colors is a constant, the game becomes tractable.

Theorem 2

The free flooding game on an interval graph can be solved in time.

That is, the free flooding game on an interval graph is polynomial time solvable if the number of colors is fixed, and that is -complete if is not fixed. Thus the game is fixed parameter tractable with respect to the number of colors.

We here compare our results with the results stated in [MS11]. As mentioned above, a path of vertices is essentially the same as a rectangular board. However, a board cannot be modeled by an interval graph since a board represents a cycle , while is not an interval graph. On the other hand, each vertex in a board has degree at most three, while the maximum degree of an interval graph is not bounded. In a sense, the class of interval graphs is much larger than boards; for each , there is only one board, while there are exponentially many interval graphs with vertices. It is worth mentioning that our time algorithm is much faster, and is solvable for larger class than the time algorithm in [MS11].

We also extend the results for the fixed flooding game on a split graph mentioned in [FW10] to the free flooding game on a split graph. Precisely, the free flooding game is -complete even on a split graph, and it can be solved in time when the number of colors is fixed.

Although we only consider one player game in this paper, it is also natural to extend to multi-players. Two-player variant is known as HoneyBee, which is available online at http://www.ursulinen.asn-graz.ac.at/Bugs/htm/games/biene.htm. Fleischer and Woeginger have investigated this game from the viewpoint of computational complexity. See [FW10] for further details.

2 Preliminaries

We model the flooding game in the following graph-theoretic manner. The game board is a connected, simple, loopless, undirected graph . We denote by and the number of vertices and edges, respectively. There is a set of colors, and every vertex is precolored (as input) with some color . Note that we may have an edge with . For a vertex set , the vertex induced graph is the graph with . For a color , the subset contains all vertices in of color . For a vertex and color , we define the color--neighborhood by the set of vertices in the same connected component as in . Similarly, we denote by the color--neighborhood of a subset . For a given graph and the precoloring , a coloring operation for and is defined by, for each vertex with , setting . For a given graph and a sequence of coloring operations in , we let and is the graph obtained by the coloring operation on for each . In the case, we denote by and for each . Then the problem in this paper are defined as follows333In the fixed flooding game, is also required.:

Input : A graph such that each vertex in is precolored with and an integer ;
Output : Determine if there is a sequence of coloring operations of length such that all vertices in the resulting graph (i.e. ) have the same color;
Problem 1 Free flooding game

For the problem, if a sequence of operations of length colors the graph, the sequence is called a solution of length .

Figure 3: (a) An interval graph , (b) one of interval representations of , and (c) unique -tree of (up to isomorphism).

A graph with is an interval graph if there is a set of (real) intervals such that if and only if for each and with (Figure 3(a)(b)). We call the set of intervals an interval representation of the graph. For each interval , we denote by and the left and right endpoints of the interval, respectively (hence we have and ). For a point , let denote the set of intervals containing the point . In general, there exist many interval representations for an interval graph . On the other hand, there exists unique representation for an interval graph , which is called -tree of . The definition of -tree is postponed to Section 3.2.2.

An interval representation is proper if no two distinct intervals and exist such that properly contains or vice versa. An interval graph is proper if it has a proper interval representation. If an interval graph has an interval representation such that every interval in has the same length, is said to be a unit interval graph. Such an interval representation is called a unit interval representation. It is well known that the class of proper interval graphs coincides with the class of unit interval graphs [Rob69]. That is, given a proper interval representation, we can transform it into a unit interval representation. A simple constructive way of the transformation can be found in [BW99]. With perturbations if necessary, we can assume without loss of generality that (and hence ), and for any two distinct intervals and in a unit interval representation .

A connected graph is a caterpillar if can be partitioned into and such that is a path, and every vertex in is incident to exactly one vertex in . It is easy to see that the caterpillar is an interval graph. We call (and ) backbone, and each vertex in hair of , respectively.

A graph is a split graph if can be partitioned into and such that induces a clique and induces an independent set. (A vertex set is clique if every pair of vertices is joined by an edge, and it is independent set if no pair is joined.)

3 Graphs with interval representations

Let be an interval graph precolored with at most colors. We first show that, when is not bounded, the flooding game on is NP-complete even if is a caterpillar or a proper interval graph. Next we show an algorithm that solves the flooding game in on a proper interval graph. Lastly, we extend the algorithm to general interval graphs. That is, the flooding game is fixed parameter tractable on an interval graph with respect to the number of colors.

3.1 Np-completeness on simple interval graphs

To prove Theorem 1, we reduce the following well-known NP-complete problem to our problems (see [GJ79, GT1]):

Input : A graph and an integer ;
Output : Determine if there is a subset of such that for each edge , and ;
Problem 2 Vertex Cover

Let and be an instance of the vertex cover problem. Let , .

Figure 4: A gadget for .

3.1.1 Caterpillar

We first construct a caterpillar444We sometimes identify an interval graph and its interval representation.. The key gadget is shown in Figure 4(a). We replace an edge by a path with two hairs and attached to and . The colors are as shown in the figure. Precisely, , , , and . It is not difficult to see that this gadget cannot be colored in at most three turns. On the other hand, there are some ways to color them in four turns. One of them is: color by , color by , color by , and color by .

Figure 5: An example of reduction to a caterpillar.

Now we turn to the reduction of a general graph (Figure 5). We first arrange the edges in arbitrary way, and replace each edge by the gadget in Figure 4(a). In this time, each vertex of color is shared by two consecutive edges. In other words, endpoints of the gadget are shared by two consecutive gadget except both ends. This is the reduction. It is easy to see that the resultant graph is a caterpillar, the reduction is a polynomial-time reduction, and the flooding game is clearly in NP. Thus it is sufficient to show that a minimum vertex cover of gives a solution of the flooding game on the resultant graph and vice versa.

As shown in the example, all vertices on the backbone are colored by in coloring operations. On the other hand, coloring operations are required to color the backbone. Moreover, we have a leftover hair at each gadget, and their colors form a vertex cover since they hit all edges. Therefore, once we have a vertex cover , we color the resultant graph with operations. On the other hand, if we can color the resultant graph with operations, we can extract operations to color the backbone, and each of operations is an operation to color a leftover hair, which gives us a vertex cover. Therefore, the graph has a vertex cover of size if and only if the resultant graph can be colored with coloring operations. This completes the proof of Theorem 1(1).

We note that the basic idea of this reduction can be found in the proof of the NP-completeness on rectangular boards in [MS11]. In fact, the gadget in Figure 4(a) can be represented by a rectangular board shown in Figure 4(b), and we can obtain essentially the same proof in [MS11]. We here explained the details of the proof to make this paper self-contained, and this idea is extended to proper interval graphs in the next section.

3.1.2 Proper interval graph

We next construct an interval representation of a proper interval graph as follows (Figure 6).

Figure 6: Reduction from Vertex Cover to Flooding game.
  1. Let be the color set of different colors. (Note that each vertex in has its own unique color.)

  2. For each , we put an interval with precolor . We call these intervals backbones.

  3. For each with , we add two identical intervals and with precolor and . (Note that the ordering of the edges is arbitrary.)

  4. Each two identical intervals and are connected to the left and right backbone by paths of length . Precisely, a left backbone and the two intervals and are joined by a path , where and (which is identical to ). (Note that has three neighbors: and two vertices corresponding to and .) The intervals , are connected to the right backbone in a symmetric way. That is, they are connected by a path such that , . For each with , we set with . That is, two paths from to both backbones have the same color sequence, and when we color the interval (or ) by the sequence , we can connect the left and right backbones.

Now we show a lemma that immediately implies Theorem 1(b).

Lemma 3

In the reduction above, the original graph has a vertex cover of size if and only if there is a sequence of coloring operations of length to make the resulting interval representation in monochrome.

Proof. We first suppose that the graph has a vertex cover of size . Then we can construct a sequence of coloring operations of length as follows. First step is joining the backbones. Let be an edge in . Since is a vertex cover, without loss of generality, we assume . Then we color by , and (we do not mind if is in or not). Repeat this process for every edge. Then all the backbones are connected and colored by after colorings. We then still have intervals corresponding to the vertices in . Thus we pick up each vertex in and color the backbone by . After colorings, all vertices become monochrome.

Next we suppose that we have a sequence of coloring operations of length that makes the representation monochrome. We extract a vertex cover of size from these operations. In the representation, for each with , we have distinct paths . Hence we have distinct paths in total, and each of them requires coloring operations. Since is the (potential) size of a vertex cover, we can assume that without loss of generality. First, we observe that the sequence of coloring operation includes or for each edge . Otherwise, we need more than coloring operations to connect the neighboring backbones (colored ). The operations never help to connect other backbones. Thus the length of any sequence is no less than . Therefore, we can see either or appears in the sequence. We say that is selected if appears before (or may not appear).

Let be the set of vertices such that it is not selected in some edge . Then is a vertex cover. Since the sequence makes all the vertices monochrome, the sequence includes either or for each unselected vertex and edge . We call such operations cover operations. Thus, the number of cover operations is no less than . Remind that operations are needed to connect the selected intervals and paths, and these operations are either of form or for selected . This implies that the length of the sequence is no less than , and thus .  

The reduction can be done in polynomial time. Hence, by Lemma 3, Theorem 1(2) immediately follows.

3.2 Polynomial time algorithm on interval graphs for fixed color

We first show an algorithm for proper interval graphs that runs in polynomial time if the number of colors is fixed. Next we extend the algorithm to deal with general interval graphs.

3.2.1 Algorithm for a proper interval graph

Let be an interval representation of the proper interval graph . The interval representation is given in a compact form (see [UU07] for details). Precisely, each endpoint is a positive integer, for each integer , and there are no indices or vice versa for each integer with (otherwise we can shrink it). Intuitively, each integer point corresponds to a set of different endpoints of the intervals since the representation has no redundancy. Then, it is known that is unique up to isomorphism when is a proper interval graph (see [SYKU10]), and can be placed in for some . Sweeping a point from to on the representation, the color set differs according to . More precisely, we obtain different color sets for each . We note that for each integer , and . Let be the color set obtained by the th (to simplify the notation, we use from to ). Since the color set has size , each consists of at most colors. That is, the possible number of color sets is (since ).

Now we regard the unique interval representation as a path , where each vertex is precolored by the color set . Then we can use a dynamic programming technique, which is based on the similar idea to the algorithms for the flooding game on a path in [FNU11, LNT11]. On a path, the correctness of the strategy comes from the fact that removing the color at the point divides the interval representation into left and right, and they are independent after removing the color at the point . However, on , we have to take care of the influence of changing the color set of a vertex in the original interval graph. In the algorithms for an ordinary path, changing the color of a vertex has an influence to just two neighbors. In our case, when we change a color in at a point to , all reachable color sets joined by from are changed. Thus we have to remove from and add to for each with , where and are the leftmost and the rightmost vertices such that . By this coloring operation, some colors may be left independent on the backbone of color . To deal with these color sets, we maintain a table that is the minimum number of coloring operations to satisfy the following conditions: (1) for each with , and (2) . That is, gives the minimum number of coloring operations to make this interval connected by the color , and the remaining colors in this interval are contained in . Once we obtain for all and on , we can obtain the solution by the following lemma:

Lemma 4

For a given proper interval graph , let be the table defined above. Then the minimum number of coloring operations to make monochrome is given by .

Proof. We first show that we can make monochrome within coloring operations. For each and , by the definition of the table, we can make that every color set contains with coloring operations. This means that every vertex is either or contains some such that , and is connected. Therefore, taking each color , and changing the color of any vertex of color to , all vertices of color and are merged to the vertices of color . Therefore, repeating this process, we can make monochrome with coloring operations.

We next show that the above strategy cannot be improved. In the definition of the function , we take a strategy that (1) first, color the interval with a color and (2) second, color the remaining colors in the interval by changing the color . We say that this color dominates the interval after the first step. We suppose that a coloring operation pick up a color of a vertex and change it to another color . Then the color sets in an interval are changed since , is the leftmost vertex such that contains , and is the rightmost vertex with . Here we suppose that is properly contained in another interval with that is dominated by a color . Then, we can override to use the color instead of in the sense that changing to is not better than changing to . That is, when we change a color to , if there is another overriding color , it is not worse to change a color to instead of . Repeating this argument, we can see that the above strategy is not worse any other strategy. Thus we cannot improve it.  

This function satisfies the following recursive relation.

The correctness of this dynamic programming algorithm is given by Lemma 4. Thus the remaining task is showing the computational complexity of the function.

Lemma 5

The value of can be computed in time.

Proof. This can be done in a standard dynamic programming technique. Initialization step is that, for each , if and if . This step requires . We also define for any for convenience.

In general step, the algorithm computes for each pair and with . The algorithm computes all pairs and in the order , , , , . For a pair with , the algorithm next fix the color . Then the algorithm generates all possible subsets of . Using the above recursive relation, a value of can be computed in time since the values and can be computed independently. Therefore, in total, can be computed in time. This completes the proof.  

In the proof, we assume that whether a color is in a color set or not can be determined in time since is fixed. Even in the case that is large, say , the running time of the algorithm is bounded by .

3.2.2 Extension to interval graphs

A proper interval graph has a simple interval representation. Especially, its interval representation is linear and essentially unique up to isomorphism. Therefore we can use the dynamic programming technique on the unique path-like structure. On the other hand, a general interval graph has exponentially many different interval representations. To deal with an interval graph, we use a tree representation that was used to solve the graph isomorphism problem for interval graphs [KM89]. The -tree stands for modified -tree, and this notion was introduced by Korte and Möhring in [KM89]. For an interval graph, the -tree is uniquely determined up to isomorphism. To solve the flooding problem on an interval graph, we extend the algorithm for proper interval graph to solve the problem on the -tree of color sets. The -tree maintains inclusion relationships among intervals. That is, if an interval appears in a node that is an ancestor of another node , all intervals appearing in the node is properly contained in the interval . Thus, by the same argument of the proof of Lemma 4, a coloring operation for the intervals appearing in the node can be overridden by the coloring operation of . Therefore, in the same manner of the algorithm for the color sets of proper interval graphs, it is enough to consider the coloring operation of , and the other intervals properly contained in will be dealt with as the set of remaining colors in in the function in the previous algorithm. We discuss the details hereafter.

Definitions and Notations for Mpq-trees:

The notion of -trees was introduced by Booth and Lueker [BL76]. A -tree is a rooted tree with two types of internal nodes and , which will be represented by circles and rectangles, respectively. The leaves of are labeled one-to-one with the maximal cliques of the interval graph . The frontier of a -tree is the permutation of the maximal cliques obtained by the ordering of the leaves of from left to right. -tree and are equivalent, if one can be obtained from the other by applying the following rules a finite number of times;

(1)

arbitrarily permute the successor nodes of a -node, or

(2)

reverse the order of the successor nodes of a -node.

In [BL76], Booth and Lueker showed that a graph is an interval graph if and only if there is a -tree whose frontier represents a consecutive arrangement of the maximal cliques of . In other words, if is an interval graph, all consecutive arrangements of the maximal cliques of are obtained by taking equivalent -trees.

The -tree model, which stands for modified -tree, is developed by Korte and Möhring to simplify the construction of a -tree (see Figure 3(c) for an example). The -tree assigns sets of vertices (possibly empty) to the nodes of a -tree representing an interval graph . A -node is assigned only one set, while a -node has a set for each of its sons (ordered from left to right according to the ordering of the sons). For a -node , this set consists of those vertices of contained in all maximal cliques represented by the subtree of in , but in no other cliques.

For a -node , the definition is more involved. Let be the set of the sons (in consecutive order) of , and let be the subtree of with root (note that ). We then assign a set , called section, to for each . Section contains all vertices that are contained in all maximal cliques of and some other , but not in any clique belonging to some other subtree of that is not below . The key property of -trees is summarized as follows:

Theorem 6 ([Km89, Theorem 2.1])

Let be a -tree for an interval graph and let be the associated -tree. Let and . Then we have the following:

(a)

can be obtained from in time and represents in space.

(b)

Each maximal clique of corresponds to a path in from the root to a leaf, where each vertex is as close as possible to the root.

(c)

In , each vertex appears in either one leaf, one -node, or consecutive sections for some -node with .

Property (b) is the essential property of -trees. For example, the root of contains all vertices belonging to all maximal cliques, and the leaves contain the simplicial vertices of . In [KM89], they did not state Theorem 6(c) explicitly. However, Theorem 6(c) is immediately obtained from the fact that the maximal cliques containing a fixed vertex occur consecutively in .

In order to solve the graph isomorphism problem, a -tree has additional information which is called characteristic node in [LB79, CB81]. This is the unique node which roots the subtree whose leaves are exactly the cliques to which the vertex belongs. As noted in [CB81, p. 212], the term characteristic node to mean the leaf, -node, or portion of a -node which contains those cliques. Each vertex in -tree directly corresponds to the characteristic node in the -tree. Although they did not discuss the uniqueness of -tree in [KM89], their algorithm certainly constructs the unique -tree for a given interval graph up to isomorphism [Ueh03].

Algorithm for an interval graph:

Let be a connected interval graph with and and the -tree of . Let be the set of vertices in that appears in the root node of .

Lemma 7

(1) is a connected interval graph. (2) The interval representation of is unique up to isomorphism.

Proof. If is an empty set, is not connected (unless contains no vertex). Hence contains at least one vertex. If the root is a -node, is a clique, and its interval representation is unique. Thus we consider the case that the root is a -node. By definition, this -node corresponds to a unique interval representation of . If is not connected, is also disconnected, which contradicts the assumption that is connected. Thus we have the lemma.  

A parent-child relationship on represents inclusion relationship. That is, if a vertex is an ancestor of another vertex in , always contains in any interval representation for . Thus, for any interval representation of , the union of the set of intervals corresponding to the vertices in contains all other intervals. Moreover, any interval not in is properly contained in an interval in . Thus, using the same argument in the proof of Lemma 4, we can claim that the coloring operation of is overridden by the coloring operation of . That is, any sequence of coloring operations of intervals in an interval graph can be overridden by a sequence of coloring operations that only consist of the coloring operations of intervals in . Therefore, we can employ the same strategy for any interval graph as follows. (1) First, color the intervals in and dominate the interval by some color , where and for all intervals in . We note that has the unique interval representation by Lemma 7. After (1), the intervals of color form the backbone of in the sense that every vertex is either of color or adjacent to some vertices in the backbone. (2) Second, color the remaining colors of the vertices by changing some vertex on the backbone. Using the same arguments of the algorithm for proper interval graphs, the correctness of the strategy follows.

Precise algorithm is as follows:

(a)

For a given interval graph , construct the -tree .

(b)

Pick up the root node of , and let be the set of vertices appearing in the root of . (Since is connected, we have .)

(c-1)

Case 1: is a -node. In this case, every vertex in is a universal vertex that is adjacent to any other vertex. Thus, pick up one vertex of and change color of it to each colors.

(c-2)

Case 2: is a -node. Let be the sections in in this ordering. For each , let be the set of colors of vertices in the subtree of the section . Then construct a path , where . That is, each is a color set that consists of the colors of intervals in or . Now, we apply the algorithm for the proper interval graph on the path .

Since the case (c-1) is an extreme case of the case (c-2), we concentrate on the case (c-2). By Lemma 7, the interval representation for is unique, and hence the sections are determined uniquely. If we change the color of an interval through , it overrides all other intervals in since appears in a descendant of , which means that properly contains . Therefore, without loss of generality, we can assume that a best strategy changes colors of intervals in . Therefore, all intervals in are dominated by any interval in . Hence we can concentrate to solve the problem on , and the other intervals contribute only as a color set in . Thus we can apply the algorithm for the proper interval graph on , and obtain an optimal solution with the same time and space complexity in Lemma 5, which completes the proof of Theorem 2.

4 Split Graphs

In [FW10], the fixed flooding game on a split graph is investigated. Using a similar idea in [FNU11], we can extend the results for the fixed flooding game to the free flooding game.

Theorem 8

(1) The free flooding game is -complete even on a split graph. (2) The free flooding game on a split graph can be solved in time.

Proof.(1) In [FW10], the feedback vertex set problem is reduced to the fixed flooding game on a split graph . The resulting graph consists of a clique and an independent set . Each vertex in has degree one except one universal vertex incident to all vertices in . It is easy to see that this universal vertex can be one of the clique . Now we add vertices to and join them to , and each of them is colored by colors that are same to the colors of vertices in . Then, the resultant graph is still split graph. We consider the free flooding game on this new split graph. Then, using the similar argument in [FNU11], this graph has a solution if and only if there is a sequence of operations that always colors the universal vertex . Thus the feedback vertex set problem has a solution if and only if the free flooding game has a solution.

(2) We can observe that there is a solution of length at most that first makes all vertices in having the same color, and changes the color of the clique to join the vertices in . We can also see that there is an optimum solution of this form. This means that we always change the color of a clique vertex. Since the vertices in of the same color are always connected, the number of possibilities of each operation is at most , where is the current number of colors used in . Thus, we can find an optimum solution in time.  

5 Concluding remarks

In this paper, we investigate the free flooding game on graphs that have interval representations. We show that this game is fixed parameter tractable with respect to the number of colors. We also show the similar results for split graphs. In [FW10], it is shown that the fixed flooding game on a co-comparability graph can be solved in polynomial time based on a dynamic programming technique. In this case, computing a shortest path on a co-comparability graph can be a better idea than using the dynamic programming. In the case, the idea may be extended to the free flooding game on a co-comparability graph, and we may obtain a polynomial time algorithm.

Acknowledgment

The authors thank Eric Theirry for sending [LNT11].

References

  • [ACJ10] David Arthur, Raphaël Clifford, Markus Jalsenius, Ashley Montanaro, and Benjamin Sach. The Complexity of Flood Filling Games. In FUN 2010, pages 307–318. Lecture Notes in Computer Science Vol. 6099, Springer-Verlag, 2010.
  • [BL76] K.S. Booth and G.S. Lueker. Testing for the Consecutive Ones Property, Interval Graphs, and Graph Planarity Using -Tree Algorithms. Journal of Computer and System Sciences, 13:335–379, 1976.
  • [BW99] K. P. Bogart and D. B. West. A short proof that ‘proper=unit’. Discrete Mathematics, 201:21–23, 1999.
  • [CB81] C.J. Colbourn and K.S. Booth. Linear Time Automorphism Algorithms for Trees, Interval Graphs, and Planar Graphs. SIAM Journal on Computing, 10(1):203–225, 1981.
  • [CJMS12] R. Clifford, M. Jalsenius, A. Montanaro, and B. Sach. The Complexity of Flood Filling Games. Theory of Computing Systems, 50:72–92, 2012.
  • [FNU11] H. Fukui, A. Nakanishi, R. Uehara, T. Uno, and Y. Uno. The Complexity of Free Flood Filling Game. In WAAC 2011, pages 51–56, 2011.
  • [FW10] Rudolf Fleischer and Gerhard J. Woeginger. An Algorithmic Analysis of the Honey-Bee Game. In FUN 2010, pages 178–189. Lecture Notes in Computer Science Vol. 6099, Springer-Verlag, 2010.
  • [GJ79] M.R. Garey and D.S. Johnson. Computers and Intractability — A Guide to the Theory of NP-Completeness. Freeman, 1979.
  • [KM89] N. Korte and R.H. Möhring. An Incremental Linear-Time Algorithm for Recognizing Interval Graphs. SIAM Journal on Computing, 18(1):68–81, 1989.
  • [Lag10] Aurélie Lagoutte. 2-Free-Flood-It is polynomial. Technical report, arXiv:1008.3091v1, 2010.
  • [LB79] G.S. Lueker and K.S. Booth. A Linear Time Algorithm for Deciding Interval Graph Isomorphism. Journal of the ACM, 26(2):183–195, 1979.
  • [LNT11] A. Lagoutte, M. Naual, and E. Thierry. Flooding games on graphs. In Latin-American Algorithms, Graphs and Optimization Symposium (LAGOS 2011), 2011.
  • [MS11] Kitty Meeks and Alexander Scott. The complexity of Free-Flood-It on boards. arXiv:1101.5518v1, Jan 2011.
  • [MS12a] Kitty Meeks and Alexander Scott. Spanning Trees and the Complexity of Flood-Filling Games. In FUN 2012, pages 282–292. Lecture Notes in Computer Science Vol. 7288, Springer-Verlag, 2012.
  • [MS12b] Kitty Meeks and Alexander Scott. The complexity of flood-filling games on graphs. Discrete Applied Mathematics, 160(7-8):959–969, 2012.
  • [Rob69] F. S. Roberts. Indifference graphs. In F. Harary, editor, Proof Techniques in Graph Theory, pages 139–146. Academic Press, 1969.
  • [SYKU10] Toshiki Saitoh, Katsuhisa Yamanaka, Masashi Kiyomi, and Ryuhei Uehara. Random Generation and Enumeration of Proper Interval Graphs. IEICE Transactions on Information and Systems, E93-D(7):1816–1823, 2010.
  • [Ueh03] R. Uehara. Canonical MPQ-tree Model for Interval Graphs. In Forum on Information Technology (FIT2003), pages 79–81, 2003.
  • [UU07] R. Uehara and Y. Uno. On Computing Longest Paths in Small Graph Classes. International Journal of Foundations of Computer Science, 18(5):911–930, 2007.
Comments 0
Request Comment
You are adding the first comment!
How to quickly get a good reply:
  • Give credit where it’s due by listing out the positive aspects of a paper before getting into which changes should be made.
  • Be specific in your critique, and provide supporting evidence with appropriate references to substantiate general statements.
  • Your comment should inspire ideas to flow and help the author improves the paper.

The better we are at sharing our knowledge with each other, the faster we move forward.
""
The feedback must be of minimum 40 characters and the title a minimum of 5 characters
   
Add comment
Cancel
Loading ...
307418
This is a comment super asjknd jkasnjk adsnkj
Upvote
Downvote
""
The feedback must be of minumum 40 characters
The feedback must be of minumum 40 characters
Submit
Cancel

You are asking your first question!
How to quickly get a good answer:
  • Keep your question short and to the point
  • Check for grammar or spelling errors.
  • Phrase it like a question
Test
Test description