This document just gives you basic background to turn this kind of puzzle into a puzzle, and stimulate your thinking. It won't give you a mindless formula. It can't give you an optimal solution. It doesn't give you a computer algorithm. It isn't mathematically rigorous. It simply enables you to think about the puzzle as a puzzle, and solve it.