Consider the following program segment:
if B then
……repeat S1 until B1
else
……repeat S2 until B2
Assume that P(B = true) = p, P(B1 =true) = 3/5, and P(B2 = true) = 2/5.
Exactly one statement is common to statement groups S1 and S2. write (‘good day’).
After many repeated executions of the program segment, it has been estimated
that the probability of printing exactly three ‘good day’ messages is 3/25. Derive
the value of p.
Comments
Leave a comment