Twelve lamps stand evenly spaced around a circular plaza, so each lamp has exactly two neighbours. To save power, the city may switch on any set of lamps as long as no two neighbouring lamps are both on. The lamps are distinguishable (each has a fixed position), and the pattern with every lamp off counts. How many different on/off patterns are allowed?
Enter an integer
Show solution
For lamps in a straight line, let an be the number of valid patterns of n lamps. The last lamp is off (an−1 ways) or on with its neighbour off (an−2 ways), so an=an−1+an−2 with a1=2,a2=3, giving 2,3,5,8,13,21,34,55,89,144,233 for n=1,…,11. On the circle, split on lamp 1. If it is off, lamps 2 to 12 form a line of 11: a11=233. If it is on, lamps 2 and 12 must be off and lamps 3 to 11 form a line of 9: a9=89. Total 233+89=322.