We use the complementation principle. Clearly the 20 people can be seated in 20! ways without any restrictions. So, we now want to substract the possibility where the youngest(Y) and the oldest(O) are seated less than 3 seats appart. case1 - No seat in between - Now we can treat (OY) or (YO) as just a single person. Hence # such seatings is 19! *2 (for OY or YO ordering). Case 2 - 1 Seat in between. Now we observe that this duo can be seated in 18 ways - ie X^iOXYX^17-i ie some no of people on the left - can range from 0 to 17 no more. So, seat them in 18 ways, permute OY,YO in 2 ways(this will multiply) and then permute the 18 people in 18! ways - 2*18*18! Case 2 - 2 in between, similar analysis gives us that the left guy from O,Y can be seated in 17 ways - X^i O XX Y X^{16-i}. So i ranges from 0 to 16 ie 17 ways. ie 2* 17 * 18! So total possibilities = 20! - 2*18!(19 + 18 + 17) is the answer. The previous answer has ignored more than 3 chairs possibility. Message me if you have any doubts Solution We use the complementation principle. Clearly the 20 people can be seated in 20! ways without any restrictions. So, we now want to substract the possibility where the youngest(Y) and the oldest(O) are seated less than 3 seats appart. case1 - No seat in between - Now we can treat (OY) or (YO) as just a single person. Hence # such seatings is 19! *2 (for OY or YO ordering). Case 2 - 1 Seat in between. Now we observe that this duo can be seated in 18 ways - ie X^iOXYX^17-i ie some no of people on the left - can range from 0 to 17 no more. So, seat them in 18 ways, permute OY,YO in 2 ways(this will multiply) and then permute the 18 people in 18! ways - 2*18*18! Case 2 - 2 in between, similar analysis gives us that the left guy from O,Y can be seated in 17 ways - X^i O XX Y X^{16-i}. So i ranges from 0 to 16 ie 17 ways. ie 2* 17 * 18! So total possibilities = 20! - 2*18!(19 + 18 + 17) is the answer. The previous answer has ignored more than 3 chairs possibility. Message me if you have any doubts.