Skip to main content
added 11 characters in body
Source Link
Hans
  • 9.9k
  • 3
  • 19
  • 51

Let $P(n)$ denote the probability of the last passenger getting his seat if we begin with $n$ passengers.

Consider the simple case for just $2$ seats:

$P(2) = \frac12$ (first boarder picks his own seat with 1/2 probability)

For $n$ seats: (i) With $\frac1n$ probability, the passenger picks the seat of the first passenger, the n'th seat from the end (in which case the last passenger would definitely get his seat). (ii) With 1/n probability, the current passenger picks the seat of the last passenger, first seat from the end (and now, the last passenger can definitely not get his own seat). (iii) Otherwise, the passenger picks some other seat (say #i from the end) among the n-2 remaining seats (with probability 1/n), continuing the dilemma. The problem now reduces to the initial problem with i seats.

Therefore, $$ P(n) = \frac1n \times 1 + \frac1n \times 0 + \frac1n\sum_{i=2}^{n-1} P(i) $$ or $$ nP(n) = 1 + \sum_{i=2}^{n-1} P(i).$$ So $$nP(n)-(n-1)P(n-1)=P(n-1)\implies P(n)=P(n-1),$$$$nP(n)-(n-1)P(n-1)=P(n-1)\Longleftrightarrow P(n)=P(n-1),$$ and $P(n)=P(2) = \frac12, \,\forall n \ge 2$.

Let $P(n)$ denote the probability of the last passenger getting his seat if we begin with $n$ passengers.

Consider the simple case for just $2$ seats:

$P(2) = \frac12$ (first boarder picks his own seat with 1/2 probability)

For $n$ seats: (i) With $\frac1n$ probability, the passenger picks the seat of the first passenger, the n'th seat from the end (in which case the last passenger would definitely get his seat). (ii) With 1/n probability, the current passenger picks the seat of the last passenger, first seat from the end (and now, the last passenger can definitely not get his own seat). (iii) Otherwise, the passenger picks some other seat (say #i from the end) among the n-2 remaining seats (with probability 1/n), continuing the dilemma. The problem now reduces to the initial problem with i seats.

Therefore, $$ P(n) = \frac1n \times 1 + \frac1n \times 0 + \frac1n\sum_{i=2}^{n-1} P(i) $$ or $$ nP(n) = 1 + \sum_{i=2}^{n-1} P(i).$$ So $$nP(n)-(n-1)P(n-1)=P(n-1)\implies P(n)=P(n-1),$$ and $P(n)=P(2) = \frac12, \,\forall n \ge 2$.

Let $P(n)$ denote the probability of the last passenger getting his seat if we begin with $n$ passengers.

Consider the simple case for just $2$ seats:

$P(2) = \frac12$ (first boarder picks his own seat with 1/2 probability)

For $n$ seats: (i) With $\frac1n$ probability, the passenger picks the seat of the first passenger, the n'th seat from the end (in which case the last passenger would definitely get his seat). (ii) With 1/n probability, the current passenger picks the seat of the last passenger, first seat from the end (and now, the last passenger can definitely not get his own seat). (iii) Otherwise, the passenger picks some other seat (say #i from the end) among the n-2 remaining seats (with probability 1/n), continuing the dilemma. The problem now reduces to the initial problem with i seats.

Therefore, $$ P(n) = \frac1n \times 1 + \frac1n \times 0 + \frac1n\sum_{i=2}^{n-1} P(i) $$ or $$ nP(n) = 1 + \sum_{i=2}^{n-1} P(i).$$ So $$nP(n)-(n-1)P(n-1)=P(n-1)\Longleftrightarrow P(n)=P(n-1),$$ and $P(n)=P(2) = \frac12, \,\forall n \ge 2$.

Put it in LaTeX and simplified the derivation.
Source Link
Hans
  • 9.9k
  • 3
  • 19
  • 51

Let P(n)$P(n)$ denote the probability of the last passenger getting his seat if we begin with n$n$ passengers.

Consider the simple case for just 2$2$ seats:

P(2) = 1/2$P(2) = \frac12$ {(first boarder picks his own seat with 1/2 probability})

For n$n$ seats: (i) With 1/n$\frac1n$ probability, the passenger picks the seat of the first passenger, the n'th seat from the end (in which case the last passenger would definitely get his seat). (ii) With 1/n probability, the current passenger picks the seat of the last passenger, first seat from the end (and now, the last passenger can definitely not get his own seat). (iii) Otherwise, the passenger picks some other seat (say #i from the end) among the n-2 remaining seats (with probability 1/n), continuing the dilemma. The problem now reduces to the initial problem with i seats.

Therefore, P(n) = (1/n * (1)) + (1/n * (0)) + Sum {(1/n) * P(i), 2 < i < n};

            = 1/n + 1/n {Sum P(i), 2 < i < n }    --(1)

