Computer Science 174 - Fall 1998 - Sinclair - Final

Computer Science 174 - Fall 1998 - Sinclair - Final -...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
<!--cs174, final examination, fall/1998--> CS 174 Fall 98 Final Examination Read these instructions carefully 1. This is a closed book exam. Calculators are permitted. 2. This midterm consists of 14 questions. The first ten questions are multiple choice; the remaining four require written answers. 3. Answer the multiple choice questions by circling the correct answer (or the best answer if more than one is correct). You should be able to answer all of these from memory, by inspection, or with a very small calculation. Incorrect answers will attract a negative score, so if you do not know the answer do not guess. 4. Write you answers to the other questions in the spaces provided. None of these questions requires a long answer, so you should have enough space; if not, continue on the back of the page and state clearly that you have done so. Show all your working. 5. The questions vary in difficulty: if you get stuck on some part of a question, leave it and go on to the next one. 6. Good Luck! Problem #1 A multiple choice exam has six possible answers for each question, only one of which is correct. A correct answer receives 4 points, while an incorrect answer incurs a penalty of b points. If we wish to ensure that the expected score for a student who randomly guesses on every question is zero, we should set b to be 1/6 4/5 5/6 1 6/5 5 Problem #2 file:///C|/Documents%20and%20Settings/Jason%20Rafte. ..20Fall%201998%20-%20Sinclair%20-%20Final%20Exam.htm (1 of 9)1/27/2007 6:46:38 PM
Background image of page 1

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

View Full DocumentRight Arrow Icon
<!--cs174, final examination, fall/1998--> Each of the 50 states has two senators. A committee is chosen by selecting a set of 50 senators uniformly at random. (a) The probability that no senator from California is on the committee is 1/(2^50) 98!/100! C(98, 50)/100! (50!)/C(100, 50) C(98, 50)/C (100, 50) (98/100)^50 (b) The probability that the committe contains one senator from every state is (2^50)/C(100, 50) 1/C(100, 50) (50!)/C(100, 50) (2^50)/100! 1/(100!) 50!/100! Problem #3 (a) A coin with heads probability p is tossed n times. The expected number of heads is 1/ p n /2 np np (1 - p ) n/p (b) A run in a sequence of coin tosses is a maximal subsequence of either heads or tails. (Thus, for example, the sequence HHHTTHTHH contains five runs.) The expected number of runs in n tosses of a coin with heads probability p is n /2 np np (1 - p ) 2( n - 1) p (1 - p ) + 1 ( np )/(1 - p ) Problem #4 (a) There are n bins, and balls are thrown into them in sequence, independently and uniformly at random. The process stops when any three bins are occupied. The expected number of balls thrown is file:///C|/Documents%20and%20Settings/Jason%20Rafte. ..20Fall%201998%20-%20Sinclair%20-%20Final%20Exam.htm (2 of 9)1/27/2007 6:46:38 PM
Background image of page 2
<!--cs174, final examination, fall/1998--> 3 n /( n - 3) n [(1/ n ) + 1/ ( n - 1) + 1/ ( n - 2)] C( n , 3)/( n ^3) 3 n (b) Consider the same process as in part (a), but now we stop when the first three bins (i.e., bins 1, 2 and 3) are all occupied. The expected number of balls thrown is now
Background image of page 3

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

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 05/17/2009 for the course CS 174 taught by Professor Canny during the Spring '98 term at University of California, Berkeley.

Page1 / 9

Computer Science 174 - Fall 1998 - Sinclair - Final -...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online