In response to Greg: single queues may be ‘optimal’, but perhaps not from a customer service point of view:

In a multiple queue situation… if a customer has a strong objection to queueing then they can expertly choose a queue to minimise their queueing time – probably managing to decrease their time compared to the ‘optimal’ case (to the cost of other customers who don’t express such a strong preference) or, at least gaining the illusion of choice.

]]>SMY, you make a good point about the person who is forgetful and is in the shop wasting people’s time buying a single bottle of milk. But this is an extreme case, and in the general optimisation question we also want to worry about the people in the middle, buying closer to ‘average’ amounts.

For example, suppose the shop is a fruit shop and therefore anything you buy there lasts only a week. So even if everybody were well-organised and bought all the fruit they need for a week, there would still be those who are single and therefore buying apples for one, whereas a family-man might be buying bananas for six.

Should we punish the single person? Seems unfair.

Also, the question wasn’t ruling out a notion of memory. So maybe these one-plum time-wasters can skip the queue the first time, but the more often they buy small amounts, then the less queue-skipping privileges they get.

That’s what I like about these real-world questions – not constrained by a mathematical model (i.e. “optimise this function”) you can think what other devices (in my idea, memory) you can use to solve the problem. It encourages creativity.

]]>Basic psychology:

Humans value fairness in social interaction much more highly than the value time and money. People will go to great financial, temporal and emotional expense to punish someone who they perceive as unfair. So, the idea that it is enough to optimise for time and money without looking into behavioural psychology and local customs is naive.

This is different with other superficially similar problems (like multiple queues) who don’t have this problem that someone actually jumps ahead.

If I buy a lot, I might let people with few things jump ahead, but I will most certainly not do that if they think that they are entitled to it and jump first, ask second. I don’t think that I am alone with this approach.

Other issues:

It is not evident at all that someone who just buys milk *should* jump ahead in a system that optimises ressources for everyone. Not only is he generating less revenue than other customers, he is wasting everyone’s ressources: He is using up the time and place in the shop and his own time in a much more inefficient way than the customers who buy their groceries in one go instead of ten.

It’s hard to see why there is a general interest in encouraging inefficient or forgetful shopping habits by making the waiting time longer for the more efficient customers.

It’s strange to accept that buying 10 toilet paper packages will be cheaper than 10 times one, but to expect that buying just one should give you a shorter waiting time.

A recent example from the United States: discussion of health care policy. Everybody wants affordable health insurance coverage, but relatively few people have seriously thought about the link between enforcing a large pool of insured people and the feasibility of requiring insurers to cover all applicants. The overwhelming framework for debate is from the viewpoint of the individual.

]]>This question splits into various parts, not all of them mathematical. For instance, the question of whether the life of a newborn is more worth saving than the life of a seventy-year-old is a difficult philosophical question. But one could eventually reach some notion of a utility function and argue that all marginal utilities should be the same. And one could discuss the question of whether there is any hope of using statistical methods to estimate the utility functions. And so on. (In general, there are many real-world problems that naturally lead to optimization problems in mathematics, which in turn provide a great motivation for calculus.)

]]>Since combinatorics and discrete problems are good to work through case-by-case, including a healthy introduction to symmetry arguments would be great to reduce the number of cases in problems. These could be started with obvious questions like why things balance, and move on to tilings, and then to permutations. The final algebraic manipulations might be too tough for many early students, but relating good examples of symmetry back into commutativity would be a huge step foreward.

]]>Firstly, I do not agree that it is obvious that the person with just one item should have a right to skip the queue. People who buy their needs in doses of single items create much more waiting time for the other clients and work for the cashiers, and generate less revenue for the shop, not to mention that the people with the many items are usually parents who normally have less time than the single buyer picking up a pre-cooked meal. If a teacher had forced me to model according to silent assumptions on societal goals that I did not share, my resistance would have been quite great. (Of course, the same would be true for a model which “naturally” privileged parents without discussion.)

Secondly, it supposes that people react rationally. I suggest the book “Predictably irrational” by Dan Ariely on this topic.

Example from the book: In an Israeli pre-school children were sometimes picked up late, so they introduced a token late fee. Result: Parents came late more often, because now they were paying it, so it was socially ok. When they cancelled the late fee, people continued to come late at the higher level.

Mathematical models for human interaction are rarely based on hard data on actual behaviour, but on the cute assumption that people have fixed money values attached to everything (their time, pain, food) and rationally calculate the optimum. Since most humans have an intuitive understanding of human interaction they come away with the impression that “mathematics does not work”, even though, it is the rational model that does not work, but somehow I do not expect the curriculum designers to do better than current average “economics experts”.

Nice post. Two comments:

First, these questions are not typical questions in pure mathematics.

Second, the point that mathematics is connected to the everyday life should not be taken to extreme.

In the following I will try to explain these two points.

I think that many of these kind of questions are not, strictly speaking, pure math questions, but rather question from social sciences, computer science, and engineering. (I personally prefer CS to pure Math exactly because of this, i.e. it is much more connected to the everyday experience of human beings.) Some parts of applied Mathematics are connected to physics and other areas, but a pure mathematician, in my humble opinion, does something completely different. Maybe the original question starts with some connections to the daily life, but when it becomes a theory, the questions turn to things that no one can connect them easily with where came from. As an example, just look at the typical papers in combinatorics (, which is kind of famous as an area that solves questions they invent). Just to clarify, I am not saying this is bad, our ability in predicting which current topic will become a more useful theory in future is very limited so this freedom in pursue of pure theoretical questions is completely justified in my opinion (although I should say that I think some do misuse this freedom.)

Lets return to your question about how to assign resources. I don’t know any pure mathematical paper about this, but there are tones of papers in CS (scheduling, algorithmic game theory, …) and Economics on this.

