How many rows can we make with these black and white pebbles?
Question
Suppose you have an unlimited supply of black and white pebbles. There are four ways in which you can put two of them in a row: , , and .
- Write down the eight different ways in which you can put three pebbles in a row.
- In how many different ways can you put pebbles in a row?
Suppose now that you are not allowed to put black pebbles next to each other. There are now only three ways of putting two pebbles in a row, because is forbidden.
- Write down the five different ways that are still allowed for three pebbles.
Now let be the number of possible arrangements for pebbles in a row, still under the restriction that black pebbles may not be next to each other, so and .
- Show that for we have . Hint: consider separately the case where the last pebble is white, and the case where it is black.
Finally, suppose that we impose the further restriction that the first pebble and the last pebble cannot both be black. Let be the number of such arrangements for pebbles; for example, , since the configuration is now forbidden.
- For , write down a formula for in terms of the numbers , and explain why it is correct.
Suggestion
Using the hint: if the last pebble is white, what do we know about the rest of the row?
What do we know if the first pebble is white? If it’s black?
Solution
The eight ways are , , , , , , , .
For pebbles, there are two possibilities for each (black or white), giving possible ways.
The five ways are , , , , .
Consider a row of pebbles which does not contain adjacent black pebbles; there are such arrangements.
-
If the last pebble is , then the previous pebbles form a row of length with no adjacent s; there are such arrangements.
-
If the last pebble is , the previous pebble must be , and the rest form a row of length with no adjacent s; there are such arrangements.
These are all the possible combinations that fit the rule, and so .
Of the rows of length which follow these rules:
-
If the first pebble is , the rest of the pebbles form a row of length with no adjacent s; there are such arrangements.
-
If the first pebble is , the second must be ; also the last pebble must be . The remaining pebbles form a row of length with no adjacent s; there are such arrangements.
These are all the possible combinations that fit the rule, and so
Alternatively, consider all the rows of length with no adjacent black pairs. There are of these.
We now wish to subtract the rows that have a black pebble at each end. These will each have a white pebble alongside.
Remove these four pebbles, and we have a row of length , and there are possibilities for this.
So .
We know , so applying this twice, we have