This genre of liquid colour sorting game pops up sometimes in my phone apps: There are a number of transparent bottles each filled with a fixed number of equal-thickness layers (typically 3 or 4) of coloured liquid. Some bottles might not have all if their top layers filled, and some might even be empty entirely. The lower layers cannot be accessed until the upper layers are removed. We cannot over-fill a bottle past its maximum number of layers. We cannot pour a layer of liquid onto a different coloured layer. The goal is to separate all the different coloured liquid into different bottles so that each bottle. Sometimes this game would end in an unsolvable configuration, which would mean that the user has lost the game. This made me think of finding out what exactly makes a configuration unsolvable. Obviously we need at least as many bottles as the number of colours, and for the sake of simplicity let's only consider the case where the amount of liquid of each colour is just enough to fill a bottle. There's also the issue that if every bottle is filled to the rim, there will be no space to move any of the layers, so unless the game starts out already solved with each colour in its separate bottle, we need to have one more bottle than the number of colours just to gave space for movement.
Now consider a colour sorting game described above with these specifications:
If we keep the bottles at two layers deep, can there ever be an unsolvable game? If so, what’s the minimum number of colours this game has? (The number of bottles would be one more than the number of colours.) Prove.
If we keep the game at two colours and three bottles, what’s the minimum number of layers a bottle needs to hold to construct an unsolvable game?
If we start with two colours, two bottles that are completely filled, and a third, empty bottle, can there ever be an unsolvable game? If so, what’s the minimum number of layers a bottle holds? If not, prove.
Given the number of colours, m (which, by our setup, would mean there are m+1 bottles), can we always find the minimum number of layers a bottle holds, n (which, by our setup, would mean there are also n layers of each colour), that would allow the construction of an unsolvable game?
Given the number of layers a bottle holds, n, can we always find the minimum number of colours, m, that would allow the construction of an unsolvable game?
The image is from a screenshot taken from Google Play.