
A single line to 3 cashiers is ~3x faster than a separate line for each cashier - blakehill
http://online.wsj.com/article/SB10001424052970204770404577082933921432686.html
======
pnathan
FYI: This is an example of the branch of mathematics called queueing theory.

<http://en.wikipedia.org/wiki/Queueing_theory>

It's a fascinating study requiring a good knowledge of probability to use
beyond the simplified models. It turns out from the math that throughput using
a single queue is better than using multiple queues.

~~~
rdtsc
Not trying to be condescending but doesn't it surprise anyone here that this
is _not_ obvious? At least on this site, there are still people doubting or
debating this.

So I am wondering why don't stores do this already. And I believe it is
because of perceptions. They understand that time will be saved, however, they
realize that most people will be scared by a long line.

One long line that moves fast will still appear terrible compared to a bunch
of small lines that crawl. Because people don't look long enough to estimate
the rate of movement. They see both lines as static (not moving).

~~~
philwelch
It's another instance of "people are stupid". Yes, for any educated person
it's obvious that one line is faster, that's the first thing about queueing
theory, but most people don't know the first thing about queueing theory.

Other instances of "people are stupid" leading to poor design:

* Some cars come with a CVT (continuously variable transmission) rather than having to shift gears. The audible pitch of the engine just gradually goes up as the accelerator is depressed, rather than revving up and then shifting back down again. Since people were used to the gear-shifting behavior, they thought CVT's were underpowered, so they were actually redesigned to simulate the shifting behavior even though it was suboptimal.

* Coinstar machines are actually much, much faster than they appear. But people don't trust them if they don't take three times as long and make jangly coin sounds, so it just silently sorts the coins as fast as it can and plays a recording of jangly coin sounds, all the while delaying when it displays the final count onscreen.

~~~
nik_0_0
Do you have a source for that Coinstar playing jangly coin sounds?? I would
love to read more about that.

~~~
philwelch
Well, this is embarrassing: I remembered that story from _somewhere_ , and it
turns out somewhere was another Hacker News thread:
<http://news.ycombinator.com/item?id=2007818>

------
dxbydt
scala> import
org.apache.commons.math.distribution.{ExponentialDistributionImpl=>expo}

//pc = process customer, with a mean time mu per customer

scala> def pc(mu:Int):Double= new expo(mu).sample

// q = queue of n customers with mean process time mu

scala> def q(n:Int,mu:Int):Double=(1 to n).map(_=>pc(mu)).sum

scala> // put 3000 people in 1 queue with mean process time 50

scala> (1 to 1000).map(_=>q(3000,50)).sum/1000

res43: Double = 83107.37275937156

scala> //now put 1000 people each in 3 separate queues with the same mean
process time as before

scala> (1 to 1000).map(_=>(1 to 3).par.map(_=>q(1000,50)).sum).sum/1000

res45: Double = 200010.29627921886

200010 = ~3x83107, so yeah, single line to 3 cashiers is ~3x faster than a
separate line for each cashier.

// Now make 1 queue that feeds into shortest of the 3 queues

scala> def qq(n:Int,mu:Int)=(1 to 3).par.map(_=>{(1 to
n/3).map(_=>pc(mu)).sum}).sum

scala> (1 to 10000).map(_=>qq(3000,50)).sum/10000

res70: Double = 141824.974765643

So our single queue feeding into 3 separate queues still beats 3 separate
independent queues.

edited to address MaysonL's question.

~~~
MaysonL
But of course this is BS, because the three queues are not independent. Try it
with 1 queue which feeds into whichever of the three queues is currently
shortest. And of course, in grocery stores, where one can unload one's cart
while the person ahead is being processed, there's an advantage to multiple
lines.

~~~
alsocasey
Isn't this essentially equivalent to having a single queue though... except
now you have a kind of cache at each register holding a small number of
customers?

~~~
gujk
Yes, and it is how real stores work, which is the point.

~~~
alsocasey
Right. I wonder what would happen if we try to include a measure of perceived
fairness from the customer's point of view into this type of analysis. I
always feel I'm picking the wrong queue at stores... single queues going to
whatever cash is open seem fairer, if that makes sense.

~~~
Someone
Perceived fairness is very hard to quantify objectively. Is it fair if there
are queues for people buying less than X items? If there are queues for people
not paying cash? For frequent flyers? That you, by sheer misfortune, end up in
the slow queue three times in a row? Should pensioners wait for people having
work to do? Should fit people make room for the elderly? To what extent? Etc.

