Answer:
The probability that 3 lights are on after the third person exited the room is 39/128
Step-by-step explanation:
In order for 6 switches to be on at the end, we need exactly 2 people turning on a switch and the other one turning one off. There are 3 possibilities:
- The first two persons turn the switch in and the last one turns it off
- The first and last person turn the switch in and the middle one tunrns it off
- The first person turns the switch off and the 2 remaining turn the switch in
Note that after turning off one switch one more switch will be available to be switched in and one less will be available to be switch off. The contrary happens when someone turns in a switch.
Lets calculate the probability for the first scenario. The probability for the first person to turn the switch in is 3/8, because there are 3 lights off. For the second person, there will be only 2 lights off, thus, the probability for him or her to turn the switch in is only 2/8, leaving only 1 light off and 7 on. The third person will have, as a consecuence, a probability of 7/8 to turn off one of the 7 switches. This gives us a probability of 3/8 * 2/8 * 7/8 = 21/256 for the first scenario.
For the second scenario we will have a probability of 3/8 for the first person, a probability of 6/8 for the second one (he has to turn a switch off this time), and a probability, again, of 3/8 for the third one, giving us a probability of 3/8*6/8*3/8 = 27/256 for the second scenario.
For the third scenario, the first person has to turn off the switch, and it has a probability of 5/8 of doing so. The second person will have 4 switches to turn on, so it has a probability of 4/8 = 1/2, and the third person will have one switch less, thus, a probability of 3/8 of turning a switch on. Therefore, the probability of the third scenario is 5/8*1/2*3/8 = 15/128 = 30/256
By summing all the three disjoint scenarios, the probability that six lights are on is 21/256+27/256+30/256 = 78/256 = 39/128.