This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Illinois Institute of Technology Department of Computer Science Solutions to Second Examination CS 330 Discrete Structures Spring Semester, 2008 1. Coin Tossing We have a coin for which the probability of tossing heads is p , and the probability of tossing tails is 1 p . We toss the coin for n > 2 times. (a) What is the probability that there were no heads? This means that every toss must be tails; each toss has probability 1 p of tails, and all are independent events, so by the rule of product, the answer is (1 p ) n (b) What is the probability that there were at least one head? This means that we have the complimentary case of part (a), not all tails , so the answer is 1 (1 p ) n 1 . (c) What is the expected number of heads we will get? The expected number of heads in n tosses is the sum of the expected number of heads on each toss; that is, it is n times the expected number of heads on each toss, or np . 2. Recurrences Solve the following recurrences using annihilators, finding the general form of each solution. You do not need to solve the simultaneous linear equations that give the coefficients in the general form, but you must give those equations. (a) S (0) = 3 , S ( n ) = 2 S ( n 1) + 2, n ≥ 1. The annihilator is ( E 2)( E 1), so the solution is αa i + βb i . Using the initial conditions, S (0) = 3 = α 2 + β = α + β and S (1) = 8 = α 2 1 + β = α 2 + β , which gives α = 5, and β = 2....
View
Full
Document
This test prep was uploaded on 04/15/2008 for the course CS 330 taught by Professor Reingold,edwardm. during the Spring '08 term at Illinois Tech.
 Spring '08
 Reingold,EdwardM.
 Computer Science

Click to edit the document details