Emergency! Sirens are ringing all across Ember Avenue. Chief Ember has one mobile Rescue HQ and many trucks. Slide HQ to the block that makes the whole brigade's journey shortest, then launch every rescue before the city clock runs out!
π¨ Spot alarm crowds
π Slide Rescue HQ
π£οΈ Shrink all trails
π Dispatch trucks
π
βββ
CITYWIDE RESCUE STRATEGIST
Every Ember City Alarm Is Safe!
π
You discovered: WEIGHTED MEDIANS!
The best HQ sat where at least half the alarm pressure was on each side.
When travel follows one straight route, the median is the location that minimizes the total distance to everyone. Repeated alarms act like extra votes, creating a weighted median. Moving one block away may help calls on one side, but it hurts every call on the other side. At the balance point, no move can reduce the combined journey. Cities use this facility-location idea for depots, clinics, warehouses, charging hubs, and emergency services.
Next quest: another advanced thinking adventure awaits.