Problem:
How many sequences of ten binary digits are there in which neither two zeroes nor three ones ever appear in a row?
Solution
Solution:
Let be the number of binary sequences of length satisfying the conditions and ending in , let be the number ending in , and let be the number ending in . From the legal sequences of length (, , ), we find that . We now establish a recursion by building sequences of length from sequences of length .
We can add a to a sequence of length if and only if it ended with a , so .
We can have a sequence of length ending with only by adding a to a sequence of length ending in , so .
We can have a sequence of length ending with only by adding a to a sequence of length ending in , so .
We can now run the recursion:
| 2 | 1 | 1 | 1 |
| 3 | 2 | 1 | 1 |
| 4 | 2 | 2 | 1 |
| 5 | 3 | 2 | 2 |
| 6 | 4 | 3 | 2 |
| 7 | 5 | 4 | 3 |
| 8 | 7 | 5 | 4 |
| 9 | 9 | 7 | 5 |
| 10 | 12 | 9 | 7 |
Our answer is then .
Want a route through all this instead of an archive? The track
puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.