Let be a positive integer, and consider a grid. A right-down path is a sequence of grid cells such that each cell is either one cell to the right or one cell below the previous cell in the sequence. A right-up path is a sequence of grid cells such that each cell is either one cell to the right or one cell above the previous cell in the sequence.
Prove that the cells of the grid cannot be partitioned into less than right-down and/or right-up paths. For example, the following partition of the grid uses 5 paths
Solution
We proceed by mathematical induction on . Suppose the statement holds for . Consider the path containing the topmost-leftmost cell. If is a right-up path, then all cells of lie in the topmost row or in the rightmost column. This means that when we remove the topmost row or the rightmost column, the remaining grid together with the corresponding partition on it still satisfies the conditions of the problem, so by the induction hypothesis it is partitioned into at least paths, and hence the original grid is partitioned into at least pieces.
Thus we only need to consider the case where is a right-down path. The key observation here is: if contains the bottommost-rightmost cell, then the two regions separated by can be merged into a single grid (as shown in the figure below), so by the induction hypothesis the sub-grid has at least paths, and therefore the original grid has at least paths.
Now suppose is a right-down path that does not contain the bottommost-rightmost cell. We will construct, according to the following procedure, a right-down path from the topmost-leftmost cell to the bottommost-rightmost cell. Let . For each , consider the bottommost-rightmost cell of , let the cells to its right and below it be and , and let the paths containing them be and respectively.
Depending on the case, we add different cells to to expand it into (if multiple cases apply simultaneously, we may choose any one of them):
(a) If is a right-down path, then we add to the portion of from to its endpoint;
(b) If is a right-up path whose starting point is , then we add to the cells of lying in the same row as ;
(c) If is a right-up path whose ending point is , then we add to the cells of lying in the same column as ;
(d) If none of the above hold, then it must be that , in which case we add and the cell to its right to .
We repeat this operation until no further expansion is possible. It is clear that the resulting expanded is a right-down path from the topmost-leftmost cell to the bottommost-rightmost cell, so the two regions separated by can be merged into a single grid. However, unlike the discussion for , is not one of the paths in the original partition, so may split some original path into two pieces.
We now show that being split into two pieces cannot actually occur, so that we may proceed with the same argument as for . Consider the intersection point of and :
- If arises from case (a) above, then contains the latter half of , so after removing , remains a single right-down path;
- If arises from case (b) or (c) above, then contains the former half or the latter half of , so after removing , remains a single right-up path;
- If arises from case (d) above, then since consists of exactly two cells, we see that after removing , the two pieces into which is split will rejoin exactly into a single right-up path.
Hence the situation of splitting into two pieces described above cannot occur, so by the induction hypothesis and the same argument as for , we know that the original grid must be partitioned into at least paths. This completes the proof.