Computer Science 70 - Fall 2001 - Wagner - Midterm 2

Computer Science 70 - Fall 2001 - Wagner - Midterm 2 -...

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

View Full Document Right Arrow Icon
cs70, midterm 2, fall 2001 file:///C:/Documents%20and%20Settings/Jason%20Raftery/Desktop/R. .. 1 of 3 5/12/2006 8:42 PM cs70, fall 2001 midterm 2 professor wagner Problem #1 (18 pts.) Short-answer questions In each of the following, no justification is required. However, if you give a brief explanation of your answer, we may assign partial credit based on your explanation (if your answer is incorrect), and we reserve the right to deduce points for an incorrect explanation (even if your answer is correct). (a) [4 pts.] Alice flips a fair coin n times in a row. What is the probability that she receives exactly i heads? (b) [4 pts.] E and F are events. Also, Pr[E] = 0.2 and Pr[F] = 0.3. What is the smallest value that Pr[E union F] could possibly be? What is the largest it could be? (c) [5 pts.] How many 2001-bit strings are there that do not contain 01 anywhere as a substring? (d) [5 pts.] Let n range over the positive integers such that n = 11 (mod 12), and define z = (n+1)/2. For which n is z invertible modulo n? Problem #2 (12 pts.) Digit sums Consider the following transformation applied to a natural number n: we write n in decimal, cube each of the digits of n, add them up, and call the results f(n). This defines a function f:
Background image of page 1

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

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

This note was uploaded on 09/26/2009 for the course CS 70 taught by Professor Papadimitrou during the Fall '08 term at University of California, Berkeley.

Page1 / 3

Computer Science 70 - Fall 2001 - Wagner - Midterm 2 -...

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

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