Unfold Prep

CAT 2017 · SLOT 1

Passage

Healthy Bites is a fast food joint serving three items: burgers, fries and ice cream. It has two employees Anish and Bani who prepare the items ordered by the clients. Preparation time is 10 minutes for a burger and 2 minutes for an order of ice cream. An employee can prepare only one of these items at a time. The fries are prepared in an automatic fryer which can prepare up to 3 portions of fires at a time, and takes 5 minutes irrespective of the number of portions. The fryer does not need an employee to constantly attend to it, and we can ignore the time taken by an employee to start and stop the fryer; thus, an employee can be engaged in preparing other items while the frying is on. However fries cannot be prepared in anticipation of future orders.

Healthy Bites wishes to serve the orders as early as possible. The individual items in any order are served as and when ready; however, the order is considered to be completely served only when all the items of that order are served.

The table below gives the orders of three clients and the times at which they placed their orders:

Client No.TimeOrder
110:001 burger, 3 portions of fries, 1 order of ice cream
210:052 portions of fries, 1 order of ice cream
310:071 burger, 1 portion of fries

Q38.Suppose the employees are allowed to process multiple orders at a time, but the preference would be to finish orders of clients who placed their orders earlier. Also assume that the fourth client came in only at 10:35. Between 10:00 and 10:30, for how many minutes is exactly one of the employees idle?

Let's map out the fully optimized schedule from 10:00 to 10:30.

From 10:02 to 10:05, Anish is busy but Bani is idle (3 minutes). Then Client 2 arrives.

Client 3 arrives at 10:07. Bani finishes C2's Ice Cream and immediately starts C3's Burger.

At 10:10, Anish finishes C1's Burger. Now Anish is idle while Bani is working until 10:17 (7 minutes).

After 10:17, both employees are idle. So exactly one employee is idle for 3 + 7 = 10 minutes.

Simulation Timeline

Time Elapsed
10:00
10:00
10:05
10:10
10:15
10:20
10:25
10:30
Anish
Bani
Fryer

Let's map out the fully optimized schedule from 10:00 to 10:30.