Problem:
A library offers 5 desks arranged in a row from left to right for quiet studying. Students arrive one at a time and sit down at a desk. If possible, each student avoids sitting next to another student. Otherwise they will, if possible, sit next to one student rather than two. How many possible seating configurations (which seats are occupied) for one to five students are there?
Answer Choices:
A. 14
B. 17
C. 20
D. 22
E. 24
Solution:
Number the desks 1 to 5 from left to right, and describe a configuration by its set of occupied desks. We count the configurations that can arise for each number of students.
One student. Any desk: 5 configurations.
Two students. With one desk taken, there is always a free desk with no neighbors, so the two students are never adjacent. The non-adjacent pairs are
{1,3}, {1,4}, {1,5}, {2,4}, {2,5}, {3,5}:
6 configurations.
Three students.
- From {1,3}, {3,5} or {1,5}, a desk with no neighbors is free, and the third student must take it: this always gives {1,3,5}.
- From {1,4}, every free desk (2, 3, 5) has exactly one occupied neighbor, so any of them may be chosen: {1,2,4}, {1,3,4}, {1,4,5}.
- From {2,5}, symmetrically: {1,2,5}, {2,3,5}, {2,4,5}.
- From {2,4}, desk 3 has two occupied neighbors, so the student takes desk 1 or 5: {1,2,4} or {2,4,5} (already listed).
That gives 7 configurations: {1,3,5} and the six listed under {1,4} and {2,5}.
Four students. The fourth student takes a free desk with the fewest occupied neighbors. Going through the seven cases:
- {1,3,5}: desks 2 and 4 each have two neighbors, giving {1,2,3,5} or {1,3,4,5}.
- {1,2,4} and {2,4,5}: an end desk (one neighbor) beats desk 3 (two neighbors), giving {1,2,4,5}.
- {1,3,4}: desk 5 (one neighbor) beats desk 2 (two), giving {1,3,4,5}. Symmetrically {2,3,5} gives {1,2,3,5}.
- {1,4,5}: desks 2 and 3 each have one neighbor, giving {1,2,4,5} or {1,3,4,5}. Symmetrically {1,2,5} gives {1,2,3,5} or {1,2,4,5}.
So the empty desk is always 2, 3 or 4: 3 configurations.
Five students. 1 configuration.
The total is
5+6+7+3+1=(D) 22.
The problems and solutions on this page are the property of the MAA's American Mathematics Competitions