cs-131 — The Two-Desk Counter

FieldValue
idcs-131
difficultyIntermediate
topicssimulation, service systems, trade-offs
lecturelecture-23
estimated time5-minute attempt + 10-minute discussion
prerequisiteslecture-06 (traces), lecture-09 (aggregation)
objectivesimulate a service system under two designs and reason about the trade-off between them
solutionheld by the instructor; discussed after the attempt

Problem

A campus help desk serves students one at a time. Eight students will arrive today; their arrival minute and service duration (in minutes) are known in advance:

student:  S1   S2   S3   S4   S5   S6   S7   S8
arrives:   0    1    2    6    7   10   12   13
service:   4    3    5    2    4    3    2    5

Rules: students are served in arrival order; a server starts a student at max(arrival, when the server next frees); nobody jumps the queue.

Compare two designs:

Your deliverables:

  1. For each design, each student's waiting time (start − arrival).
  2. The total waiting time and the makespan (last finish) per design.
  3. One sentence on the trade-off: the second desk costs money — under what conditions is it worth it?

If the problem is ambiguous anywhere, state the assumption you are making and carry on — a stated assumption is part of a good answer.

Examples

Solve for the worked instance first. Then ask what would change if one number, name, or condition were replaced by something stranger.

What to notice

Discussion starter

After the solution is revealed, the class spends five minutes on this prompt: "Arrivals double next semester (same gaps, twice the service load spread over more students). Does the two-desk advantage grow, shrink, or stay put — and how would you check without simulating all day?"

Constraints and assumptions

Hints and extension