A Small Dice Game for the Kingman Formula

In a previous post I wrote about the relation between utilization, fluctuation, and waiting time, and its approximation by the Kingman formula. Let me show you a quick and easy dice game where we simulate a supermarket checkout to let participants experience the effect of utilization, fluctuation, and the (worse) combined effect of both.

Introduction

Supermarket Checkout
A typical supermarket checkout

Waiting time in front of a process is heavily influenced by two things: the utilization of a process (how busy is it?) and the fluctuations of the arrival and process times (how steady is the system – or not?). The Kingman equation and others show this nicely (check out my post The Kingman Formula – Variation, Utilization, and Lead Time for details on the equation).  As the utilization approaches 100%, the waiting time approaches infinity. As the fluctuations of the arrival and process times increase, so does the waiting time. This game will demonstrate this effect.

{  E(W) = \left ( \frac{p}{1-p} \right )\cdot \left ( \frac{ C_{a}^{2}+ C_{s}^{2} }{2} \right ) \cdot \mu_{s} }

Game Equipment

D4, D6, D8, D10, D12, and D20 dice

What you need are dice! Many-different-sided dice! If you grew up before the internet like me, then you may be familiar with dice that are different from the common six-sided dice D6 (Dungeons and Dragons anyone?).  In particular, you need three different types of dice – a small one (D4 or D6), a medium-sized one (D10 or D12), and a large one (D20 or D30).

Ideally you have one of each die for every player, but if you are short on dice you can have one die for every two players (we will make teams of two people shortly). It is best to have a large spread in the range of dice (i.e., using D4 as the smallest one and D30 as the largest one).

Blank Dice Game SheetThen you would need to print out the data sheets (one for every two players, plus maybe a few for backup). There is also an overview sheet, but you can also use a whiteboard, blackboard, or a flip chart for a quick sketch. More on  these below.

The game itself takes about one hour including some theory, and can handle a wide range of group sizes, although it does get cumbersome if you have more than thirty people.

The Game

You will create groups of two people, each simulating a supermarket checkout. One will determine the number of people arriving, the other the capacity of the checkout. They get one dice-game queue-length sheet as shown above. Each then gets a die, which will determine the number of customers arriving at the checkout and the number of customers processed at the checkout. They may have to share one die if you are short on dice. There will be six rounds in the game, and each round consists of twenty iterations. In the first three rounds we vary the utilization.

Varying Utilization

Round 1 – D4 with Offset 2: In the first round, each player gets a four-sided die. For the number of people arriving, we throw the die and add 13. For the capacity of the checkout, we also throw a die, but this time add 15.  Therefore the checkout has on average two more capacity than the number of people arriving. This information would also be the first three empty rows on the data sheet, where we write 4 (for the sides of the die),  13 (for the customer), and 15 (for the supplier). This could also be printed on the sheet, but I prefer to keep the players in the dark on the future rounds so that they can focus on the current round.

Both throw the die and add to determine the arrivals and capacity. If the capacity matches or exceeds the demand, the two players write a zero in the next cell below. If the arrivals exceed the capacity, the number of people waiting is noted down. These people waiting in the queue have to be processed in the next iteration. They repeat this for twenty iterations, always keeping track of the number of people waiting in line. Afterward they calculate the total and average queue length by summing up the twenty entries and dividing by 20. This is written in the last two rows of the sheet.

Dice Game Overview SheetThe results are added to an overview statistic for all teams. A blank sheet is shown here, which could be printed or simply drawn on a whiteboard, blackboard, or flip chart. You write down the average queue length for each team in round 1. In all likelihood there will be no queue, as the expected outcome is 0.07 people waiting in line with a standard deviation of 0.08 people.

Round 2 – D4 with Offset 1: The next round we reduce the offset. The arrivals keep on adding 13 to the die, but the checkout now adds 14 (instead of 15) to his throw. Therefore the first three rows of round 2 are 4, 15, and 13. Again they play for twenty iterations and then determine the average queue length. These results will be added to the overview statistics for all teams.

The expected outcome is now an average queue of 0.5 people with a standard deviation of 0.4 people, so there will be more people waiting in line.

Round 3 – D4 with Offset 0: The next round we eliminate the difference between the arrivals and checkouts. Both can add only 13 to their die throw. Now the queue starts to heat up. The expected outcome is an average queue length of 3.1 people with a standard deviation of 2.3 people.

Theory on Utilization

At this point, we should discuss with the participants what happened. By reducing the overcapacity per iteration from 2 to 1 to 0, we in effect increased the utilization of the checkout. When the checkout had on average two more capacity than the people arriving, he had in effect a utilization of 88.57%. With an offset of 1, the utilization was 93.945%. Without any offset, the utilization was 100%. In the long run, an utilization of 100% means a queue length of infinity, but since we did only twenty iterations, we did not get that far. The graphs shows the expected average outcomes with the standard deviations for a D4 with different offsets.

Varying Fluctuation

