Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Eq. (2.33) — the expected queue length L_q of the M/M/c queue

Proved
QueueingFundamentals.BirthDeath.mmc_queue_length

by mikedeng1 · Oct 3, 2026 · Mathlib 0df444a (Lean v4.33.1)

mmcp2o-batch-b23bp2o-gran-per-chapterp2o-plan-bookp2o-v1queueing

In the M/M/cM/M/cM/M/c queue with λ,μ>0\lambda, \mu > 0λ,μ>0, c≥1c \ge 1c≥1, r=λ/μr = \lambda/\mur=λ/μ and ρ=r/c<1\rho = r/c < 1ρ=r/c<1, let {pn}\{p_n\}{pn​} be the steady-state solution. Then the expected number waiting in queue,

Lq=∑n=c+1∞(n−c) pn,L_q = \sum_{n=c+1}^{\infty} (n - c)\,p_n,Lq​=n=c+1∑∞​(n−c)pn​,

is a convergent series with value

Lq=(rcρc!(1−ρ)2)p0.L_q = \Bigl(\frac{r^c \rho}{c!(1-\rho)^2}\Bigr) p_0.Lq​=(c!(1−ρ)2rcρ​)p0​.

Together with Little's formula this gives WqW_qWq​, WWW and LLL of the M/M/cM/M/cM/M/c queue, (2.34)–(2.36).

Formalization Note The statement asserts that the series converges to the displayed value (HasSum), so it cannot hold by a junk value of an infinite sum.

Preamble
import Mathlib
import Definitions.Def_QueueingFundamentals_BirthDeath_Balance
Formal statement
namespace QueueingFundamentals.BirthDeath

/-- Eq. (2.33), p.68. In the steady state of the `M/M/c` queue with `ρ = λ/(cμ) < 1`, the expected
queue length `L_q = ∑_{n=c+1}^{∞} (n − c) p_n` is finite and equals `(r^c ρ / (c!(1 − ρ)^2)) p_0`,
where `r = λ/μ`. -/
theorem mmc_queue_length (lam mu : ℝ) (c : ℕ) (r ρ : ℝ) (hlam : 0 < lam) (hmu : 0 < mu)
    (hc : 1 ≤ c) (hr : r = lam / mu) (hρ : ρ = r / c) (hρ1 : ρ < 1) (p : ℕ → ℝ)
    (hp : IsSteadyState (fun _ => lam) (mmcDeath mu c) p) :
    HasSum (fun n : ℕ => if c + 1 ≤ n then ((n : ℝ) - c) * p n else 0)
      (r ^ c * ρ / ((c.factorial : ℝ) * (1 - ρ) ^ 2) * p 0) := by sorry

end QueueingFundamentals.BirthDeath
Source
Gross, Shortle, Thompson & Harris, Fundamentals of Queueing Theory, 4th ed., Wiley 2008, DOI 10.1002/9781118625651, p.68, Eq. (2.33)
Human review
  • Endorsed by Shuze Chen · Oct 5, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 5, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me