Math 4741: Mathematical Analysis Quiz 1 Solution Math 4741: Mathematical Analysis - Quiz 1 Solution Problem Statement Summary Three people (A, B, C) enter a post office with two clerks. Two begin service immediately, and the third waits for a clerk to become free. Goal: Calculate the probability that customer A is the last person to leave the post office. — 1 Part 1: Deterministic Service Times Setup: • Service time for each clerk is exactly (nonrandom) T = 10 minutes. • First two people are selected randomly (with equal probability). Analysis: The set of people starting immediately, S , has three equally likely outcomes: { A, B } , { A, C } , { B, C } P ( S ) = 1 / 3 for each. Case A: A starts immediately ( S = { A, B } or S = { A, C } ) • Probability: P ( A starts) = 2 / 3. • At t = 10, A finishes service and leaves. The person waiting (C or B) immediately starts service. • The person waiting finishes at t = 10 + 10 = 20. • A leaves at t = 10, while the waiting person leaves at t = 20. A is not the last to leave. P ( A last | A starts) = 0 Case B: A waits ( S = { B, C } ) • Probability: P ( A waits) = 1 / 3. • At t = 10, B and C finish service and leave. A immediately starts service. • A finishes at t = 10 + 10 = 20. • A leaves at t = 20, while B and C left at t = 10. A is the last to leave. P ( A last | A waits) = 1 Result: P ( A is last) = P ( A waits) × P ( A last | A waits) = 1 3 × 1 = 1 3 1 Math 4741: Mathematical Analysis Quiz 1 Solution — 2 Part 2: Geometric Service Times Setup: • Service times X are Geometric with mean 1 /p P ( X = k ) = p (1 − p ) k − 1 • B and C start service immediately; A waits until B or C leaves. Analysis: A starts service when the first of B or C leaves, say at time Y = min( X B , X C ). Assume B leaves first. C remains in service. Let X ′ C be the remaining service time for C. Due to the Memoryless Property of the Geometric distribution, X ′ C ∼ Geometric( p ). A starts service with X A ∼ Geometric( p ). For A to be the last to leave, A must require more time than the remaining time for C: X A > X ′ C . Since X A and X ′ C are i.i.d., we compute P ( X A > X ′ C ): P ( X A > X ′ C ) = ∞ ∑ k =1 P ( X ′ C = k ) P ( X A > k ) = ∞ ∑ k =1 [ p (1 − p ) k − 1 ] · [ (1 − p ) k ] since P ( X A > k ) = (1 − p ) k = p (1 − p ) ∞ ∑ k =1 [ (1 − p ) 2 ] k − 1 This is a Geometric series ∑ ∞ m =0 r m = 1 1 − r where r = (1 − p ) 2 P ( X A > X ′ C ) = p (1 − p ) · 1 1 − (1 − p ) 2 = p (1 − p ) 1 − (1 − 2 p + p 2 ) = p (1 − p ) 2 p − p 2 = p (1 − p ) p (2 − p ) Result: P ( A is last) = 1-p 2 − p 2 Math 4741: Mathematical Analysis Quiz 1 Solution — 3 Part 3: Exponential Service Times Setup: • Service times X are Exponential with mean 1 /μ X ∼ Exp( μ ). • A and B start service immediately; C waits until A or B leaves. Analysis: Step 1: Who leaves first? A and B are in service. Due to symmetry of i.i.d. Exp( μ ) variables: P ( X A < X B ) = P ( X B < X A ) = 1 2 1. A leaves first ( X A < X B ): P = 1 / 2. A is gone, so A cannot be the last. P ( A last | X A < X B ) = 0. 2. B leaves first ( X B < X A ): P = 1 / 2. C takes B’s spot. A remains in service. Step 2: A vs. C (Given B left first) If B leaves first, A is still in service. Let R A be A’s remaining service time. Due to the Memoryless Property of the Exponential distribution, R A ∼ Exp( μ ). C starts service with X C ∼ Exp( μ ). For A to be the last to leave, R A must be greater than X C . Since R A and X C are i.i.d. continuous variables: P ( R A > X C | X B < X A ) = 1 2 Total Probability: P ( A is last) = P ( B leaves first) × P ( R A > X C | B leaves first) = 1 2 × 1 2 Result: P ( A is last) = 1 4 3