The complexity of flood filling games

  • Authors:
  • David Arthur;Raphaël Clifford;Markus Jalsenius;Ashley Montanaro;Benjamin Sach

  • Affiliations:
  • Department of Computer Science, University of Bristol, UK;Department of Computer Science, University of Bristol, UK;Department of Computer Science, University of Bristol, UK;Department of Computer Science, University of Bristol, UK;Department of Computer Science, University of Bristol, UK

  • Venue:
  • FUN'10 Proceedings of the 5th international conference on Fun with algorithms
  • Year:
  • 2010

Quantified Score

Hi-index 0.01

Visualization

Abstract

We study the complexity of the popular one player combinatorial game known as Flood-It. In this game the player is given an n×n board of tiles, each of which is allocated one of c colours. The goal is to fill the whole board with the same colour via the shortest possible sequence of flood filling operations from the top left. We show that Flood-It is NP-hard for c ≥ 3, as is a variant where the player can flood fill from any position on the board. We present deterministic (c-1) and randomised 2c/3 approximation algorithms and show that no polynomial time constant factor approximation algorithm exists unless P=NP. We then demonstrate that the number of moves required for the 'most difficult' boards grows like θ(√cn). Finally, we prove that for random boards with c ≥ 3, the number of moves required to flood the whole board is Ω(n) with high probability.