20-CS-110-001 Introduction to Computer Science Fall 2010

Solution to Dashing Courtier Puzzle

 ```Pr(courtier gets married) = Pr(courtier gets married and he picks the doors with 2 tigers OR courtier gets married and he picks the doors with 1 tiger OR courtier gets married and he picks the doors with 0 tigers) = Pr(courtier gets married and he picks the doors with 2 tigers) + courtier gets married and he picks the doors with 1 tiger) + courtier gets married and he picks the doors with 0 tigers) Because the events separated by "OR" are mutually exclusive Pr(courtier gets married and he picks the doors with 2 tigers) = 0 Pr(courtier gets married and he picks the doors with 0 tigers) = Pr(courtier gets married given he picks the doors with 0 tigers)* Pr(courtier picks the doors with 0 tigers) = 1*(1/3) = 1/3 Pr(courtier gets married and he picks the doors with 1 tiger) = Pr(courtier gets married given he picks the doors with 1 tiger)* Pr(courtier picks the doors with 1 tiger) = (1/8)*(1/3) = 1/24 since Pr(courtier picks the doors with 1 tiger) = 1/3 Pr(courtier gets married given he picks the doors with 1 tiger) = Pr(courtier picks the door with the lady 3 times) = (1/2)^3 = 1/8 Hence Pr(courtier gets married) = 0 + 1/3 + 1/24 = 9/24 = 3/8 ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ Pr(courtier gets married given first two choices are ladies) = Pr(courtier gets married AND first two choices are ladies)/ Pr(first two choices are ladies) Pr(first two choices are ladies) = Pr(first two choices are ladies and chose 0 tigers) + Pr(first two choices are ladies and chose 1 tiger) = (1/3) + (1/3)*(1/4) = 5/12 Pr(courtier gets married AND first two choices are ladies) = Pr(courtier gets married) = 3/8 (from above) Hence Pr(courtier gets married given first two choices are ladies) = (3/8)/(5/12) = 36/40 = 9/10 ```