Skip to content
Tutorials Center
My learning

Topics

Lesson 16 of 38 ยท Multi-Server Queues

The Erlang C Formula

Learn the Erlang C formula for the probability that an arriving customer must wait in an M/M/c queue, and compute it stably with a recursion.

In a call center or a bank, the first question is: "What fraction of customers find every server busy and have to wait?" For the M/M/c queue the answer is the Erlang C formula, named after the Danish engineer Agner Krarup Erlang, who developed queueing theory for telephone exchanges in the early 20th century. It is the most used formula in staffing.

The formula

With c servers, offered load a = ฮป/ฮผ and ฯ = a/c < 1, the probability that an arrival must wait is

C(c, a) = [ a^c / (c! (1 - ฯ)) ] / [ ฮฃ_{k=0}^{c-1} a^k / k! + a^c / (c! (1 - ฯ)) ]

This is the probability that the system holds at least c customers, P(N โ‰ฅ c). Because arrivals are Poisson, an arriving customer sees the same distribution as an outside observer (PASTA), so it is also the probability an arrival waits. Mathematically, C = ฮฃ_{n โ‰ฅ c} Pn, and the geometric tail sums to the expression above.

Properties worth knowing:

  • For c = 1 it equals ฯ, the M/M/1 probability of waiting.
  • It increases with load a and decreases when you add servers at the same load.
  • It is a probability between 0 and 1, and it tends to 1 as ฯ โ†’ 1.

A numerically safe recursion

Evaluating a^c / c! for large c overflows. A stable method goes through the Erlang B formula B(c, a), the blocking probability of a system with no waiting room. It satisfies the recursion

B(0, a) = 1, B(k, a) = a B(k-1, a) / (k + a B(k-1, a))

and then

C(c, a) = B / (1 - ฯ (1 - B)) where ฯ = a/c.

(We will study Erlang B for its own sake in the finite-capacity chapter. Here it is only a computational device.)

Python Erlang C three ways

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The three methods agree. The last line shows why the recursion matters: 480^500 is far beyond the range of ordinary floating point numbers.

How adding servers helps

Fix the offered load a = 10 erlangs and vary the number of servers. At c = 11 the system is barely stable and nearly everyone waits. Each additional server cuts the waiting probability sharply.

Python Waiting probability against staffing

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

You can see that the probability of waiting falls quickly as servers are added, while utilization falls only slowly. A system running at ฯ = 0.9 with a large number of servers has a far smaller chance of waiting than the single-server M/M/1 system with ฯ = 0.9, where C = 0.9. That is economy of scale, a theme of the staffing lessons.

When using Erlang C with real data, estimate ฮป for short intervals (15 or 30 minutes), because call volumes change through the day, and the formula assumes constant rates.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. What does the Erlang C formula give?

    C(c, a) is the probability that an arrival finds all c servers busy and has to queue.
  2. 2. For c = 1, Erlang C equals which quantity?

    In M/M/1 an arrival waits exactly when the server is busy, with probability rho.
  3. 3. Why is the recursion through Erlang B useful?

    The recursion uses only numbers of moderate size, so it works for hundreds of servers.
  4. 4. Offered load stays fixed and servers are added. What happens to P(wait)?

    More servers means the chance that all are busy decreases.

Summary

  • C(c, a) = P(N โ‰ฅ c) is the probability that an arrival waits in an M/M/c queue.
  • It reduces to ฯ when c = 1.
  • Compute it stably with the Erlang B recursion and C = B / (1 - ฯ(1 - B)).
  • Adding servers at fixed load lowers it quickly.

Next: M/M/c Performance Measures