Subfield: Combinatorics


Question: At the Canadian Eatery with Multiple Configurations, there are round tables, around which chairs are placed. When a table has $n$ chairs around it for some integer $n \geq 3$, the chairs are labelled $1,2,3, \ldots, n-1, n$ in order around the table. A table is considered full if no more people can be seated without having two people sit in neighbouring chairs. For example, when $n=6$, full tables occur when people are seated in chairs labelled $\{1,4\}$ or $\{2,5\}$ or $\{3,6\}$ or $\{1,3,5\}$ or $\{2,4,6\}$. Thus, there are 5 different full tables when $n=6$.

<img_3455>
Determine the number of different full tables when $n=19$.

Solution:
For each integer $n \geq 3$, we define $f(n)$ to be the number of different full tables of size $n$. We can check that

- $f(3)=3$ because the full tables when $n=3$ have people in chairs $\{1\},\{2\},\{3\}$,
- $f(4)=2$ because the full tables when $n=4$ have people in chairs $\{1,3\},\{2,4\}$, and
- $f(5)=5$ because the full tables when $n=4$ have people in chairs $\{1,3\},\{2,4\},\{3,5\}$, $\{4,1\},\{5,2\}$.

In the problem, we are told that $f(6)=5$ and in part (a), we determined that $f(8)=10$. This gives us the following table:

| $n$ | $f(n)$ |
| :---: | :---: |
| 3 | 3 |
| 4 | 2 |
| 5 | 5 |
| 6 | 5 |
| 7 | $?$ |
| 8 | 10 |

Based on this information, we make the guess that for every integer $n \geq 6$, we have $f(n)=f(n-2)+f(n-3)$.

For example, this would mean that $f(7)=f(5)+f(4)=5+2=7$ which we can verify is true.

Based on this recurrence relation (which we have yet to prove), we deduce the values of $f(n)$ up to and including $n=19$ :

| $n$ | $f(n)$ | $n$ | $f(n)$ |
| :---: | :---: | :---: | :---: |
| 3 | 3 | 11 | 22 |
| 4 | 2 | 12 | 29 |
| 5 | 5 | 13 | 39 |
| 6 | 5 | 14 | 51 |
| 7 | 7 | 15 | 68 |
| 8 | 10 | 16 | 90 |
| 9 | 12 | 17 | 119 |
| 10 | 17 | 18 | 158 |
|  |  | 19 | 209 |

We now need to prove that the equation $f(n)=f(n-2)+f(n-3)$ is true for all $n \geq 6$.



We think about each full table as a string of 0 s and 1s, with 1 representing a chair that is occupied and 0 representing an empty chair.

Let $a(n)$ be the number of full tables with someone in seat 1 (and thus nobody in seat 2). Let $b(n)$ be the number of full tables with someone in seat 2 (and thus nobody in seat 1). Let $c(n)$ be the number of full tables with nobody in seat 1 or in seat 2 .

Since every full table must be in one of these categories, then $f(n)=a(n)+b(n)+c(n)$. A full table with $n$ seats $n \geq 4$ must correspond to a string that starts with 10,01 or 00 . Since there cannot be more than two consecutive 0s, we can further specify this, namely to say that a full table with $n$ seats must correspond to a string that starts with 1010 or 1001 or 0100 or 0101 or 0010 . In each case, these are the first 4 characters of the string and correspond to full (1) and empty (0) chairs.

Consider the full tables starting with 1010. Note that such strings end with 0 since the table is circular. Removing the 10 from positions 1 and 2 creates strings of length $n-2$ that begin 10. These strings will still correspond to a full table, and so there are $a(n-2)$ such strings. (We note that all possible strings starting 1010 of length $n$ will lead to all possible strings starting with 1010 of length $n-2$.)

Consider the full tables starting with 1001. Note that such a string ends with 0 since the table is circular. Removing the 100 from positions 1, 2 and 3 creates strings of length $n-3$ that begin 10. (There must have been a 0 in position 5 after the 1 in position 4.) These strings will still correspond to full tables, and so there are $a(n-3)$ such strings. Consider the full tables starting with 0100 . Removing the 100 from positions 2,3 and 4 creates strings of length $n-3$ that begin 01 . (There must have been a 1 in position 5 after the 0 in position 4.) These strings will still correspond to full tables, and so there are $b(n-3)$ such strings.

Consider the full tables starting with 0101. Removing the 01 from positions 3 and 4 creates strings of length $n-2$ that begin 01 . (The 1 in position 4 must have been followed by one or two 0s and so these strings maintains the desired properties.) These strings will still correspond to full tables, and so there are $b(n-2)$ such strings.

Consider the full tables starting with 0010. These strings must begin with either 00100 or 00101.

If strings start 00100 , then they start 001001 and so we remove the 001 in positions 4,5 and 6 and obtain strings of length $n-3$ that start 001 (and thus start 00). There are $c(n-3)$ such strings.

If strings start 00101, we remove the 01 in positions 4 and 5 and obtain strings of length $n-2$ that start 001 (and thus start 00 ). There are $c(n-2)$ such strings.

These 6 cases and subcases count all strings counted by $f(n)$.

Therefore,

$$
\begin{aligned}
f(n) & =a(n-2)+a(n-3)+b(n-3)+b(n-2)+c(n-3)+c(n-2) \\
& =a(n-2)+b(n-2)+c(n-2)+a(n-3)+b(n-3)+c(n-3) \\
& =f(n-2)+f(n-3)
\end{aligned}
$$

as required, which means that the number of different full tables when $n=19$ is 209 .
Extending our approach from (b), the number of people seated at a full table with 19 chairs is at least $\frac{19}{3}=6 \frac{1}{3}$ and at most $\frac{19}{2}=9 \frac{1}{2}$.