Instead, I think you should do the math; it will teach you that the
probability that a given queue is slow is smaller than the probability that,
given a person in a queue, that person is in a slow queue.

So, you spend more time in slow queues than in fast ones. Once you know that,
train yourself to accept it.

------
Splines
A blend is probably a better choice.

It's obvious that single queues for each cashier isn't very efficient, but the
tradeoff is that lines are visibly shorter, and progress to the goal is clear.

Having a single line for all cashiers (ala Fry's Electronics or an airline
ticket agent) is more efficient, but the long line, logistics of finding the
next available cashier, and uncertainty of completion make for a frustrating
experience as well.

I posit that having N banks of 4-6 cashiers is a good balance between both.
You get the efficiency gains of not being blocked by a bottleneck, and you
also get visibly shorter lines and the benefits of estimating when you are
next (ok, looks like cashier 1 and 2 are almost done, I should be out of here
in a few minutes).

Someone here mentioned this kind of setup with self-checkout at grocery
stores, and I think it works well, as long as the number of self-checkout
stands in the "bunch" is not too large. There's a local grocery store where
there's 8 of them, and it's a little too chaotic (IMO, anyway).

~~~
tomkarlo
Having more than one line materially increases stress for shoppers, because
the choice implies they might be on the "wrong" line. So they worry more about
how fast they're moving, etc. If you only have one line, you can tell people
exactly how long the wait is (because the average transaction time is very
stable) and customers don't have to worry about making the right choice.

~~~
finnw
Having one combined line can increase stress for shoppers too, especially if
the line isn't clearly marked by barriers.

What happens is, another customer comes along, sees three cashiers and one
queue (in the middle) and decides to join the "empty queue" in front of the
cashier at either end.

Of course they know there's only one queue and that they are queue jumping,
but they calculate that they can _pretend_ they didn't know.

I assume there's a cultural factor here. I'm in the UK and have seen this many
times in one store nearby, but I imagine that in some parts of the world you
would be beaten or shot for it. I have never seen anybody complain about it,
they just temporarily disperse into three queues (which is awkward because
there is not really enough room.)

~~~
tomkarlo
This is why you really need a new store design. At Best Buy and Whole Foods
here, there's a long line that channels into a checkout area that's _only
reachable_ via that line. So there's now worry about cutting, and customers
naturally form the line as they follow the route into the checkout area.

It's worth noting that WF does use 2-3 lines in a lot of stores where they
don't have a long enough space. But then what they do is have a system that
signals which line gets to head a register next (and does so in a set
rotation), so it's effectively the same as a single long line.

------
nlawalker
Most of the grocery stores in my area have installed self-checkout systems
that are especially great if you just have a handful of items that all have
UPCs (no produce or bagged bulk), don't have any items requiring an age check
and possess at least the intelligence of a fifth grader.

I mention this not just because it's relevant to the idea of waiting in line
at a store, but because in every store where I've seen these systems
installed, the entire bank of scanners has a single line, unlike the rest of
the store. I imagine it's mostly because they place the self-check scanners so
close together (because they can) that it doesn't make sense to try to form
multiple lines, whereas a single queue system for the real checkers would take
up a huge amount of space.

~~~
smackfu
Around here, the grocery self-checkout works the same as the normal checkouts,
mainly because they just replaced the normal ones in place.

(Also, self-checkouts suck. I bet their throughput is terrible compared to
manned checkout lines. That teenage checkout girl is WAY better than I am at
scanning stuff.)

~~~
jff
Ah, but you see, anyone who writes checks (hellooooo, slowdown!) and anyone
who is scared of technology (I think the two groups overlap a lot) will go
wait in another line. So at least at my store, the self-checkout lanes have a
lot of young people buying one or two items and paying with credit cards,
which works out to a pretty good speed. Occasionally you get somebody who sits
and stares at each screen of instructions for a good 30 seconds, but in
general it moves well.

~~~
smackfu
I guess it depends on the quality of the self-checkout system. At my Stop &
Shop, there are four or six self-checkout lanes staffed by a single person (Go
go union job elimination!) If you get through a purchase without running into
"wait for attendant", sure it's fast. But if you do have to wait, because
their fundamental distrust of the customers makes the system get many false
positives for stealing, now you are in a secondary line of people waiting for
the attendant, and the time for checkout is terrible.

~~~
jff
Wow, that sucks. My local store only ever does "wait for assistance" when you
buy booze... and half the time the attendant will just gleefully press "ok" on
his terminal without even checking my ID, so it goes even faster :)

