We proceed by mathematical induction on N. Suppose the statement holds for N−1. Consider the path P containing the topmost-leftmost cell. If P is a right-up path, then all cells of P 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 (N−1)×(N−1) 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 N−1 paths, and hence the original N×N grid is partitioned into at least N pieces.
Thus we only need to consider the case where P is a right-down path. The key observation here is: if P contains the bottommost-rightmost cell, then the two regions separated by P can be merged into a single (N−1)×(N−1) grid (as shown in the figure below), so by the induction hypothesis the sub-grid has at least N−1 paths, and therefore the original N×N grid has at least N paths.
Now suppose P 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 Q from the topmost-leftmost cell to the bottommost-rightmost cell. Let Q0=P. For each i≥0, consider the bottommost-rightmost cell qi of Qi, let the cells to its right and below it be ri and di, and let the paths containing them be Ri and Di respectively.
Depending on the case, we add different cells to Qi to expand it into Qi+1 (if multiple cases apply simultaneously, we may choose any one of them):
(a) If Ri(Di) is a right-down path, then we add to Qi the portion of Ri(Di) from ri(di) to its endpoint;
(b) If Ri is a right-up path whose starting point is ri, then we add to Qi the cells of Ri lying in the same row as ri;
(c) If Di is a right-up path whose ending point is di, then we add to Qi the cells of Di lying in the same column as di;
(d) If none of the above hold, then it must be that Ri=Di, in which case we add di and the cell to its right to Qi.
We repeat this operation until no further expansion is possible. It is clear that the resulting expanded Q is a right-down path from the topmost-leftmost cell to the bottommost-rightmost cell, so the two regions separated by Q can be merged into a single (N−1)×(N−1) grid. However, unlike the discussion for P, Q is not one of the paths in the original partition, so Q may split some original path X 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 P. Consider the intersection point x of X and Q:
- If x arises from case (a) above, then Q contains the latter half of X, so after removing Q, X remains a single right-down path;
- If x arises from case (b) or (c) above, then Q contains the former half or the latter half of X, so after removing Q, X remains a single right-up path;
- If X arises from case (d) above, then since X∩Q consists of exactly two cells, we see that after removing Q, the two pieces into which X 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 P, we know that the original N×N grid must be partitioned into at least N paths. This completes the proof.