Skip to content
Tutorials Center
My learning

Topics

Lesson 36 of 38 · Projects and Practice

Practice Set: Finite Capacity, Variability and Priorities

Eight worked problems on M/M/1/K, Erlang B, machine repair, priority queues and the Pollaczek-Khinchine formula, with code that checks your answers.

The best way to learn queueing is to solve problems and then check them numerically. Below are eight problems drawn from the finite-capacity, priority and M/G/1 lessons. Try each on paper first. Then run the checker code to compare. Each checker is a calculator that applies the formulas, so you can also change the numbers and make your own variants.

Problems on finite capacity

Problem 1 (M/M/1/K). A clinic has one doctor and space for 3 patients in total (one in consultation, two waiting). Patients arrive at 5 per hour and a consultation averages 10 minutes (exponential). Find the blocking probability and the effective arrival rate.

Problem 2 (Erlang B). A small hotel switchboard gets 4 erlangs of offered traffic. How many lines are needed so that fewer than 2 percent of calls are blocked?

Problem 3 (machine repair). 5 machines each fail on average once every 8 hours. One repairer takes 2 hours per repair (exponential). Find the mean number of machines down and the throughput of repairs.

Python Check problems 1 to 3

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.

Problems on variability and priorities

Problem 4 (P-K). A single machine receives jobs at 6 per hour. Processing time has mean 6 minutes and standard deviation 3 minutes. Find the mean wait in the queue.

Problem 5 (variability). For the machine in Problem 4, what would the mean wait be if processing took exactly 6 minutes? By what factor does the wait fall?

Problem 6 (Kingman). A line has λ = 0.9 per minute, E[S] = 1 minute, ca² = 0.5 and cs² = 2. Estimate the mean wait with Kingman's formula.

Problem 7 (non-preemptive priority). Two classes arrive at λ_1 = 0.2 and λ_2 = 0.4 per minute. Service is exponential with mean 1 minute for both. Find the mean queue wait of each class when class 1 has non-preemptive priority.

Problem 8 (conservation). For Problem 7, verify ρ_1 W_1 + ρ_2 W_2 = ρ W0 / (1 - ρ).

Python Check problems 4 to 8

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.

Strategy notes

  • Write down the model first: which system, which rates, which time unit. Convert everything to the same unit (per hour or per minute) before substituting.
  • Check limiting cases: if cs² = 1 the P-K formula must give the M/M/1 answer; if K → ∞ the M/M/1/K results must approach M/M/1.
  • Little's Law is a free check: compute L and W separately and verify L = λ_eff W.
  • Sanity-check magnitudes: a priority class must wait less than FCFS, and the low class more.

After solving a problem on paper, change one number (for example, double the service variability) and predict the direction of the change before running the code. Predicting first is how intuition grows.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. In Problem 4 the service time has mean 6 min and standard deviation 3 min. What is cs²?

    cs² = (3/6)² = 0.25.
  2. 2. In a non-preemptive priority queue the high class waits

    Priority moves waiting from the high class to the low class.
  3. 3. Before substituting rates into a formula you should

    Mixing minutes and hours is a very common error in queueing problems.
  4. 4. As K grows, the M/M/1/K blocking probability for ρ < 1

    A larger buffer leaves less chance of finding the system full when ρ < 1.

Summary

  • Set up the model, unify units, apply the right formula, check with Little's Law and limiting cases.
  • Finite capacity: p_K blocking and λ_eff; Erlang B for loss systems; machine repair for finite sources.
  • Variability: P-K and Kingman; priority: Cobham's formula and the conservation law.

Next: Practice Set: Networks and Simulation