'Fair share': The mathematics of queueing

Sae Koyama

Suppose you have a company with seven parking spaces and fifteen employees. How do you allocate these parking spaces over the days of the week? How do you ensure that this allocation is fair?

This is related to a branch of mathematics known as queueing theory. Its applications are widespread; for example, making sure everyone in a cafeteria gets their lunch on time, or allowing computers to communicate. The real life queue is often very complex, with many variables that are hard to incorporate into a mathematical model. For example, human satisfaction is an important factor when deciding to implement fast lanes, while no such consideration is required between computers.

The simplest method of servicing a queue is a first come first serve queue. Each request is dealt with in the order that they come. This has several advantages. It’s easy to implement and ensures that all services are being used whenever they are required, with none left idle when a request is waiting. However this method has some obvious downsides when it comes to allocating parking spaces. It is biased against employees who aren’t available when the parking allocation starts and doesn’t take level of need into consideration.

Another possible allocation method is to distribute the time slots evenly across the employees. However this doesn’t take the level of need into prioritisation into account either. Perhaps employee A lives a bus stop away, while employee B is disabled and has difficulty using public transport. Clearly, employee B should have priority over employee A over parking allocation. So how can this be done?

Visitor.Express implements a fair use algorithm for its automated parking service. Parking requests received before the week before are given weight depending on several factors, including level of need and how many parking slots had already been allocated to this employee. Then the algorithm matches the requests with the parking slots. On the week, the method of service changes to a first come first serve. This mix of strategies has a number of benefits. Employees know whether they have a parking space with plenty of time beforehand, so they can prepare appropriately and the allocations are fair. However, if something should come up during the week and they require parking, they know if a space is available immediately. Moreover it is flexible. Weightings can be adjusted against different considerations. For example, if an employee must be guaranteed a parking slot, then they can be given an infinite (in practice, something like 10^5) weighting.

Increasingly, logistical systems are being automated. This allows us to process much bigger amount of data quickly and frees up time for organisers; at the end of the day, there are more important things to think about than parking spaces! It’s easy to think about automated being overly simplified; minimising some variable and taking the `human’ aspect out of organisation, but this isn’t the case. The best automated systems balance many real life factors and arrive at solutions innovatively.