Similarly,((n-1)/n)P(n-1) = 1/n + 1/n Sum { P(i) , 2 < i < n-1 }

                      = [ 1/n + 1/n Sum { P(i) , 2 < i < n } ] - 1/n P(n-1) 

   => (n-1)/n P(n-1) = P(n) -1/n P(n-1)
   => P(n) = P(n-1)
   => P(m) = P(n-1) , for all integers m > n-1

Since P(2) = 1/2, Therefore P(m) = 1/2 for all integers m > 2$$ P(n) = \frac1n \times 1 + \frac1n \times 0 + \frac1n\sum_{i=2}^{n-1} P(i) $$ or $$ nP(n) = 1 + \sum_{i=2}^{n-1} P(i).$$ So $$nP(n)-(n-1)P(n-1)=P(n-1)\implies P(n)=P(n-1),$$ and $P(n)=P(2) = \frac12, \,\forall n \ge 2$.

Let P(n) denote the probability of the last passenger getting his seat if we begin with n passengers.

Consider the simple case for just 2 seats:

P(2) = 1/2 {first boarder picks his own seat with 1/2 probability}

For n seats: (i) With 1/n probability, the passenger picks the seat of the first passenger, the n'th seat from the end (in which case the last passenger would definitely get his seat). (ii) With 1/n probability, the current passenger picks the seat of the last passenger, first seat from the end (and now, the last passenger can definitely not get his own seat). (iii) Otherwise, the passenger picks some other seat (say #i from the end) among the n-2 remaining seats (with probability 1/n), continuing the dilemma. The problem now reduces to the initial problem with i seats.

Therefore, P(n) = (1/n * (1)) + (1/n * (0)) + Sum {(1/n) * P(i), 2 < i < n};

            = 1/n + 1/n {Sum P(i), 2 < i < n }    --(1)

Similarly,((n-1)/n)P(n-1) = 1/n + 1/n Sum { P(i) , 2 < i < n-1 }

                      = [ 1/n + 1/n Sum { P(i) , 2 < i < n } ] - 1/n P(n-1) 

   => (n-1)/n P(n-1) = P(n) -1/n P(n-1)
   => P(n) = P(n-1)
   => P(m) = P(n-1) , for all integers m > n-1

Since P(2) = 1/2, Therefore P(m) = 1/2 for all integers m > 2

Let $P(n)$ denote the probability of the last passenger getting his seat if we begin with $n$ passengers.

Consider the simple case for just $2$ seats:

$P(2) = \frac12$ (first boarder picks his own seat with 1/2 probability)

For $n$ seats: (i) With $\frac1n$ probability, the passenger picks the seat of the first passenger, the n'th seat from the end (in which case the last passenger would definitely get his seat). (ii) With 1/n probability, the current passenger picks the seat of the last passenger, first seat from the end (and now, the last passenger can definitely not get his own seat). (iii) Otherwise, the passenger picks some other seat (say #i from the end) among the n-2 remaining seats (with probability 1/n), continuing the dilemma. The problem now reduces to the initial problem with i seats.

Therefore, $$ P(n) = \frac1n \times 1 + \frac1n \times 0 + \frac1n\sum_{i=2}^{n-1} P(i) $$ or $$ nP(n) = 1 + \sum_{i=2}^{n-1} P(i).$$ So $$nP(n)-(n-1)P(n-1)=P(n-1)\implies P(n)=P(n-1),$$ and $P(n)=P(2) = \frac12, \,\forall n \ge 2$.

Source Link
Shashank
  • 221
  • 2
  • 2

Let P(n) denote the probability of the last passenger getting his seat if we begin with n passengers.

Consider the simple case for just 2 seats:

P(2) = 1/2 {first boarder picks his own seat with 1/2 probability}

For n seats: (i) With 1/n probability, the passenger picks the seat of the first passenger, the n'th seat from the end (in which case the last passenger would definitely get his seat). (ii) With 1/n probability, the current passenger picks the seat of the last passenger, first seat from the end (and now, the last passenger can definitely not get his own seat). (iii) Otherwise, the passenger picks some other seat (say #i from the end) among the n-2 remaining seats (with probability 1/n), continuing the dilemma. The problem now reduces to the initial problem with i seats.

Therefore, P(n) = (1/n * (1)) + (1/n * (0)) + Sum {(1/n) * P(i), 2 < i < n};

            = 1/n + 1/n {Sum P(i), 2 < i < n }    --(1)

Similarly,((n-1)/n)P(n-1) = 1/n + 1/n Sum { P(i) , 2 < i < n-1 }

                      = [ 1/n + 1/n Sum { P(i) , 2 < i < n } ] - 1/n P(n-1) 

   => (n-1)/n P(n-1) = P(n) -1/n P(n-1)
   => P(n) = P(n-1)
   => P(m) = P(n-1) , for all integers m > n-1

Since P(2) = 1/2, Therefore P(m) = 1/2 for all integers m > 2