Implementation details matter, I guess. (Pretend I made some interesting
reference to Steve Jobs' managing style here)

~~~
finnw
In some stores if you scan alcohol the machine will freeze until the attendant
turns the key.

In others, it flashes a light to alert the attendant. It allows you to carry
on scanning, but the attendant must turn the key before you pay.

I just hope that isn't patented.

------
bryanh
An excellent video on the phenomenon from the "Engineer Guy" series:
<http://www.youtube.com/watch?v=F5Ri_HhziI0>

And just in case you feel like killing about 20 minutes of your day, check out
the rest of his videos. They are excellent.

~~~
missing_cipher
I love his videos. I wish he would make more. The harddrive one was
interesting.

------
joezydeco
The biggest queue problem I see in a large store is McDonald's.

In the early days, the food was all built asynchronously from the orders.
Cashiers would walk back and fill the order themselves from the bin full of
burgers and fries in pretty quick fashion and the customer would be on their
way.

When the whole "made as you go" approach was started, McDs decided to keep the
1:1 cashier-customer model (unlike Burger King or Wendy's, who do it 1:N
style).

So now you have customers ordering and standing around next to their cashier
waiting for the food to be made, which the cashier has no control over. The
order of filled requests is also somewhat random. If the kitchen is having
trouble, people start piling up by the counter.

I've noticed that some stores are experimenting with a numbering system that
is encouraging you to step back and watch a monitor for your order when it is
ready.

------
smackfu
Wouldn't it be 3x the velocity, but the line is 3x longer, so your total wait
time is the same? The article is mainly saying that people like moving faster,
but is that really a phenomenon?

~~~
hrabago
No, because the cashiers handling smaller transactions finish quicker and can
process more people. If you're stuck behind a guy which takes 2 minutes to
check out, people in other lanes will be in their cars before you even begin
checking out.

~~~
kenjackson
Here's a concrete example to make harabago's point clearer (since I think it
is a little tricky). Imagine 9 people in line. Each person takes 1m to
checkout except the first guy takes 10m. With three lines it looks like this
(these are their wait times before being serviced):

    
    
       0   0   0  (first person in each line has no wait time)
       10  1   1
       11  2   2
    

If you sum up the total wait times you get: 27m

Now do this with a single file line with three cashiers:

    
    
       0   (first three people have no wait time)
       0
       0
       1   (only two people get processed at a time now)
       1
       2
       2
       3
       3

What you see is that one guy basically blocked one of the cashiers for the
whole time, but the other two cashiers could continue to process. The total
wait time: 12m

Change the numbers and you can create different factors for which the single
file line is more efficient.

EDIT: Made a typo the first time on the wait times for the 3-line scenario.
The wait time is actually 27m, not 25m.

~~~
ScottBurson
The problem with your first example is that in real life the queues will
rebalance. The two people behind the first guy won't just stand there for 10
minutes with the other two checkouts empty; they'll switch lines.

If they do that, they'll each wait for 3 minutes, giving the same distribution
as in the single line.

Ah, you say, but what if other people have entered those lines already? Then
you have to count their wait times too, which will be shorter in the three-
line case than the one-line case.

Using one line doesn't reduce the mean wait time; it's always the number of
people waiting divided by the throughput. What it reduces is the _variance_ in
wait times, making the system more fair.

~~~
kenjackson
Sure, if the line perfectly rebalances then three lines is almost identical to
the single line.

BUT as I'm sure you know, it's sometimes hard to know when to move. Is it
after you've waited one minute, then hop to the back of another line?

Let me give you a concrete example: Imagine you enter a line with 15 people in
it. Your line moves 14 people through perfectly. You're next, but the guy in
front of you takes longer -- maybe he can't make up his mind about wanting
some bubble gum. Do you hop to the back of another line and wait 15 more
minutes (because the average queue length is 15m) or do you wait it out while
this guy in front of you goes? How long will this guy take? 1 more minute or
30 minutes?

And of course, once you hop to the back of another line, the guy from your
previous line finishes, and there's someone else in your new line who takes
forever. Then you're even more upset that you switched lines!! :-)

With a single line you remove the need for an oracle, which you need for the
n-line scenario.

~~~
philwelch
To add to your examples, there's also the case that you've already unloaded
your cart, but the idiot in front of you sends the cashier on a wild goose
chase to get cigarettes for him and they spend ten minutes sorting _that_ out.
Or you're behind some "extreme couponer" who splits their order into six
separate orders to maximize their coupon savings, and you have to resist the
urge to just pay for their entire order just to shame them into being less of
a goddamn miser.

~~~
Natsu
And then you CAN'T leave the slow line because there are people boxing you in
from behind, even though you chose this line because the guy ahead of you had
only one item... until he decided to make the cashier search the entire store
to make sure they were actually out of his favorite cigarettes.

------
digitalsushi
I was at a Home Depot this summer in the garden section, 2 checkouts. I was
straddling the middle, waiting for the next open lane. Some lady starts
bumping into me with a large cart, pushing her way up my right. I looked at
her with a frown, and she told me to pick a line. I told her I was 'next' and
she scoffed and went into the right lane, and was serviced more quickly (but
only randomly)

These little mental models of efficiency always make the nervous introvert in
me worry that I am wrong, or if society in general publishes people who try
something different.

The naive answer is to avoid retail interactions.

~~~
JonnieCache
The clever answer is to stop worrying about the loss/gain of an insignificant
couple of minutes and to use the time for introspection, problem solving,
daydreaming, or whatever else it is you like to do in the comfort of your own
skull. Although, for many here, that probably includes "worrying about
queueing theory" so maybe my point is moot.

------
smackfu
What I didn't see in this article is why retailers don't do this today. I see
a lot of positives listed and no negatives, so it seems like a no-brainer,
right? Yet the biggest retailers like Walmart and Target have tons of lanes,
and even do staggered front/back lanes which are terrible for the customers.
Is it because there are negative feelings to seeing a long line, and that
people do not expect it to be fast so they abandon their purchase?

~~~
ScottBurson
Some places do this. Fry's Electronics, for example. It works fine. Some
supermarkets I've been in do this for their express lines ("10 items or
less").

Oh, and airline ticket counters are routinely run this way.

~~~
r00fus
Add to this, Fry's also stacks the "wait line" area with lots of high-margin
low-cost goodies like candies and trinkets. I myself have succumbed to
grabbing some trail mix or a thumbdrive while waiting there.

------
JoshTriplett
It becomes even more obvious if you think of it like scheduling processes on a
CPU. Why needlessly set CPU affinity and only run on a single CPU when you
could just take the next available timeslice on any CPU?

~~~
jff
Except there are reasons for CPU affinity, such as the cache.

~~~
JoshTriplett
That doesn't mean every process should set affinity to a single CPU when it
first starts, particularly in a batch-processing run-to-completion system.

------
seiwyn
Okay, I am confused.

Assuming rebalancing, it seems to me that your wait time EV is the same either
way, with less variance in the single queue case. Thus the shopper throughput
should remain the same. Can someone explain to me if/why this is wrong?

Also, where did the HN title come from? I could not find that claim in the
article.

------
URSpider94
When I went out for fast food as a kid with my grandfather (an engineer), he
would send me and my brother and sister to each stand in one line. He would
then come over to join whomever got to the front first. That was my first
lesson in queueing theory ...

------
parfe
<http://en.wikipedia.org/wiki/Little%27s_law>

The author writes about a Little's Law

------
secoif
How many times have you been standing in a queue with the money in your hand,
wishing you could just drop the money and get out, who cares about change, you
just want to get the hell out of here.

This is my proposal for a "no change given" line.

You walk up, you plop down at least the amount of money that the items are
worth, they quickly scan the <5 items, check the money is at least as much as
the total, then you move on. You don't get change, you don't get a receipt,
they don't take cards. Just drop the money and run.

Good for business as they would collect many extra $$ from impatient shoppers,
and good for shoppers who are impatient. All-round good.

------
trustfundbaby
It also has an engineering analogy in Apache Passenger Global queuing. And
this article explains why it works the way it does
[http://blog.phusion.nl/2008/10/29/phusion-passenger-now-
with...](http://blog.phusion.nl/2008/10/29/phusion-passenger-now-with-global-
queuing/)

As an aside: The Fry's Electronics store in my city does this and the line
does move at a pretty brisk pace, but I had always thought it a rather odd
setup till I read this and made the connection to global queuing in Passenger.
fascinating.

~~~
tlrobinson
The Fry's system also gives them a 1/4 mile (ok maybe that's an exaggeration)
of opportunity to sell you impulse purchases.

