Beruflich Dokumente
Kultur Dokumente
A certain town comprises of 100 married couples. Everyone in the town lives by t
he following rule: If a husband cheats on his wife, the husband is executed as s
oon as his wife finds out about him. All the women in the town only gossip about
the husbands of other women. No woman ever tells another woman if her husband i
s cheating on her. So every woman in the town knows about all the cheating husb
ands in the town except her own. It can also be assumed that a husband remains s
ilent about his infidelity. One day, the mayor of the town announces to the whol
e town that there is at least 1 cheating husband in the town. What do you think
happens?
Answer:-
Stumped? Lets solve this methodically. Say there was only 1 cheating husband in
the town. There will be 99 women who know exactly who the cheater is. The 1 rem
aining woman, who is being cheated on, would have assumed there are no cheaters.
But now that the mayor has confirmed that there is at least one cheater, she re
alizes that her own husband must be cheating on her. So her husband gets execute
d on the day of the announcement.
Now lets assume there are 2 cheaters in the town. There will be 98 women in the
town who know who the 2 cheaters are. The 2 wives, who are being cheated on, wo
uld think that there is only 1 cheater in the town. Since neither of these 2 wo
men know that their husbands are cheaters, they both do not report their husband
s in on the day of the announcement. The next day, when the 2 women see that no
husband was executed, they realize that there could only be one explanation bo
th their husbands are cheaters. Thus, on the second day, 2 husbands are executed
.
Through induction, it can be proved that when this logic is applied to n cheatin
g husbands, they all die on the n th day after the mayors announcement.
Answer:-
This is one of the basic probability question asked in a software interview. Let
s start by creating an equation. Let x be the probability of a car passing the
intersection in a 5 minute window.
Probability of a car passing in a 20 minute window = 1 (probability of no car
passing in a 20 minute window)
Probability of a car passing in a 20 minute window = 1 (1 probability of a c
ar passing in a 5 minute window)^4
0.9 = 1 (1 x)^4
(1 x)^4 = 0.1
1 x = 10^(-0.25)
x = 1 10^(-0.25) = 0.4377