Levik has invested a lot in real estate, and now owns all the land on one side of Flooble Blvd, ending with his very own Perplexus Tower. He now has 10 clients who each want to lease some land in order to build.
Each client plans to build something with a different number of stories from 1 to 10. Levik wants to be able to see all these buildings from the top of Perplexus Tower. This is impossible if any building is immediately behind another that is two or more stories higher.
In how many different orders can Levik lease the narrow strip of land to his 10 clients? What if, after building Perplexus Tower even higher, buildings can only be obscured if the one directly in front of it is three or more stories higher? Four? More?
With one tower there is one ordering: 1
With two towers there are two orderings 1,2 and 2,1
To add a third tower there are four orderings: one putting the 3 at the end of each of the above (1,2,3 and 2,1,3) and two that put it directly before the 2 (1,3,2 and 3,2,1)
Each time tower n+1 is added it can go onto each of the previous solutions in two ways, at the end and directly behind tower n. So f(1)=1 and f(n+1) = 2*f(n)
f(10) = 2^9 = 512
Posted by Jer
on 2006-04-27 12:55:14