# sol11 - CS 70 Fall 2010 1(10 pts Discrete Mathematics and...

• Notes
• 11
• 100% (11) 11 out of 11 people found this document helpful

This preview shows pages 1–3. Sign up to view the full content.

CS 70 Discrete Mathematics and Probability Theory Fall 2010 Tse/Wagner Soln 11 1. (10 pts.) Machine Failures Two faulty machines, M 1 and M 2 , are repeatedly run synchronously in parallel (i.e., both machines execute one run, then both execute a second run, and so on). On each run, M 1 fails with probability p 1 and M 2 with probability p 2 , all failure events being independent. Let the random variable X 1 denote the number of runs until the first failure of M 1 , and X 2 denote the number of runs until the first failure of M 2 . Let X = min ( X 1 , X 2 ) denote the number of runs until the first failure of either machine. Compute the distribution of X . What is its expectation? Answer 1: Let’s compute the probability that neither machine fails, on any particular run. Since failures of the two machines are independent, Pr [ M 1 doesn’t fail M 2 doesn’t fail ] = Pr [ M 1 doesn’t fail ] × Pr [ M 2 doesn’t fail ] = ( 1 - p 1 )( 1 - p 2 ) . Therefore, the probability that at least one machine fails, on any particular run, is Pr [ either M 1 or M 2 fails (or both) ] = 1 - ( 1 - p 1 )( 1 - p 2 ) = p 1 + p 2 - p 1 p 2 . We repeatedly perform runs until one of the machines fail. Since failures of both machines at different runs are independent events, the number of runs until one of the machines fail is a geometric distribution with parameter p 1 + p 2 - p 1 p 2 : X Geom ( p 1 + p 2 - p 1 p 2 ) . By the formula in Lecture Note 15, E ( X ) = 1 p 1 + p 2 - p 1 p 2 . Alternatively, we could compute the probability that at least one machine fails, on any particular run, using inclusion-exclusion and independence: Pr [ either M 1 or M 2 fails (or both) ] = Pr [ M 1 fails ]+ Pr [ M 2 fails ] - Pr [ M 1 fails and M 2 fails ] = p 1 + p 2 - Pr [ M 1 fails ] × Pr [ M 2 fails ] = p 1 + p 2 - p 1 p 2 . The rest is as above. Answer 2: We have that X 1 Geom ( p 1 ) and X 2 Geom ( p 2 ) . Also, X 1 , X 2 are independent r.v.’s. We also use the following definition of the minimum: min ( x , y ) = ( x if x y ; y if x > y . Now, for all k ∈ { 1 , 2 ,... } , min ( X 1 , X 2 ) = k is equivalent to ( X 1 = k ) ( X 2 k ) or ( X 2 = k ) ( X 1 > k ) . CS 70, Fall 2010, Soln 11 1

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

Hence, Pr [ X = k ] = Pr [ min ( X 1 , X 2 ) = k ] = Pr [( X 1 = k ) ( X 2 k )]+ Pr [( X 2 = k ) ( X 1 > k )] = Pr [ X 1 = k ] · Pr [ X 2 k ]+ Pr [ X 2 = k ] · Pr [ X 1 > k ] since X 1 , X 2 are independent = [( 1 - p 1 ) k - 1 p 1 ]( 1 - p 2 ) k - 1 +[( 1 - p 2 ) k - 1 p 2 ]( 1 - p 1 ) k since X 1 , X 2 are geometric = (( 1 - p 1 )( 1 - p 2 )) k - 1 ( p 1 + p 2 ( 1 - p 1 )) = ( 1 - p 1 - p 2 + p 1 p 2 ) k - 1 ( p 1 + p 2 - p 1 p 2 ) . But this final expression is precisely the probability that a geometric r.v. with parameter p 1 + p 2 - p 1 p 2 takes the value k . Hence X Geom ( p 1 + p 2 - p 1 p 2 ) , and E ( X ) = 1 p 1 + p 2 - p 1 p 2 . An alternative, slightly cleaner approach is to work with the tail probabilities of the geometric distribution, rather than with the usual point probabilities as above. In other words, we can work with Pr [ X k ] rather than with Pr [ X = k ] ; clearly the values Pr [ X k ] specify the values Pr [ X = k ] since Pr [ X = k ] = Pr [ X k ] - Pr [ X ( k + 1 )] , so it suffices to calculate them instead. We then get the following argument: Pr [ X k ] = Pr [ min ( X 1 , X 2 ) k ] = Pr [( X 1 k ) ( X 2 k )] = Pr [ X 1 k ] · Pr [ X 2 k ] since X 1 , X 2 are independent = ( 1 - p 1 ) k - 1 ( 1 - p 2 ) k - 1 since X 1 , X 2
This is the end of the preview. Sign up to access the rest of the document.
• Spring '08
• Probability theory, soln

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern