There are people in a queue waiting to enter a hall. The hall has exactly seats numbered from to . The first person in the queue enters the hall, chooses any seat and sits there.the -th person in the queue, where can be enters the hall after the -th person has seated. He seats in seat number if he finds it vacant; otherwise he takes an unoccupied seat at. Find the total number of ways in which the seats can be filled up, provided the -th person occupies seat number .
Easy Math Editor
This discussion board is a place to discuss our Daily Challenges and the math and science related to those challenges. Explanations are more than just a solution — they should explain the steps and thinking strategies that you used to obtain the solution. Comments should further the discussion of math and science.
When posting on Brilliant:
*italics*
or_italics_
**bold**
or__bold__
paragraph 1
paragraph 2
[example link](https://brilliant.org)
> This is a quote
\(
...\)
or\[
...\]
to ensure proper formatting.2 \times 3
2^{34}
a_{i-1}
\frac{2}{3}
\sqrt{2}
\sum_{i=1}^3
\sin \theta
\boxed{123}
Comments
I think I have a solution. Let Pi denote person i and Si denote seat i. Also, let Pi=Sj denote that person i sits in seat j. Firstly we will prove a lemma (L1): 'If Pi=Sj then either j≥i or j=1' To show this, let us assume that in fact j<i and j=1. Consider Pi is just about to enter the hall. Pi can only sit in Sjif Sj is empty at this time. But if Sj is empty at this time then Sj was also available when Pj entered the hall (since Pj entered the hall before Pi). Therefore Pj would have sat in Sj, and so in fact Sj would not be empty when Pi was about to enter the hall. Therefore we have a contradiction, so our assumption that j<i and j=1 was false, so either j≥i or j=1 (j=1 is allowed since P1 is not compelled to sit in his own seat like everyone else is). So the lemma is proved. So now, say that Pa=Sb where a=1 and a<b. This means that Sb is occupied when Pb is about to enter the hall. Therefore, using L1, Pb=Sc, where b<c. This is forming what will be known as a series ( a,b,c,...). However, we now have the same problem with Pc, ie. Pc=Sd where c<d. This would seem to imply that if someone other than P1 sits in a seat which is not their own then it will form an infinite increasing series, but we only have finitely many people. However, we have forgotten that someone in the series can sit in S1.
Clearly only 1 person can sit in S1, and we have just seen that a series is only possible if someone in the series does sit in S1. Therefore there can only be at most 1 series. Therefore, if there is a series, P1 must be part of it, since someone else will be sitting in his seat, and so P1=Sm where m=1, but if m were not part of the series then we would have started a second series, which we know is not allowed, so m is part of the series and therefore so is P1. Since P100=S100 we know that 100 is not part of the series, and from the work we have just done we know that 1 is definitely part of the series (if there is one). So in fact we are done: The number of ways to fill 100 seats with the given conditions is the same as the number of strictly increasing sequences we can choose from the set 2,3,4,...,99 where the empty set is valid (since this corresponds to when there is no series - everyone sits in their own seat). To make this a bit more clear I will give a random example. Say we pick the strictly increasing sequence 14,23,97 Then this corresponds to: P1=S14 P14=S23 P23=S97 P97=S1 and Pi=Si when i=1,14,23,97. Every selection of numbers from the set can be ordered only 1 way so that it is strictly increasing. Therefore the answer is : k=0∑98(k98)=298
If anyone has any queries or questions please feel free to ask
Log in to reply
Excellent job!!I think this is the perfect solution!!
Log in to reply
Thanks. I noticed after doing my solution that there is a nice problem (and result) which follow naturally: What is the probability that Pa=Sa if a=1? Well, if Pa=Sa this means that a is not in the series. Therefore we in fact can only choose from 97 numbers not 98 for our strictly increasing sequence, and so there are 297 possible combinations if Pa=Sa. Therefore the probability that Pa=Sa is 298297=21. So the probability that someone sits in his own seat (provided that person isn't P1) is 21
Log in to reply
Log in to reply
Holy crap. I just tried it for half an hour, thought it was easy, and then realized that you have to consider HUGE amounts of cases. I think, though, it would be cool to say that there are 10 people, and write a problem like that. I'll do that, actually.
"Otherwise he takes an unoccupied seat" meaning he choses it at random?
Log in to reply
Yes. And whatever he chooses creates a whole different set of configurations. Which is why this problem is annoying. Also, are you following me?
Yes sir, that's how it is?
Log in to reply
I previously thought you were asking for the probability, which is why I asked if it was "at random'. But given that you're asking for the number of ways, that doesn't matter then.
Log in to reply
Another question to ponder is the probability that the last seat is free for person 100 to take. This is probably an easier question to tackle.