In the next two rounds, we vary the fluctuations while keeping the offset constant. This means the utilization will always be at 88.57%.

Round 4 – D12 with Offset 2: Now we use a twelve-sided die. The arrivals add 9 to his throw, and the checkout adds 11 to his throw. Again, after twenty iterations, we add the averages to the overview sheet. The expected outcome is an average queue length of 3.0 people, with a standard deviation of 2.4.

Round 5 – D30 with Offset 2: Finally, we get to use the thirty-sided die. To maintain the same utilization and offset, the arrivals add nothing to his die throw, while the checkout adds 2 to every die throw.  The expected outcome is an average queue length of 14.7 people, with a standard deviation of 11.0.

Theory on Fluctuation

D4 D12 D30 ChartBy changing the die from a D4 to a D12 to a D30 while keeping the average arrivals and checkout capacity constant, we in effect increased the fluctuation. The D4 +13 arrivals meant that the number of arrivals fluctuated between 14 and 17 with an average of 15.5. A D12 +9 keeps the same average of 15.5, but now with a fluctuation from 10 to 21. A D30 plus nothing again has the same average of 15.5, but this fluctuates now between 1 and 30.

Hence, we increased the utilization. Similar to the utilization, increasing the fluctuation also increased the average backlog as shown in the chart above.

Varying Utilization And Fluctuation

Example game data sheet

Round 6 – D30 with Offset 0: For the next round we increase both fluctuation and utilization. Both the arrivals and the checkout get a thirty-sided die, and neither gets to add anything to the die throw. Important: Before we do this round, ask the participants about their guess on how long the queue will be! In all likelihood they will probably add the two effects together and expect a queue length of around 18. However, what they do not (yet) know is that these effects are not additive but more multiplicative! Let’s do the sixth round.

The expected queue length is not 18, but 24.2 people, with a standard deviation of 17.6. Hence it is much bigger than expected. Emphasize that this is not additive but multiplicative as per the Kingman equation above.

Simulation of Expected Outcomes

Example results graph … the ceiling turned out to be too low …

For your convenience, here is a table of the expected outcomes for offsets 2, 1, and 0 and for dice from two sides (a coin flip) to thirty sides in steps of two based on two hundred games each. Naturally, I did this in Excel rather than throwing a die eighteen thousand times . Besides, I don’t have a twenty-six-sided die, which according to Wikipedia wouldn’t really be a good die anyway. In any case, here is the mean and the standard deviation of the queue length for different situations.

Mean Queue Length
Standard Deviation of Queue Length
DiceOffset 2Offset 1Offset 0Offset 2Offset 1Offset 0
20,000,001,210,000,000,88
40,070,493,070,080,422,28
60,471,354,800,391,113,59
81,012,895,800,792,994,03
101,883,867,701,503,355,48
122,985,3910,262,444,457,25
143,916,8311,713,335,757,90
165,497,3313,244,885,328,60
186,049,5614,624,937,4210,35
208,2211,9915,676,959,2611,83
229,8512,3319,178,239,1913,67
2410,9214,1920,519,3910,5614,30
2612,4416,9923,0210,9211,7016,17
2811,8918,6522,839,1313,4415,75
3014,7020,3624,1811,0214,4917,64

Different Dice

If you don’t have a thirty-sided die, you can also use a twenty-sided die. If your largest die has only twelve sides, then it may be difficult to see a good effect. The numbers added to the arrivals for different dice above would work for any die up to 30, but if you have smaller dice, you can also use smaller add-ons. The table below shows you the quantity to add to the arrivals for different dice depending on your largest die. The numbers in any row would also work for any smaller dice. The checkout has to add 2, 1, or 0 on top depending on your desired utilization.

DiceD4D6D8D10D12D20D30
Max D3013121110950
Max D20876540
Max D1243210

So, there it is, a quick and easy game with which you can demonstrate the effect on the backlog or waiting time of utilization and fluctuation, and the much-worse combined effect of utilization and fluctuation! I believe everybody can share that feeling if they are waiting at the supermarket checkout.

This game was inspired by the dice game in The Lean Games and Simulations Book by John Bicheno, which uses D6 to show the effect of utilization. I expanded this using different dice to also show the effect of fluctuation and the even-worse combined effect. Now, go out, throw a dice (not at your coworker, boss, or customer!), reduce fluctuation, get utilization under control, and organize your industry!

2 thoughts on “A Small Dice Game for the Kingman Formula

  1. Good morning, congratulations on the page, I am very happy with the information and the content it conveys.

    please a clarification, how do you calculate the average length of the queue and the standard deviation in each case of the simulation ?, is it due to queuing theory?

    Thank you very much

    Javier Ramirez

  2. Hi Javier, the mean and standard deviation is based on simulations (200 games). In the game itself of course you only have the data from your teams. E.g. if you have 10 people you have 5 teams of customer/checkout, and hence 5 simulations. The mean and standard deviation is in this post to give you an idea of what values to expect in these 5 simulations. Cheers, Chris.

Add a Comment