Since the number of people is an integer, there must be 7,8 or 9 people at the table, which means that the number of empty chairs is 12,11 or 10 , respectively.



Suppose that there are 9 people and 9 gaps with a total of 10 empty chairs.

In this case, there is 1 gap with 2 empty chairs and 8 gaps with 1 empty chair.

There are 19 pairs of chairs in which we can put 2 people with a gap of 2 in between: $\{1,4\},\{2,5\}, \ldots,\{19,3\}$.

Once we choose one of these pairs, the seat choice for the remaining 8 people is completely determined by placing people in every other chair.

Therefore, there are 19 different full tables with 9 people.

Suppose that there are 8 people and 8 gaps with a total of 11 empty chairs.

In this case, there are 3 gaps with 2 empty chairs and 5 gaps with 1 empty chair. There are 7 different circular orderings in which these 8 gaps can be arranged:

$$
\begin{array}{lllllll}
22211111 & 22121111 & 22112111 & 22111211 & 22111121 & 21212111 & 21211211
\end{array}
$$

We note that "22211111" would be the same as, for example, "11222111" since these gaps are arranged around a circle.

If the three gaps of length 2 are consecutive, there is only one configuration (22211111). If there are exactly 2 consecutive gaps of length 2 , there are 4 relative places in which the third gap of length 2 can be placed.

If there are no consecutive gaps of length 2 , these gaps can either be separated by 1 gap each (21212111) with 3 gaps on the far side, or can be separated by 1 gap, 2 gaps, and 2 gaps (21211211). There is only one configuration for the gaps in this last situation.

There are 7 different circular orderings for these 8 gaps.

Each of these 7 different orderings can be placed around the circle of 19 chairs in 19 different ways, because each can be started in 19 different places. Because 19 is prime, none of these orderings overlap.

Therefore, there are $7 \cdot 19=133$ different full tables with 8 people.

Suppose that there are 7 people and 7 gaps with a total of 12 empty chairs.

In this case, there are 2 gaps with 1 empty chair and 5 gaps with 2 empty chairs.

The 2 gaps with 1 empty chair can be separated by 0 gaps with 2 empty chairs, 1 gap with 2 empty chairs, or 2 gaps with 2 empty chairs. Because the chairs are around a circle, if there were 3 , 4 or 5 gaps with 2 empty chairs between them, there would be 2,1 or 0 gaps going the other way around the circle.

This means that there are 3 different configurations for the gaps.

Each of these configurations can be placed in 19 different ways around the circle of chairs. Therefore, there are $3 \cdot 19=57$ full tables with 7 people.

In total, there are $19+133+57=209$ full tables with 19 chairs.
As in Solution 2, there must be 7, 8 or 9 people in chairs, and so there are 7,8 or 9 gaps. If there are 7 gaps, there are 2 gaps of 1 chair and 5 gaps of 2 chairs.

If there are 8 gaps, there are 5 gaps of 1 chair and 3 gaps of 2 chairs.

If there are 9 gaps, there are 8 gaps of 1 chair and 1 gap of 2 chairs.

We consider three mutually exclusive cases: (i) there is a person in chair 1 and not in chair 2 , (ii) there is a person in chair 2 and not in chair 1 , and (iii) there is nobody in chair 1 or in chair 2. Every full table fits into exactly one of these three cases.

Case (i): there is a person in chair 1 and not in chair 2

We use the person in chair 1 to "anchor" the arrangement, by starting at chair 1 and



arranging the gaps (and thus the full chairs) clockwise around the table from chair 1.

If there are 7 gaps, we need to choose 2 of them to be of length 1 , and so there are $\left(\begin{array}{l}7 \\ 2\end{array}\right)$ ways of arranging the gaps starting at chair 1.

If there are 8 gaps, we need to choose 3 of them to be of length 2 , and so there are $\left(\begin{array}{l}8 \\ 3\end{array}\right)$ ways of arranging the gaps starting at chair 1.

If there are 9 gaps, we need to choose 1 of them to be of length 2 , and so there are $\left(\begin{array}{l}9 \\ 1\end{array}\right)$ ways of arranging the gaps starting at chair 1.

In this case, there are a total of $\left(\begin{array}{l}7 \\ 2\end{array}\right)+\left(\begin{array}{l}8 \\ 3\end{array}\right)+\left(\begin{array}{l}9 \\ 1\end{array}\right)=21+56+9=86$ full tables.

Case (ii): there is a person in chair 2 and not in chair 1

We use the same reasoning starting with the person in chair 2 as the anchor.

Again, there are 86 full tables in this case.

Case (iii): there is nobody in chair 1 or chair 2

Since there is nobody in chair 1 or chair 2 , there must be a person in chair 3 and also in chair 19 , which fixes one gap of 2 chairs.

Here, we use the person in chair 3 as the anchor.

If there are 7 gaps, there are 2 gaps of 1 chair and 4 gaps of 2 chairs left to place. There are $\left(\begin{array}{l}6 \\ 2\end{array}\right)$ ways of doing this.

If there are 8 gaps, there are 5 gaps of 1 chair and 2 gaps of 2 chairs left to place. There are $\left(\begin{array}{l}7 \\ 2\end{array}\right)$ ways of doing this.

If there are 9 gaps, there are 8 gaps of 1 chair and 0 gaps of 2 chairs left to place. There is 1 way to do this.

In this case, there are a total of $\left(\begin{array}{l}6 \\ 2\end{array}\right)+\left(\begin{array}{l}7 \\ 2\end{array}\right)+1=15+21+1=37$ full tables.

In total, there are $86+86+37=209$ full tables with 19 chairs.

Final answer: 209