I think that a person who is not ready to spend her life in pursue of these kind of pure theoretical questions (as a kind of search for truth in the Platonic world of mathematics) would suffer as a pure Mathematician; using applications and questions from daily life to interest young people in Mathematics is good, but it should not go as far as giving them the feeling that this is what pure Mathematics is about.

]]>She waved me ahead of her and I smiled and told her thank you. ðŸ™‚

Mathematically, I suppose I would change my approach to thinking about this problem in the following way.

Instead of having a ‘queue-marshall’ robot-type system that evaluates every person and places them in the correct order, we simply let the person further ahead in the line choose whether to let the person behind them move up in the queue.

People with a lot of other shoppers in front of them would be less inclined to let people ahead, or those that have waited a long time.

And people with big loads who have not been waiting long would be inclined to let people with less ahead of them.

(Given some reasonable expression of the problem, which is sadly beyond me as a biology student)

]]>There are numerous existing QoS implementations that try to address this exact problem in a networking context.

How do you prevent queue starvation and apply proper prioritization when each packet ‘thinks’ that their payload is the most important?

All packets, er, shoppers would have to subject themselves to a ‘queue marshal’. Either a person or robot that ‘pre-evaluated’ all shoppers, then directed them to the proper queue based on content, urgency, complexity, shopping club membership, time of day, perishability of merchandise, etc.

Would simply having IceCream in your cart allow you to jump the entire line?

]]>How much more is there? This could be a research problem for maths teachers. The psychologists have built out from Wason’s work in other directions; for example, it’s one of the results often cited by evolutionary psychologists such as Tooby and Cosmides. But there may be a serious maths direction too!

]]>I don’t think the biggest problem with such a system is that it would scare off customers who buy a lot, but that it would discourage the customers that are already in the shop from buying more. Today, you often buy things you don’t really need, or things you could have bought later somewhere else. But if you would have to wait a minute longer, (or worse: Have a 20% chance that you would have to wait 5 minutes longer) if you bought a few extra items, you probably wouldn’t. And the shop earns more and spent less extra time on a customer who buy a few things extra, than on a customer that only buy a pint of milk.

]]>Your learned objection makes sense. I should have mentioned that I assumed that there was only one store. Just like to make a few points for us to consider:

Assuming perfect competition and taking the analysis further in this two grocery store world, we may assume that the other store which sells milk at a higher price is able to do so since people are more inclined to buy from him (the price reflects convenience for shoppers).

Once the first store starts allowing customers to jump the queue, we can intuitively think of two consequences

1) big buyers are put off, translating to lower prices that the store may charge for the items they buy

2) the other store reduces its prices (whereas previously he could only charge higher prices because he was selling convenience in addition to milk)

As the other store reduces its milk prices (possibly to equality), allowing queue jumpers to jump for free would impose additional costs on existing “big” buyers. We cannot assume that this cost is negligible, since this cost is already quantified in the difference in milk prices (our assumption earlier). The key insight is that someone has to bear to cost of the queue inefficiency, and allowing queue jumpers merely transfers this cost to other people.

Store owners may foresee this and not allow queue jumping (which is the case in real life). A possible separating equilibrium could involve big customers shopping at the first store and smaller milk buyers shopping at the other store.

One theoretical solution would be for queue jumpers who want to jump the queue to compensate those in front. However this only works if they can figure out exactly how much they would have to pay beforehand. This does not work in real life. They then base their decision on whether the cost of waiting is more than the cost of paying off everyone in front. In a queue of n length, I’m not sure if we start from the end or from the start for this to be optimal. I would say from the start. What do you guys think?

]]>I take issue with your very first remark. Imagine the following extreme case. In the grocery shop there are regularly people who buy a lot and therefore take a long time in the queue — enough that if you want just a pint of milk there is a significant chance that you’ll take quite a long time buying it. And imagine that just next door there is another shop of a very different kind that happens to sell milk, though at a slightly higher price. If you knew that the keeper of the first shop allowed people to jump the queue if it was obvious that they would take only a few seconds, then you would be more inclined to go there, which would be in the interests of that shop, as long as they didn’t overdo it and put off their customers who bought a lot. So there are at least some circumstances where it could be in the interests of the shop to allow people to jump the queue.

]]>We have to note that the store keeper has no interest in serving you first, neither does anyone else.

1) Quantify the problem. People value their time differently, and we *may* use money as a proxy for the value people place on their time.

2) Figure out the best way for people who want to jump the queue to be able to compensate those in front of them. This is a operational / behavioural problem.

3) Figure out the optimal amount those who jump the queue should pay, given some constraints on how much would actually work in real life.

IMHO, this problem can be more readily classified as a problem in economics.

Economic theory would suggest that prices of “complex” items that take longer to scan, process etc, would already incorporate these additional costs. If this is not so, and the market doesn’t price that in, then we have to have someone step in to correct this mis-pricing. However, I don’t think this is that serious a problem, and society has invented a simpler solution long ago: politely asking if you may go first.

Great post on the teaching of mathematics, btw.

]]>There is a variation of the problem you raise that a colleague and I have been working on (and only partially solved):

Suppose you have 2 tasks for the performance of which a machine takes times A and B (where B > A) to perform. The machine is subject to random breakdowns; the time between breakdowns is governed by a distribution function F(x). If the machine breaks down in the middle of a task, the machine is returned to as-good-as-new condition in a fixed amount of time T and the interrupted task has to be restarted. Which sequence, AB or BA, minimizes the expected time taken by the machine to successfully complete both tasks?

An interesting variation is when the breakdowns are generated by a non-homogeneous Poisson process.

That seems more a problem on conventions, emotions, fairness, perception aso. than a mathematical problem.

]]>