Sunday, January 27, 2013

Tile colouring problem (#8) from Problem solving strategies

Problem: Prove that an a × b rectangle can be covered by 1 × n rectangles iff n|a or n|b.

Solution: The proof is given by means of the following 2 claims.

Claim 1: Given a rectangular area is covered by tiles of dimension 1xn placed in horizontal or vertical orientation, it is possible to remove the tiles one at a time in such a way that at any point of time, the covered region’s top border consists of a sequence of steps increasing from left to right as shown in diagram 1.

Proof: Define step blocks to be rectangular regions defined by the step-like shape of the covered area. In diagram 1, step blocks are represented by the areas shaded blue. Start from the left most step block and consider the top left tile in that block. This tile must fall entirely within the current block (call it block A) or must extend beyond the right of the current step block (it cannot beyond the bottom of the current block since the first block is also the bottommost). In the former case, removing the tile will leave behind a step shape, thereby proving the claim. In the latter case, inspect the next step block for the possibility of removing a tile. The top left tile of this next block (call it block B) cannot extend beyond the bottom of that block since the block A’s top left tile occupies that portion as per the previous statement. Hence the top left tile of block B too must either lie entirely within B or extend beyond the right of B. As before, in the former case, removing the tile will leave a step shape whereas in the latter case, the search for a tile to remove can be repeated with the block to the right of C. Note that this procedure can be repeated at most till the rightmost block is reached, in which case the top left tile cannot extend beyond the right of the block (and must therefore lie entirely within that block), thereby becoming eligible for removal while retaining the step shape.

Claim 2: When tiles are removed as per the procedure of claim 1 and neither a not b are divisible by n, then at any point of time at least one of the step regions on the top border will have a height and a width (as defined by diagram 2) that are both indivisible by n.

Proof: The proof is by induction on r, the number of tiles removed so far under the procedure of claim 1. When r is 0, the covered region and also the only step region is the original axb rectangle. The height and width, namely a and b, are both indivisible by n as per the assumption. Suppose the claim is true for values of r upto R. Now consider r = (R + 1). Suppose the tile being removed at the current iteration lies in a step region whose width is W and height Is H. If either W or H is divisible by n, then there must be some other step region with width and height indivisible by n and that region will remain after iteration (R + 1)  as well. But if say W and H are both indivisible by n. After removing the tile in this iteration, the 2 new step regions would have dimensions (a) (W, H - 1) and (W - n, H) or (b) (W, H - n) and (W - 1, H), depending on the orientation of the tile; in either case, one of the new step regions would have its width and height indivisible by n. Hence proved.

Diagram 1: Step blocks denoted by shaded blue regions

Diagram 2: Width of step regions are denoted by L1 and L2; heights are denoted by H1 and H2. The rectangle  bounded by blue and red lines is the top left tile of its step block and is eligible for removal as per the procedure of claim 1

No comments:

Post a Comment