GATE / CS ARCHIVE

GATE CSE 2003 / QUESTION 60

Distribution of the sum of module runtimes

Engineering Mathematics & Other Topics · Probability & Statistics · Full GATE CSE 2003 paper

GATE 2003, Q60 2 marks · MCQ
Report issue

Probability & Statistics

Question 60, GATE 2003: A program executes two modules sequentially. Their execution times have probability densities f1(t),f2(t). Which expression gives the density of total execution time?
A. f1(t)+f2(t)
B. ∫[0,t] f1(x)f2(x) dx
C. ∫[0,t] f1(x)f2(t−x) dx
D. max{f1(t),f2(t)} [GateForum; GFG instead prints max{f1(t)+f2(t)}.]
The statement does not explicitly assert independence.
Tap to enlarge
Your answer
Answer & solution

Answer: C if the runtimes are independent; otherwise underdetermined (no official key was published)

1. Let T=T1+T2. A contribution to density near t with T1=x must have T2 near t−x, not x. Nonnegative runtimes restrict x to [0,t].
2. If T1,T2 are independent, their joint density is f1(x)f2(y). Integrating along x+y=t yields ∫[0,t]f1(x)f2(t−x)dx, C.
3. Marginal densities alone do not supply that product. For example, if both times are uniform on [0,1], independent times give a triangular sum density, whereas T2=T1 gives a uniform sum on [0,2]. Sequential execution permits either dependency.
4. Therefore C is conditional on independence; the literal problem is underdetermined. One cannot infer independence merely because the modules run one after another.

Solution: For independent nonnegative runtimes T₁,T₂, the density of T₁+T₂ is the convolution f(t)=∫₀ᵗ f₁(x)f₂(t−x) dx, option C. Sequential execution alone does not imply independence. In general the answer is ∫₀ᵗ f₁₂(x,t−x) dx using a joint density, when one exists, and marginal densities f₁,f₂ do not determine it. The same marginal distributions can give different sums under different dependencies, so C requires an extra independence assumption not stated in the paper.

Original paper, page 8