Together, or Separate?

There are situations that just looking after ourselves isn’t enough. Let’s talk about moments we have to wait in a multi-server multi-line queue with somebody else, like going to cafeteria with friends, or waiting in the airport for security check with family. My favorite one is an endless waiting line I meet at the immigration and customs at the Chicago O’hare airport whenever I come back from the vacation.

Think about a queuing system with many identical servers. Each server has its own line. You can leave the system only after both of you and your friends finish service. People in front of you are smart enough to stand in the shortest line, so that every server has equal length of line at the moment of decision. You want to leave the system fast.

queue

Will you and your companion should stand together or separate? Tradeoff: If you stand in the same line, since the server have to service your friend first and then you after that, the expected time until you are served is certainly longer than standing separately. However, if you two choose the different line, one of you always have to wait meaninglessly until the other escapes too. I personally had to make a guess for this at least twice a year(in front of the immigration checkpoint as mentioned above). Therefore, this week’s posting looks like a good chance for me to borrow the power of a simple simulation. In each run, I compared the time until the service completion between two strategies -‘together’ VS ‘separate’, and choose the one with shorter time as the winner. After 10,000 run, I picked the strategy that won more.

First, exponential service time is assumed. The result is quite stimulating; if the length of line is longer than 3, it’s better to row in the same boat. If it’s shorter than 3, standing in the separate line saves your time. When the line length is 3, none was dominant. Another thing to note is that the parameter for the exponential distribution does not matter, since what’s important is the relative ratio between mean and variance.

queuegraphExponential service time assumption is attractive but not always true. I ran the same test with Weibull service time distributions with different scale parameter(l) and shape parameter(k) ratio. The result is shown on the right . The region over the threshold line is where ‘together’ strategy is dominant, and ‘separate’ strategy is better at the region below the line. I also did the same experiment for Normal distribution, and I observed that the threshold increased as the value of (mean/variance) get larger.

The conclusions are intuitive. (1) If the lines are long, stand together; go separate if lines are short. (2) The criteria of being ‘long’ or ‘short’ depends on system variability as well as service time distribution functional form. Given the same mean, the more variable the system is, the more likely it’s better to stand together.

I hope this shall work on the next flight!

Soovin

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s