 # Intro to the floor and ceiling functions

In a cross-country run, Sven placed exactly in the middle, among all participants. Dan placed lower, in tenth place, and Lars placed sixteenth. Is it possible to figure out how many runners took part in the race? If not, can you find a minimum number of runners? a maximum?

Rule 1: If someone placed nth, then we know there are at least n runners.

Rule 2: If someone placed exactly in the middle, then the number of runners, n, is odd, and the middle place is (n + 1) / 2, which is even.

Rule 3: If someone placed higher than the exact middle, in nth place, then the number of runners is odd, and there are at least 2n + 1 runners.

Rule 4: If someone placed lower than the exact middle, then there are at least ceil(n / 2) + 1 runners, and at most 2(n - 2) + 1.

Using rule 1: Lars placed 16th. Thus, there are at least 16 runners.

Using rule 2: Sven placed exactly in the middle. Thus, the number of runners is odd. But we already know there are at least 16 runners, which is an even number. Thus the number of runners must be at least 17.

Using rule 4: Dan placed lower than Sven, in 10th place. Thus, there are at least ceil(10 / 2) + 1 = 6 runners, and there are at most 2(10 - 2) + 1 = 17 runners. But now we have that there are at least 17 runners, and at most 17 runners, and so the number of runners must be equal to 17.

Using rule 2: Sven placed exactly in the middle, and there were 17 runners. Thus, Sven placed (17 + 1) / 2 = 9th.

This puzzle comes from "The Inquisitive Problem Solver." The solution is my own.