A well-known puzzle apparently - I don't think I'd seen it before it
appeared on the National Cipher Challenge a couple of week's ago. I've
added the part b) question.
There is a plane with 100 seats and we have 100 passengers entering the
plane one after the other. The first passenger cannot find their boarding pass, so chooses a random (uniformly) seat. All the other passengers do
the following when entering the plane (they have their boarding passes).
If the seat written on the boarding pass is free, the passenger sits on
this seat, if not they chooses a other (free) seat at random (uniformly).
a) What is the probability the last passenger entering the plane gets
their allocated seat?
b) What is the average number of passengers seated in the incorrect seat
on each flight?
On 30/11/2025 08:31, David Entwistle wrote:
A well-known puzzle apparently - I don't think I'd seen it before it
appeared on the National Cipher Challenge a couple of week's ago. I've
added the part b) question.
There is a plane with 100 seats and we have 100 passengers entering the
plane one after the other. The first passenger cannot find their boarding
pass, so chooses a random (uniformly) seat. All the other passengers do
the following when entering the plane (they have their boarding passes).
If the seat written on the boarding pass is free, the passenger sits on
this seat, if not they chooses a other (free) seat at random (uniformly).
a) What is the probability the last passenger entering the plane gets
their allocated seat?
b) What is the average number of passengers seated in the incorrect seat
on each flight?
I have answers. I'm reluctant to spoil (so I won't) because I Monte Carlo'd it, but I have a
question about the philosophy of puzzles. What distinguishes this from a maths problem? That is,
what makes it a puzzle rather than an exercise?
I have answers. I'm reluctant to spoil (so I won't) because I Monte
Carlo'd it, but I have a question about the philosophy of puzzles. What distinguishes this from a maths problem? That is, what makes it a puzzle rather than an exercise?
A well-known puzzle apparently - I don't think I'd seen it before it >appeared on the National Cipher Challenge a couple of week's ago. I've
added the part b) question.
In article <10ggvc9$565j$1@dont-email.me>,
David Entwistle <qnivq.ragjvfgyr@ogvagrearg.pbz> wrote:
A well-known puzzle apparently - I don't think I'd seen it before it
appeared on the National Cipher Challenge a couple of week's ago. I've
added the part b) question.
A nice problem.
Solution to part (a).
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Preliminary observations:
Let n be the number of seats (100, but we'll do it generally).
Label the passengers 1 .. n and their assigned seats similarly.
There's a 1/n probability that the first passenger will by chance take
their own seat. In that case, everyone else will be able to take
their own seat.
Otherwise they takes a wrong seat and the following are now true:
(1) Seat 1 is (wrongly) available.
(2) There is one unboarded passenger whose seat is (wrongly) already taken.
When a passenger boards the plane, one of the following happens:
(a) Their seat is available; (1) and (2) are unaffected, since their seat
is not seat 1 and they are not a passenger whose seat is wrongly taken.
(b) Their seat is wrongly taken, and they take a seat other than seat 1.
Now the number of unboarded passengers whose seat is wrongly taken
decreases by 1 (because this passenger is no longer unboarded), but
also increases by 1 (because they've taken the seat of an unboarded
passenger). Again (1) and (2) are unaffected.
(c) Their seat is wrongly taken, and they take seat 1. Now the number of
unboarded passengers with their seat wrongly taken decreases by 1,
and seat 1 is taken.
We see that there is always exactly one unboarded passenger whose seat
is wrongly taken until someone takes seat 1, at which point all the
remaining passengers will be able to take their own seat.
So the question is equivalent to asking what the probability is of someone taking seat 1 before the last passenger boards.
Solution:
Assuming that seat 1 has not yet been taken, the probability of
passenger i taking seat 1 is the chance of them being the unboarded
passenger whose seat is wrongly taken, times the chance of them
choosing seat 1 out of the available seats. There are n - (i-1)
unboarded passengers and n - (i-1) available seats, so this
probability is
1/(n - (i-1))^2
The probability of none of them before the last taking seat 1 is
therefore
(1 - 1/n) prod(i=2..n-1) (1 - 1/(n - (i-1))^2)
Writing j = n - (i-1) we get
(1 - 1/n) prod(j=2..n-1) (1 - 1/j^2)
= (n-1) / n prod(j=2..n-1) ((j-1)(j+1)/j^2)
= (n-1) / n prod(j=2..n-1) (j-1) prod(j=2..n-1) (j+1) / prod(j=2..n-1) j^2
The products cancel out except for their first and last terms, giving
(n-1) / n . 1/(n-1) . n/2
= 1/2
-- Richard
[much simpler solution]
In article <10gq084$3imsj$1@dont-email.me>,
Mike Terry <news.dead.person.stones@darjeeling.plus.com> wrote:
[much simpler solution]
Having found the answer I felt sure there must be a simple way to get
it, but I didn't find it.
4. One of these must occur, and they are equally likely by symmetry,
Having found a completely different answer I felt sure there must be a
simple way to get it, but I didn't find it.
There is a plane with 100 seats and we have 100 passengers entering the plane one after the other. The first passenger cannot find their boarding pass...
...
b) What is the average number of passengers seated in the incorrect seat
on each flight?
... I have a question about the philosophy of
puzzles. What distinguishes this from a maths problem? That is,
what makes it a puzzle rather than an exercise?
It's that statement that I struggled with. It is clearly true, but not obvious to me, even when spelled out. Well done for being able to see
that. I got the right answer, but not that clarity.
I like the phrasing of the solution in which we ask the first passenger
to move, which I think also makes that symmetry clearer.
David Entwistle <qnivq.ragjvfgyr@ogvagrearg.pbz> posted:
There is a plane with 100 seats and we have 100 passengers entering the
plane one after the other. The first passenger cannot find their boarding
pass...
...
b) What is the average number of passengers seated in the incorrect seat
on each flight?
I didn't see any solution to part (b) posted. I'll paste Hamlet's
soliloquy as spoiler space.
To be, or not to be- that is the question:
Whether 'tis nobler in the mind to suffer
The slings and arrows of outrageous fortune
Or to take arms against a sea of troubles,
And by opposing end them. To die- to sleep-
No more; and by a sleep to say we end
The heartache, and the thousand natural shocks
That flesh is heir to. 'Tis a consummation
Devoutly to be wish'd. To die- to sleep.
To sleep- perchance to dream: ay, there's the rub!
For in that sleep of death what dreams may come
When we have shuffled off this mortal coil,
Must give us pause. There's the respect
That makes calamity of so long life.
For who would bear the whips and scorns of time,
Th' oppressor's wrong, the proud man's contumely,
The pangs of despis'd love, the law's delay,
The insolence of office, and the spurns
That patient merit of th' unworthy takes,
When he himself might his quietus make
With a bare bodkin? Who would these fardels bear,
To grunt and sweat under a weary life,
But that the dread of something after death-
The undiscover'd country, from whose bourn
No traveller returns- puzzles the will,
And makes us rather bear those ills we have
Than fly to others that we know not of?
Thus conscience does make cowards of us all,
And thus the native hue of resolution
Is sicklied o'er with the pale cast of thought,
And enterprises of great pith and moment
With this regard their currents turn awry
And lose the name of action.- Soft you now!
The fair Ophelia!- Nymph, in thy orisons
Be all my sins rememb'red.
- - - - - - - - - - - - - - - -
The mapping between assigned seat and actual seat is a permutation
with all but one cycle singletons. What is the average length of the
cycle containing the confused passenger?
There is a 1/100 (or 1/N) chance the cycle-size is just 1; a
99/100 x 1/99 chance of size 2, 99/100 x 98/99 x 1/98 chance of 3,
and so on. Those complicated products each reduce to 1/100 (or 1/N).
So the average cycle length is (1/N) x (1 + 2 + 3 + ... + N) which is (N+1)/2.
But the confused passenger gets their assigned seat when the cycle size
is 1, so that case must be subtracted for a final answer of
(N+1)/2 - 1/N
or 50.49
Cheers,
James
There is a 1/100 (or 1/N) chance the cycle-size is just 1;
a 99/100 x 1/99 chance of size 2
Richard Heathfield <rjh@cpax.org.uk> posted:
... I have a question about the philosophy of
puzzles. What distinguishes this from a maths problem? That is,
what makes it a puzzle rather than an exercise?
One part of the answer is that a puzzle should short-circuit
tedious math.
As an example, after I posted a solution to the confused passenger problem >just moments ago, I realized that I'd made it much harder than necessary.
The answer is so simple that others had doubtless already mentioned it
but so briefly I didn't notice.
On 05/12/2025 05:34, James Dow Allen wrote:
I get the same.
David Entwistle <qnivq.ragjvfgyr@ogvagrearg.pbz> posted:
There is a plane with 100 seats and we have 100 passengers entering the
plane one after the other. The first passenger cannot find their boarding >>> pass...
...
b) What is the average number of passengers seated in the incorrect seat >>> on each flight?
I didn't see any solution to part (b) posted.a I'll paste Hamlet's
soliloquy as spoiler space.
aaaa To be, or not to be- that is the question:
aaaa Whether 'tis nobler in the mind to suffer
aaaa The slings and arrows of outrageous fortune
aaaa Or to take arms against a sea of troubles,
aaaa And by opposing end them. To die- to sleep-
aaaa No more; and by a sleep to say we end
aaaa The heartache, and the thousand natural shocks
aaaa That flesh is heir to. 'Tis a consummation
aaaa Devoutly to be wish'd. To die- to sleep.
aaaa To sleep- perchance to dream: ay, there's the rub!
aaaa For in that sleep of death what dreams may come
aaaa When we have shuffled off this mortal coil,
aaaa Must give us pause. There's the respect
aaaa That makes calamity of so long life.
aaaa For who would bear the whips and scorns of time,
aaaa Th' oppressor's wrong, the proud man's contumely,
aaaa The pangs of despis'd love, the law's delay,
aaaa The insolence of office, and the spurns
aaaa That patient merit of th' unworthy takes,
aaaa When he himself might his quietus make
aaaa With a bare bodkin? Who would these fardels bear,
aaaa To grunt and sweat under a weary life,
aaaa But that the dread of something after death-
aaaa The undiscover'd country, from whose bourn
aaaa No traveller returns- puzzles the will,
aaaa And makes us rather bear those ills we have
aaaa Than fly to others that we know not of?
aaaa Thus conscience does make cowards of us all,
aaaa And thus the native hue of resolution
aaaa Is sicklied o'er with the pale cast of thought,
aaaa And enterprises of great pith and moment
aaaa With this regard their currents turn awry
aaaa And lose the name of action.- Soft you now!
aaaa The fair Ophelia!- Nymph, in thy orisons
aaaa Be all my sins rememb'red.
a - - - - - - - - - - - - - - - -
The mapping between assigned seat and actual seat is a permutation
with all but one cycle singletons.a What is the average length of the
cycle containing the confused passenger?
There is a 1/100 (or 1/N) chance the cycle-size is just 1; a
99/100 x 1/99 chance of size 2, 99/100 x 98/99 x 1/98 chance of 3,
and so on.a Those complicated products each reduce to 1/100 (or 1/N).
So the average cycle length is (1/N) x (1 + 2 + 3 + ... + N) which is
(N+1)/2.
But the confused passenger gets their assigned seat when the cycle size
is 1, so that case must be subtracted for a final answer of
aaaa (N+1)/2 - 1/N
or 50.49
Cheers,
James
Another approach, using Indicator RVs [random variables]...aa For each passenger k, define a RV:
a I_k = 1aaa if passenger k is displaced (doesn't get to sit in his own seat)
aaaaa = 0aaa otherwise (i.e. the passenger gets his own seat)
and D = number of displaced passengers
Then D = SUM(k=1 to 100) I_k
So E(D) =a E(SUM(k=1 to 100) I_k)aaaaaa [E(X) meaning expectation of X]
aaaaaaa =a SUM(k=1 to 100) E(I_k)
and E(I_k) [expectation of I_k] is easy to work out for each k:
for k=1, I_1 = 1 if first passenger chooses a seat other than his own, so p(I_1 = 1) = 99/100, and E(I_1) = 99/100.
for k = 2,3,..100, we worked out elsewhere the passenger is displaced with prob 1/2, so E(I_k) =
1/2.a [Basically, the passenger is displaced if the cycle of displacements started by the first
passenger reaches the first passengers own seat before passenger k's seat.a By symmetry either
possibility is equally likely.]
A well-known puzzle apparently - I don't think I'd seen it before it
appeared on the National Cipher Challenge a couple of week's ago. I've
added the part b) question.
There is a plane with 100 seats and we have 100 passengers entering the
plane one after the other. The first passenger cannot find their boarding pass, so chooses a random (uniformly) seat. All the other passengers do
the following when entering the plane (they have their boarding passes).
If the seat written on the boarding pass is free, the passenger sits on
this seat, if not they chooses a other (free) seat at random (uniformly).
a) What is the probability the last passenger entering the plane gets
their allocated seat?
b) What is the average number of passengers seated in the incorrect seat
on each flight?
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 54 |
| Nodes: | 6 (0 / 6) |
| Uptime: | 07:36:29 |
| Calls: | 743 |
| Files: | 1,218 |
| Messages: | 189,499 |