------
xtacy
There's interesting work on queuing theory. In practice, each shopper picks
the queue that she thinks is least loaded. How many queue lengths do you need
to sample? It turns out that if you sample just two queue lengths, you get a
huge benefit (in terms of reducing the avg queue length), but not so much if
you sample more.

See "Power of two random choices":
[http://www.eecs.harvard.edu/~michaelm/postscripts/handbook20...](http://www.eecs.harvard.edu/~michaelm/postscripts/handbook2001.pdf)

EDIT: link

------
ck2
It's not a matter of logic.

When there is one cashier and a dozen customers waiting, that tells me the
store is too cheap or too mismanaged to have other cashiers scheduled.

The best thing a store can do for customer relations is to open additional
registers when too many customers are waiting, it implies the customer's time
is important.

I also enjoy discovering it was the store manager themselves running the extra
register - it means they stay in touch with how things are done (and how hard
the cashiers have to work).

~~~
philwelch
Yes, but that's not the point. How do you allocate the extra cashiers? Do they
just take customers one by one from the existing queue, or do they split the
queue awkwardly and encourage customers to form additional queues?

~~~
gujk
Parent point is that once you have a nontrivial queue, very already lost, so
it doesn't matter which style is faster.

------
e40
There are two Trader Joe's near me. One does a single line and the others have
one for each cashier. I never go to the one with multiple lines. I hate it.
The big, huge like that goes to the back of the store for the one with a
single line.... I love it. I moves fast and I don't need to worry about
picking a line. Even if it went just as fast as the other type, I'd prefer it,
but now there's reason to love it even more.

------
mikecsh
This always seems intuitive to me. You see a single queue feeding multiple
processors fairly often such as in banks and security queues at airports. They
seem "fairer" to me as you are not disadvantaged by picking the "wrong" queue
through a bad prediction. In a classic supermarket queuing scenario, you could
pick the shortest queue but find that the person in front is incredibly slow,
so the three people who came to checkout after you at other checkouts progress
through the process faster. This is first come, first served.

------
blakehill
So at least there's one thing that most big banks get right.

~~~
robflynn
I first encountered this in non-banks at Fry's Electronics over a decade ago.
It struck me as odd initially, but I quickly realized how much more efficient
it was and began to prefer it -- especially when I ended up stuck behind a 10
minute checkout in which the person insisted on paying with a cheque.

~~~
jff
It's really important at Fry's, when often as not you just get an empty box or
a piece of paper saying "Give this man a monitor" and they have to send
somebody out across the store to actually pick up your item. Or when you bring
out your government purchasing card and they don't believe it's real, so you
have to stand there for an hour while they try and figure it out (true story).

------
santimt
This is not new, search for "MM1 queue" and you will get a lot of
mathemathical results explaining why this effect happens. Is a study case of
queueing models.

------
finisterre
The article cites Apple's roving check out approach as an attempt to "solve
line issues". Isn't this close to the most inefficient way to organize the
checkout/queuing experience in terms of creating uncertainty and the need for
everyone (even their staff) to move around? I can see that it has a lot of
psychological value, though.

------
j_baker
_Another change: As soon as there are three or more people waiting in a line,
the retailer deploys "line busters," employees who scan items in shoppers'
carts before they reach the cashier, says Mr. Carey, who works closely with
the retailer's operations team on line speed._

This isn't really news. WalMart's been doing this forever.

------
tomkarlo
When I interviewed for a PM job, one of my full hours was spent being asked to
design a better checkout system for a grocery store, and show the math around
how many registers were needed to ensure a certain maximum wait on line. It
was definitely an interesting case study to use.

------
adamgravitis
The parallel vs serial queuing problem is very well established within the
operations research community.

And, IIRC, it's not that there's much impact to average performance, but
rather that the variation (sigma) drops by a factor of n.

------
dudurocha
I love studies like these. But I have a real problem trying to read it, the
screen was so crowded. Does anyone knows a firefox extension that gives me
only the text?

------
keithg
Back in 1989 as one of our projects in a data structures course, we solved
this problem and reached the same conclusions. We did it using Pascal!

~~~
SWengineer
There are other factors which aren't typically considered. The latency of
someone walking from the head of the single queue to the cashier each time
matters, especially if the person at the front isn't alert or is confused by
trying to figure out which till to go to. People are smart enough to pick
short queues to join and there is no latency. Also psychology, nobody wants to
join a long queue even if it moves fast, they go to another store.

------
mkramlich
More time efficient: avoid ever being in a queue. Think Amazon, or, in
meatspace go shopping at odd hours.

------
signa11
which is exactly how the queue design on the ck scheduler is, people == tasks
ofcourse...

------
buckwild
Remarkably similar in design to hyper-threading. Lol!

------
bluesmoon
any first year CS student who's done queueing theory knows that SQMS is more
efficient than MQMS and SQSS

