Tom K. answered 10/28/20
Knowledgeable and Friendly Math and Statistics Tutor
The recurrence relationship is developed by noting that
T1 = 1 (1 1x2 tile aligned vertically),
T2 contains 2 vertically aligned 1x2 tiles, 2 horizontally aligned 1x2 tile, or a 2x2 tile, so T2 = 3
For Tn, n >= 3, if the last tiling is a vertical tile, then the 2x n-1 area before it has Tn-1 arrangements.
If the last tiling is either 2 horizontal 1x2 tiles or a 2x2 tile, the area before it is 2 x n-2 and has Tn-2 arrangements. Noting that the last tiling has 2 possibilities (2 1x2 or a 2x2),
Tn = Tn-1 + 2Tn-2
ii) The formula actually works for n >= 1. I will write it as Tn = (2n+1+(-1)n)/3
For n = 1, (2n+1+(-1)n)/3 = (21+1+(-1)1)/3 = (22+(-1)1)/3 = (4 + -1)/3 = 3/3 = 1 This matches T1
For n = 2, (2n+1+(-1)n)/3 = (22+1+(-1)2)/3 = (23+(-1)2)/3 = (8 + 1)/3 = 9/3 = 3 This is T2 from above
We assume true the formula Tk = (2k+1+(-1)k)/3 is true for k = n-1 and k = n-2. (Since we proved for 2 consecutive values, we can do this.)
Note that (-1)*(-1) = 1, so we can always multiply by this.
Then, Tn = Tn-1 + 2Tn-2 = (2n-1+1+(-1)n-1)/3 + 2 * (2n-2+1+(-1)n-2)/3 =
(2n-+(-1)n-1 + 2*2n-1 + 2*(-1)n-2)/3 =
(2n-+ 2n-1+1 + (-1)*(-1)*(-1)n-1 + 2*(-1)*(-1)*(-1)n-2)/3 =
(2n-+ 2n + (-1)*(-1)n + 2*(-1)n)/3 =
(2 * 2n + (-1+2)*(-1)n)/3 =
(2n+1 + (-1)n)/3 This is what we are trying to prove.
As the second part of this equation is ± 1/3, we can determine n from the remainder of the equation and check that we aren't at the margin.
2n+1 /3 > 1000
2n+1 > 3000
n = ln(3000)/ln(2) - 1
n = 10.55
n = 11
Clearly, based upon how far n is from 10 and 11, the margin will not be an issue, but we verify.
T11 = (211+1 + (-1)11)/3 = (212 + (-1)11)/3 = (4096 - 1)/3 = 1365
T10 = (210+1 + (-1)10)/3 = (211 + (-1)10)/3 = (2048 + 1)/3 = 683
n = 11