Computer Science, asked by ramesh2025, 11 months ago

If a program p calls two subprograms p1 and p2 and p1 can fail 50% of the time and p2 can fail 40% of the time, what is the failure rate of program p

Answers

Answered by suskumari135
0

The failure rate of program p is \bf{70\%}

Explanation:

Program p fails only when either subprogram p1 fails or subprogram p2 fails such as failure of p1 + failure of p2.  

There is one case when both of the subprograms P1 and P2 fail at the same instant of time, given by failure of p1 \cap failure of p2.

Subprogram p1 failure rate is 50% thus Success rate of p1 is 50% time i.e 0.5

Subprogram p2 failure rate is 40% thus Success rate of p2 is 60% time i.e 0.6

According to probability,

failure of p1 + failure of p2 - (failure of p1 \cap failure of p2)

Hence, equation is p((p1 \cup p2))= p1+p2-(p1*p2)

=( \frac{50}{100} ) + ( \frac{40}{100}) - ( \frac{50}{100} \times \frac{40}{100})

= (\frac{90}{100}) - ( \frac {2000}{10000})

= ( \frac{70}{100})

=\bf{70\%}

Thus, the failure rate of program p is \bf{70\%}

Similar questions