Lunch Time Problem

Problem Statement

During lunch time, a restaurant has N seats which can serve at most N customers simultaneously. Assume there are M customers i=1..M and each take exactly t[i] minutes to finish their lunch. What is the minimum time required to serve all customers?

Solution

This is an NP-hard problem called partition problem. Almost every restaurant operator know how to solve this heuristically – just assign empty seat to customer in first-come-first-serve manner. But they may not aware that if they can assign seats optimally, they maybe possible to knock off a bit early.

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