Today’s plan
The algorithm
- Rule 1 — the TEAM TAG lives with Yuval, all 5 days. He closes alone 22:00–24:00 every day, and Bar’s tag can never be there at that hour (it’s hers on Mon/Tue/Thu, and Hagai must carry it home on Sun/Wed). The team tag never changes hands → zero hand-offs, ever.
- Rule 2 — the Bar household unlocks the mornings. Because of Rule 1 the team tag sleeps at Yuval’s, so at 09:00 every tag is at Yuval’s home or at Bar & Hagai’s home. Mon/Tue/Thu: Bar is in the building 09:00–16:00 with her own tag — she badges Dani in and reopens after his solo-hour restroom trips. Sun/Wed: Bar is home, so Hagai starts early (~09:00) carrying her tag and opens for Dani.
- Rule 3 — everyone else knocks. Leaving and opening from inside need no tag, so while ≥1 person is inside, anyone can get in.
- Rule 4 — tag custody at the edges. After 16:00 on 1-tag days the team tag may not leave unless ≥2 people stay or it’s handed to whoever now leaves last. On 2-tag days Hagai must take Bar’s tag home when he leaves — she needs it at her office next morning (the weekly cycle works out exactly: Thu→Bar, Sun→Hagai, Mon/Tue→Bar, Wed→Hagai).
Why it’s optimal
Re-entering an empty office needs a tag at the door or Bar in the building. The office is empty only around two solo windows: the opener’s morning (09:00–10:00) and the closer’s night (22:00–24:00). The night window can only ever be covered by the team tag → Yuval, forced. That exiles the team tag from all mornings → the 09:00 door can only be opened by Bar in person (Mon/Tue/Thu) or by her tag in Hagai’s pocket (Sun/Wed) — so Hagai’s early start twice a week is not a choice, it’s the only way to keep 09:00 access. Result: everyone can enter, work and reach the restroom for the full 09:00→24:00 span, every workday — the maximum possible — with 0 tag hand-offs and every tag sleeping where tomorrow needs it.