18. The Absent-Minded Scientist on the Bus (4 p. 6-11). In the bus, there are $n$ seats, and all tickets have been sold to $n$ passengers. The first to enter the bus is the Absent-Minded Scientist, who, without looking at the ticket, takes the first available seat. Subsequently, passengers enter one by one. If an entering passenger sees that their seat is free, they take their seat. If the seat is occupied, the entering passenger takes the first available free seat. Find the probability that the last passenger to enter will take the seat according to their ticket?
Solution. First method. Let's number all passengers, starting with the Scientist, in the order in which they entered the bus. The last passenger has the number $n$. For simplicity, let's number the seats in the same way. Suppose all passengers except the last one have already entered and taken their seats. There is one free seat left. If this were the second seat, the second passenger would have already taken it. Similarly, if this were a seat with one of the numbers $3,4,5, \ldots n-1$, it would already be occupied. However, this seat is free. Therefore, this seat must belong either to the last passenger or to the Absent-Minded Scientist.

Thus, everything depends on who the last seat belongs to. It is clear that it can belong to the first or the last passenger with equal probability. In the first case, the last passenger will not sit in their own seat, and in the second case, they will. Therefore, the probabilities of both events are $\frac{1}{2}$.

Second method. We will use the method of mathematical induction.