CMPSCI 240: Reasoning About Uncertainty
David Mix Barrington
Fall, 2009
Homework Assignment #3
Posted Sunday 4 October 2009
Due on paper in class, Tuesday 13 October 2009 (Monday schedule)
There are eight questions for 50 total points plus 10 extra credit. All but one are from the textbook, Mathematical Foundation for Computer Science. Note that the book has both Exercises and Problems -- make sure you are doing a Problem and not the Exercise with the same number. The number in parentheses following each problem is its individual point value.
Students are responsible for understanding and following the academic honesty policies indicated on this page.
- Problem 10.1.2 (5)
- Problem 10.1.3 (10)
- Problem 10.1.4 part (c) (5)
- Problem 10.2.3 (5) Your code need not compile, but trying to compile it might help you get it right. Assume that your code will interact with an AtBatIterator object that has a boolean hasNext() method to say whether another at-bat is coming, and an int next() method that gives you the number of bases (1, 2, 3, 4) in the next at-bat, with 0 for an out. (It used to say "and -1 for a walk" here as well, that was a mistake. By the way, you can let the
AtBatIterator be an argument to your method or methods.)
- Problem 10.3.4 (10)
- Problem 10.3.5 part (a) (10)
- Problem 10.5.1 (5)
- Problem X-1 (10 extra credit): We've seen that when you throw two fair, independent six-sided dice, the eleven possible values from 2 through 12 are not equally likely. Suppose we have two unfair independent dice, where die 1 has 1 with probability p1, 2 with probability p2, and so on through p6, and die 2 has 1 with probability q1, 2 with q2, and so on through q6. Is is possible to assign values of p1, p2,..., p6, q1, q2, ... q6 so that each value of the sum from 2 through 12 is equally likely? Either give such values or prove that this is impossible.
Last modified 8 October 2009