1.

When a programmer compiles her code there is a 95% chance of finding a bug every time. It takes three hours to rewrite her code when she finds out a bug. Determine the probability such that she will finish her coding by the end of her workday. (Assume, a workday is 7 hours)(a) 0.065(b) 0.344(c) 0.2(d) 3.13The question was posed to me during an interview.I'd like to ask this question from Counting topic in portion Counting of Discrete Mathematics

Answer»

Correct answer is (c) 0.2

For EXPLANATION I would say: A success is a bug-free COMPILATION, and a failure is the finding out of a bug. The PROGRAMMER has 0, 1, 2, or 3 failures and so her probability of FINISHING the program is :Pr(X=0) + Pr(X=1) + Pr(X=2) + Pr(X=3) = (0.95)^0(0.05) + (0.95)^0(0.05) + (0.95)^0(0.05) + (0.95)^0(0.05) = 0.2.



Discussion

No Comment Found

Related InterviewSolutions