The airplane problem (generative recursion)? -------------------------------------------- Passengers are lined up at the airport to board a full flight to Dallas. Each passenger is assigned a seat, and every passenger is planning to sit in his or her assigned seat. Except one: Joe is afraid of Texas Rangers, and he has been drinking so heavily that he can no longer grasp the concept of an assigned seat. Here's the procedure: - When Joe boards, he picks an unoccupied seat at random and sits in it. - When any other passenger boards, he or she sits in their assigned seat if it is available. If the assigned seat is already occupied, he or she picks an unoccupied seat at random and sits in it. They're traveling by the new SouthBlue discount carrier, and places in the boarding line are assigned at random. Write a program to answer the following question: - If there are $N$ total passengers, what is the probability that the last passenger gets his or her assigned seat? The chain problem (generative recursion) ---------------------------------------- A chain is composed of $N$ links, where $N$ is an even number at least $6$. - A link is chosen at random from somewhere in the middle of the chain (not at either end). That link is cut and thrown away, leaving two pieces of chain. - The larger of the two remaining pieces is cut at random in the same way. - What is the probability that the three pieces of chain can be fully extended to form a triangle?