Вы находитесь на странице: 1из 1

Your Name:

Math 55 Quiz 8

August 2, 2012

You have 30 minutes to complete this quiz. You must show your work. Electronic devices, notes of any kind, and collaboration of any kind are forbidden. 1. (3 points) A bit string of length 4 is generated at random so that each of the 24 = 16 bit strings of length 4 is equally likely. Let E be the event that the bit string starts with a 0. Let F be the event that the bit string contains at least three consecutive 0s. Compute the probability that E or F occurs. F can happen in 3 ways: 0000, 0001, 1000. So |F | = 3. E can happen in 23 ways, as each of the bits after the rst bit can be 0 or 1. E F can happen in 2 ways: 0000, 0001. Therefore the probability that E or F occurs is P (E F ) = P (E ) + P (F ) P (E F ) =
8 16

3 16

2 16

9 16 .

2. (3 points) Suppose we roll a red die and a blue die. (Both are six-sided fair dice.) Suppose E is the event that the red die landed on 3. Suppose F is the event that the sum of the two numbers is 5. (a) What is the probability of E given F ? (b) Are E and F independent events? (a) F can happen in 10 ways: 1 + 1, 1 + 2, 2 + 1, 1 + 3, 3 + 1, 2 + 2, 1 + 4, 2 + 3, 3 + 2, 4 + 1. E F can happen in 2 ways: 3 + 1, 3 + 2. So P (E |F ) = P (E F )/P (F ) = (2/36)/(10/36) = 2/10 = 1/5 (b) We have P (E ) = 1/6. Since P (E )P (F ) = (1/6) (10/36) = 10/216 = 5/108 and P (E F ) = 2/36 = 1/18, we see that E and F are not independent, as 5/108 = 1/18. (Thanks to Eileen Li and Leanne Wu for catching an error.) 3. (a) (1 point) Suppose X and Y are nite sets such that |X | = m and |Y | = n. Explain why the number of functions from X to Y is nm . For each element of X , there are n elements that it can map to. Therefore by the product rule, there are n n n functions, where there are m factors in the product. Therefore the answer is nm . (b) (2 points) Suppose S = {s1 , s2 , s3 , s4 , s5 , s6 } is a set containing exactly 6 distinct elements and T = {t1 , t2 , t3 } is a set containing exactly 3 distinct elements. Using the principle of inclusionexclusion, nd the number of non-surjective functions S T . (Hint: Note that a function f : S T being non-surjective is equivalent to saying that t1 is not in the image of f , or t2 is not in the image of f , or t3 is not in the image of f .) Let Xi be the set of functions f where ti is not in the image of f . Then we see that |Xi | = 26 , and we see that |Xi Xj | = 16 = 1 for each pair of distinct i, j . (Note that Xi Xj consists of functions such that ti and tj are both not in the image of f .) And we have |X1 Xj Xk | = 0. Thus we have, by inclusionexclusion, that the number of non-surjective functions is 26 + 26 + 26 1 1 1 + 0 = 189. (c) (1 point) If we select a random function S T , what is the probability that it is surjective? The total number of such functions is 36 . So the probability of getting a non-surjective function is 189/36 . The 189 probability of getting a surjective function is 1 6 . 3

Вам также может понравиться