{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

ho4-solutions

ho4-solutions - CS237 Practice Problems Set 4 Basic...

This preview shows pages 1–3. Sign up to view the full content.

CS237. Practice Problems Set 4: Basic Probability. Graded Problems due Thurs Feb 17 11:59PM. February 20, 2011 Reading. Schaum’s Chapter 4. L&L Chapter 19-20. Optional Extra Practice. Any of the problems in Schaums’s Chapter 4. Mitzenmacher-Upfal problems 1.1-1.16. 1 Practice problems, ungraded Hint. Use tree diagrams where ever possible! Exercise 1. There are three caves in Boston. A wolf is looking for a home; he moves into cave 1 with probability 5 9 , cave 2 with probability 1 9 and cave 3 with probability 1 9 , and with the remaining probability he moves to San Diego. A goat moves into one of the unoccupied caves, choosing his cave with equal probability. These caves are in Boston, so it snows with probability 9 10 . The goat always leaves tracks in the snow, but the wolf does not (he’s clever and has learned how to cover his tracks). What is the probability that the wolf lives in cave 2 given that the there are no tracks in front of cave 1? Solution: Let W 1 , W 2 , W 3 and W S be the event that the wolf moves into caves 1, 2, 3 and San Diego respectively. Similarly, let G 1 , . . . , G 3 be the events that the goat moves into the caves 1 , 2 and 3 respectively. Let S be the event of snow, and ¯ S be the event of no snow. If there are no tracks in cave 1 (call this event A ), either the goat is not in cave 1, or it didn’t snow; so we can make a tree diagram to solve this (first step - wolf choose cave, second step - goat chooses cave, third step - it snows or not). Draw the tree, you’ll find the following: Pr[ A ] = Pr[ ¬ G 1 ¯ S ] = Pr[ W 1 ] + Pr[ W 2 G 3 ] + Pr[ W 2 G 1 ¯ S ] + Pr[ W 3 G 2 ] + Pr[ W 3 G 1 ¯ S ] + (Pr[ W 4 ] - Pr[ W 4 G 1 S ]) = 5 / 9 + (1 / 9)(1 / 2) + (1 / 9)(1 / 2)(1 / 10) + (1 / 9)(1 / 2) + (1 / 9)(1 / 2)(1 / 10) + (2 / 9 - (2 / 9)(1 / 3)(9 / 10)) Now, we want the probability that the wolf is in cave 2 given no tracks in front of cave 1. Let event B be the event that the wolf is in cave 2. We want Pr[ B | A ] = Pr[ A B ] Pr[ A ] We already worked out Pr[ A ] . Referring again to our tree, we see that event A B contains only the outcomes { W 2 G 1 ¯ S, W 2 G 3 ¯ S, W 2 G 3 S } , so it occurs with probability Pr[ A B ] = (1 / 9)(1 / 2)(1 / 10) + (1 / 9)(1 / 2)(9 / 10) + (1 / 9)(1 / 2)(1 / 10) We get the answer after plugging the numbers into our calculators. Exercise 2. Dirty Harry puts 2 bullets in a 6-cell cylinder of his revolver. He gives a cylinder a random spin and says “Feeling lucky”? He pulls the trigger. 1. What’s the probability that his victim gets shot? 1

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
2. Suppose his victim didn’t get shot, but now Harry pulls the trigger again (without giving the gun another random spin). What’s the probability that his victim gets shot the second time Harry pulls the trigger? 3. Now suppose you noticed that DH put the bullets one next to the other in the cylinder. How does this change the answer to the previous two questions? Solution: Let S 1 be probability of being shot the first time, and S 2 the probability of being shot the second time.
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 5

ho4-solutions - CS237 Practice Problems Set 4 Basic...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online