§3.1, p.12 — gamma sojourn laws and the fork-join CDF
ProvedForkJoinDelay.sec_3_1_fj_cdffork-joinlaplace-stieltjes-transformp2o-gran-per-chapterp2o-plan-paperp2o-v1queueingstochastic-systems
Let and be the service times at UFJ and LFJ: measurable, mutually independent, exponential with rates . A tagged customer arriving at UFJ (LFJ) and finding () customers there, , has sojourn time (). Then:
- and (shape, rate);
- for every , ;
- and ;
- hence
- the same product is the distribution function of under , the law in the boundary transform .
This identifies the boundary transform of (5) and gives the distribution function used to compute it.
Differences from the source:
- encoding: (S1|h1 = x), (S2|h2 = y): sojourn times given the station contents at the tagged customer's arrival → S1 = U0 + ⋯ + U(x−1), S2 = G0 + ⋯ + G(y−1) with independent exponential services; reason: the page's own description: 'the sum of x (y) service durations, each exponentially distributed'
- reading: service 'rates' µ1, µ2 → 0 < µ1, µ2; reason: a rate of an exponential law is positive
- reading: F_{SFJ|x,y}(t) for t (range not stated) → t ≥ 0; reason: the sojourn time is nonnegative; for t < 0 the distribution function is 0 and the printed formula is not meant there
- encoding: Gamma(x, µ1) → gammaMeasure (x : ℝ) µ1 (shape, rate); reason: Mathlib's parametrization is shape and rate, mean x/µ1, matching a sum of x Exp(µ1) terms
- encoding: probabilities P(·) → (P A).toReal for the ENNReal-valued measure; reason: P is a probability measure, so the value is finite; same number
Preamble
import Mathlib open MeasureTheory ProbabilityTheory
Formal statement
namespace ForkJoinDelay
/-- **The fork-join sojourn law at the boundary: gamma laws and the CDF display of §3.1.**
Carmeli, Yom-Tov, Boxma, *State-Dependent Estimation of Delay Distributions in Fork-Join
Networks*, author manuscript, §3.1, p.12: "The sojourn time of a tagged customer arriving at
the UFJ (LFJ) station and finding x − 1 (y − 1) customers there will be the sum of x (y) service
durations, each exponentially distributed with rate µ1 (µ2). Therefore, (S1|h1 = x) ∼
Gamma(x,µ1), (S2|h2 = y) ∼ Gamma(y,µ2)", and the display
`F_{S_FJ|x,y}(t) = P(S₁ ≤ t) P(S₂ ≤ t) = (1 − Σ_{m=0}^{x−1} e^{−µ₁t}(µ₁t)^m/m!)(1 − Σ_{n=0}^{y−1} e^{−µ₂t}(µ₂t)^n/n!)`.
Let `U 0, U 1, …` and `G 0, G 1, …` be service times at UFJ and LFJ: measurable, mutually
independent (one family), exponential with rates `µ₁, µ₂ > 0`. For `x, y ≥ 1` put
`S₁ = U 0 + ⋯ + U (x−1)` and `S₂ = G 0 + ⋯ + G (y−1)` (the tagged customer finds `x − 1`,
resp. `y − 1`, customers ahead). Then
1. `S₁ ∼ Gamma(x, µ₁)` and `S₂ ∼ Gamma(y, µ₂)` (shape, rate);
2. for every `t ≥ 0`, `P(max(S₁,S₂) ≤ t) = P(S₁ ≤ t) P(S₂ ≤ t)`;
3. `P(S₁ ≤ t) = 1 − Σ_{m<x} e^{−µ₁t}(µ₁t)^m/m!` and `P(S₂ ≤ t) = 1 − Σ_{n<y} e^{−µ₂t}(µ₂t)^n/n!`;
4. `P(max(S₁,S₂) ≤ t)` equals the product of the two brackets;
5. the same product is the CDF of `max` under `Gamma(x,µ₁) ⊗ Gamma(y,µ₂)`, the law against which
`Z_{x,y}` (`boundaryLST`) integrates.
**Formalization Note.** The CDF formula is claimed for `t ≥ 0` (the sojourn time is
nonnegative; for `t < 0` both sides of the page's display are not meant). Mathlib's
`gammaMeasure a r` has shape `a` and rate `r`. -/
theorem sec_3_1_fj_cdf {Ω : Type*} [MeasurableSpace Ω] (P : Measure Ω)
(μ₁ μ₂ : ℝ) (hμ₁ : 0 < μ₁) (hμ₂ : 0 < μ₂) (U G : ℕ → Ω → ℝ)
(hU : ∀ n, Measurable (U n)) (hG : ∀ n, Measurable (G n))
(hind : iIndepFun (fun i : Fin 2 × ℕ => ![U, G] i.1 i.2) P)
(hlawU : ∀ n, P.map (U n) = expMeasure μ₁) (hlawG : ∀ n, P.map (G n) = expMeasure μ₂)
(x y : ℕ) (hx : 1 ≤ x) (hy : 1 ≤ y) (t : ℝ) (ht : 0 ≤ t) :
P.map (fun ω => ∑ i ∈ Finset.range x, U i ω) = gammaMeasure (x : ℝ) μ₁ ∧
P.map (fun ω => ∑ i ∈ Finset.range y, G i ω) = gammaMeasure (y : ℝ) μ₂ ∧
(P {ω | max (∑ i ∈ Finset.range x, U i ω) (∑ i ∈ Finset.range y, G i ω) ≤ t}).toReal =
(P {ω | ∑ i ∈ Finset.range x, U i ω ≤ t}).toReal *
(P {ω | ∑ i ∈ Finset.range y, G i ω ≤ t}).toReal ∧
(P {ω | ∑ i ∈ Finset.range x, U i ω ≤ t}).toReal =
1 - ∑ m ∈ Finset.range x, Real.exp (-(μ₁ * t)) * (μ₁ * t) ^ m / (m.factorial : ℝ) ∧
(P {ω | ∑ i ∈ Finset.range y, G i ω ≤ t}).toReal =
1 - ∑ n ∈ Finset.range y, Real.exp (-(μ₂ * t)) * (μ₂ * t) ^ n / (n.factorial : ℝ) ∧
(P {ω | max (∑ i ∈ Finset.range x, U i ω) (∑ i ∈ Finset.range y, G i ω) ≤ t}).toReal =
(1 - ∑ m ∈ Finset.range x, Real.exp (-(μ₁ * t)) * (μ₁ * t) ^ m / (m.factorial : ℝ)) *
(1 - ∑ n ∈ Finset.range y, Real.exp (-(μ₂ * t)) * (μ₂ * t) ^ n / (n.factorial : ℝ)) ∧
(((gammaMeasure (x : ℝ) μ₁).prod (gammaMeasure (y : ℝ) μ₂))
{p : ℝ × ℝ | max p.1 p.2 ≤ t}).toReal =
(1 - ∑ m ∈ Finset.range x, Real.exp (-(μ₁ * t)) * (μ₁ * t) ^ m / (m.factorial : ℝ)) *
(1 - ∑ n ∈ Finset.range y, Real.exp (-(μ₂ * t)) * (μ₂ * t) ^ n / (n.factorial : ℝ)) := by sorry
end ForkJoinDelay
Source
Carmeli, Yom-Tov, Boxma, State-Dependent Estimation of Delay Distributions in Fork-Join Networks, author manuscript (sha256 c8b2002d…9d1c), §3.1, p.12 (paragraph after Eq. (5) and the display for F_{SFJ|x,y}(t))
Human review
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.