4.1 _ Question about plane seat at King Kong
For question 1, each person chooses a random seat. The probability of any person sitting in a specified seat is the same. Therefore, the probability of the first passenger sitting in his seat is 1/N.
Question 2: the answer is related to the original seat number of King Kong. Remove the seats of King Kong and rename the passengers (according to the air ticket number) and the remaining seats in the order of the original size from 1. F (I, n) indicates the probability that the new I-th passenger will sit in his original seat in the new arrangement (n-1 passenger seats and the original seat of King Kong, among the N seats, if King Kong chooses his own seat or the selected seat is behind the I seat (n-I seats meet this condition ), then I will certainly be able to sit in the original seat. If the selected seat is in front of I, assuming J, then the J passenger will not sit in the seat of King Kong, otherwise, another person's seat will be snatched. Because his behavior is similar to that of King Kong, he can be treated as King Kong and the first J seats will be removed, the remaining seats and passengers are numbered again from 1 according to the original size. Then, the seat number of the first passenger is changed to I-J, and the total number of new seats is changed to n-J. Therefore, the formula is as follows:
UseG (I, n) indicates the probability that the first passenger will sit in his seat in the original arrangement. Assume that the seat number of King Kong is J.
If I <j, g (I, n) = f (I, n) = (n-I)/(n + 1-I ).
If I> J, g (I, n) = f (I-1, n) = (n + 1-I)/(n + 2-I ).
Similar question: "Joseph ring: N people, numbered 0 to n-1, in a circle, starting from 0, reporting from 1, all reporting to M columns, the next person continues reporting data starting from 1. Find the number of the last person ."
From: http://blog.csdn.net/flyinghearts/archive/2010/05/19/5605994.aspx