The Complexity of Flood Filling Games
 Raphaël Clifford,
 Markus Jalsenius,
 Ashley Montanaro,
 Benjamin Sach
 … show all 4 hide
Purchase on Springer.com
$39.95 / €34.95 / £29.95*
Rent the article at a discount
Rent now* Final gross prices may vary according to local VAT.
Abstract
We study the complexity of the popular one player combinatorial game known as FloodIt. In this game the player is given an n×n board of tiles where each tile is allocated one of c colours. The goal is to make the colours of all tiles equal via the shortest possible sequence of flooding operations. In the standard version, a flooding operation consists of the player choosing a colour k, which then changes the colour of all the tiles in the monochromatic region connected to the top left tile to k. After this operation has been performed, neighbouring regions which are already of the chosen colour k will then also become connected, thereby extending the monochromatic region of the board. We show that finding the minimum number of flooding operations is NPhard for c≥3 and that this even holds when the player can perform flooding operations from any position on the board. However, we show that this ‘free’ variant is in P for c=2. We also prove that for an unbounded number of colours, FloodIt remains NPhard for boards of height at least 3, but is in P for boards of height 2. Next we show how a (c−1) approximation and a randomised 2c/3 approximation algorithm can be derived, and that no polynomial time constant factor, independent of c, approximation algorithm exists unless P=NP. We then investigate how many moves are required for the ‘most demanding’ n×n boards (those requiring the most moves) and show that the number grows as fast as $\Theta(\sqrt{c}\, n)$ . Finally, we consider boards where the colours of the tiles are chosen at random and show that for c≥2, the number of moves required to flood the whole board is Ω(n) with high probability.
 Berger, E.: Dynamic monopolies of constant size. J. Comb. Theory, Ser. B 83, 191–200 (2001) CrossRef
 Biedl, T.C., Demaine, E.D., Demaine, M.L., Fleischer, R., Jacobsen, L., Munro, J.I.: The complexity of Clickomania. In: More Games of No Chance. MSRI Publications, vol. 42, pp. 389–404. Cambridge University Press, Cambridge (2002)
 Chayes, L., Winfield, C.: The density of interfaces: A new firstpassage problem. J. Appl. Probab. 30(4), 851–862 (1993) CrossRef
 Demaine, E.D., Hohenberger, S., LibenNowell, D.: Tetris is hard, even to approximate. In: Computing and Combinatorics, pp. 351–363 (2003) CrossRef
 Fleischer, R., Woeginger, G.: An algorithmic analysis of the HoneyBee game. In: Proc. Fun with Algorithms 2010, pp. 178–189 (2010)
 Flocchini, P., Královič, R., Ružička, P., Roncato, A., Santoro, N.: On time versus size for monotone dynamic monopolies in regular topologies. J. Discrete Algorithms 1, 129–150 (2003) CrossRef
 Fontes, L., Newman, C.: First passage percolation for random colorings of ℤ^{ d }. Ann. Appl. Probab. 3(3), 746–762 (1993) CrossRef
 Hoeffding, W.: Probability inequalities for sums of bounded random variables. J. Am. Stat. Assoc. 58(301), 13–30 (1963) CrossRef
 Is this game NPhard? (May 2009). http://valis.cs.uiuc.edu/blog/?p=2005
 Iwama, K., Miyano, E., Ono, H.: Drawing borders efficiently. Theory Comput. Syst. 44(2), 230–244 (2009) CrossRef
 Jiang, T., Li, M.: On the approximation of shortest common supersequences and longest common subsequences. SIAM J. Comput. 24(5), 1122–1139 (1995) CrossRef
 Kaye, R.: Minesweeper is NPcomplete. Math. Intell. 22(2), 9–15 (2000) CrossRef
 Madras, N., Slade, G.: The SelfAvoiding Walk. Birkhäuser, Basel (1996) CrossRef
 Maier, D.: The complexity of some problems on subsequences and supersequences. J. ACM 25(2), 322–336 (1978) CrossRef
 Munz, P., Hudea, I., Imad, J., Smith, R.J.: When zombies attack!: Mathematical modelling of an outbreak of zombie infection. In: Infectious Disease Modelling Research Progress, pp. 133–150. Nova Publ., New York (2009)
 Peleg, D.: Size bounds for dynamic monopolies. Discrete Appl. Math. 86, 263–273 (1998) CrossRef
 Räihä, K.J., Ukkonen, E.: The shortest common supersequence problem over binary alphabet is NPcomplete. Theor. Comput. Sci. 16, 187–198 (1981) CrossRef
 Timkovskii, V.G.: Complexity of common subsequence and supersequence problems and related problems. Cybern. Syst. Anal. 25(5), 565–580 (1989) CrossRef
 Title
 The Complexity of Flood Filling Games
 Journal

Theory of Computing Systems
Volume 50, Issue 1 , pp 7292
 Cover Date
 20120101
 DOI
 10.1007/s0022401193392
 Print ISSN
 14324350
 Online ISSN
 14330490
 Publisher
 Springer US
 Additional Links
 Topics
 Keywords

 NPcompleteness
 Floodfilling
 Combinatorial games
 Percolation
 Industry Sectors
 Authors

 Raphaël Clifford ^{(1)}
 Markus Jalsenius ^{(1)}
 Ashley Montanaro ^{(1)}
 Benjamin Sach ^{(1)}
 Author Affiliations

 1. Department of Computer Science, University of Bristol, Bristol, UK