Computer programs are classified by the length of the source code and by the exe
ID: 2080889 • Letter: C
Question
Computer programs are classified by the length of the source code and by the execution time. Programs with more than 150 lines in the source code are big (B). Programs with lessthanorequalto 150 lines are little (L). Fast programs (F) run in less than 0.1 seconds. Slow programs (W) require at least 0.1 seconds. Monitor a program executed by a computer. Observe the length of the source code and the run time. The probability model for this experiment contains the following information: P[LF] = 0.5, P[BF] = 0.2, and P[BW] = 0.2. Please calculate the following probabilities: P[W] P[B] P[W Union B]Explanation / Answer
The experiment can have 4 possible outcomes for each code that was studies. A code could be at least one of (big and fast), (little and fast), (big and slow), and (little and slow). This is the sample space.
We know the probabilities of (little and fast), (big and fast), and (big and slow). Hence the probablity of (little and slow) is (1- 0.5-0.2-0.2), which is equal to 0.1.
1) The probability of any programme (big or little) being slow is P(LW)+P(BW) = 0.3
2) The probability of any programme (fast or slow) being big is P(BF)+P(BW)=0.4
3) The probability of any programme being at least one of slow and big is a union if the probabilities of all the events containing at least one of big or slow programmes. Hence, the required probability is 1- P(LF) = 0.5
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.