Will you get served before the bell if half your year reaches the canteen at once?
At a school canteen in Cork, the queue can look manageable until a whole class comes through the door. If pupils arrive in bursts, can you predict from the lunch total alone whether the queue will clear before the bell?
Think back to the queue graph. A count of waiting pupils helps you spot a busy spell. Over four minutes, four pupils could all arrive in the first minute, or one could arrive each minute. The total alone doesn't tell you how busy any one minute is.
Watch one minute go by. One pupil is already waiting. Four more join, so five are ready to be served. The counter can serve up to three pupils in a minute. It serves three, leaving two to carry into the next minute.
At the start of a minute, no one is waiting. Two pupils arrive during that step, and the counter can serve up to three. How many are served in this model? Pick an answer.
The number of pupils waiting is the state you carry from one minute to the next. To update it, add the new arrivals first. Then subtract the smaller of two numbers: how many pupils are ready and how many the counter can serve in that minute.
You can serve up to three pupils a minute. In minute one, two are already waiting and four join. Six are ready. Subtract the three you serve, leaving three. In minute two, nobody joins. All three waiting pupils are served, so the queue is empty.
Start with one pupil waiting. Five arrive in the first minute and one arrives in the second. You can serve up to two per minute, after counting arrivals. How many are waiting after the second minute? Pick an answer.
Suppose only one pupil is ready and the counter has room to serve three. If you subtract three automatically, your model says minus two pupils are waiting. That's impossible. Serve the one pupil who exists, and the queue ends at zero.
Treat each pupil as an agent who joins at the back. Serve from the front, up to capacity. When four join two already waiting and three are served, three are left. That backlog emerges from the individual rules. Record each pupil’s arrival and service times to compare how long they wait.
Describe the update in each one-minute step. Start both runs with two waiting and capacity three per minute. Replace four then zero arrivals with two then two, and rerun the same model. The first-minute queue falls from three to one. Both finish empty, so the final count hides that difference.