A program consists of two modules executed sequentially. Let and respectively denote the probability density functions of time taken to execute the two modules. The probability density function of the overall time taken to execute the program is given by
View worked solution
Answer: C
Let and be the continuous random variables representing the execution times of the first and second modules, respectively. Let their probability density functions (PDFs) be and . Since execution times are non-negative, we have and for .
Since the two modules are executed sequentially, the total execution time of the program is the sum of the individual execution times:
Assuming the execution times of the two modules are independent, the PDF of the sum of two independent continuous random variables is given by the convolution of their individual PDFs:
We can simplify the limits of integration based on the non-negative nature of the execution times:
- Since for , the lower limit of integration becomes .
- Since for (which means ), the upper limit of integration becomes .
Substituting these limits, we get:
This matches Option C.
Free practice · Your answers on this page are not saved.
