Puzzles (floors / boxes / scheduling)
Mental model
Puzzles are just constraint satisfaction problems solved by process of elimination.
Establish a fixed base variable (like days of the week or floor numbers), map the rigid constraints first, and then branch into parallel cases for the flexible rules until only one logical arrangement survives.
Method
- Identify the core continuous variable to base your grid on (e.g., Floors 1 to N, Days Monday to Sunday).
- Scan the problem to categorize all constraints as direct (fixed position), relative (positioned against someone else), or negative (cannot be in a certain position).
- Place all absolute, direct constraints into your base grid immediately.
- Create parallel grids/cases for relative constraints that have a limited number of possibilities.
- Apply negative constraints across all active cases to eliminate contradictions until exactly one valid arrangement remains.
Worked example
Problem: Five people (P, Q, R, S, T) live on floors 1 to 5 (1 is bottom). P lives on floor 3. R lives immediately above T. Q does not live on an even-numbered floor. S lives below P. Who lives on floor 2?
- Identify core variable: Floors 5 down to 1.
- Categorize constraints: P=3 (direct). R is directly above T (relative). Q is not on even (negative). S is below P (relative).
- Place direct constraint: Put P on floor 3. The empty floors are 5, 4, 2, 1.
- Evaluate relative constraint R above T: Requires two consecutive empty floors. The options are (5,4) and (2,1). Create Case 1: R=5, T=4. Case 2: R=2, T=1.
- Apply remaining constraints to cases: In Case 1 (R=5, T=4), remaining floors for Q and S are 1 and 2. Since Q is odd, Q=1. Thus S=2. S=2 is below P=3 (valid).
- Check Case 2 (R=2, T=1) to be sure: Remaining floors are 4 and 5. Q is odd so Q=5. Thus S=4. But S must be below P(3). Case 2 is invalid.
- Final valid arrangement is R=5, T=4, P=3, S=2, Q=1.
Answer: S lives on floor 2.
Common mistakes
- Starting with floating constraints: Trying to place 'A is two floors above B' without a fixed grid wastes time. Always plot your fixed variables first.
- Assuming instead of drawing cases: When there are two possibilities, mentally holding them often leads to errors. Quickly draw a second column next to your base grid to track the alternate case.
Glossary
- constraint
- A rule or condition that you must follow when solving a problem.
- contradictions
- When two facts or rules clash and both cannot possibly be true at the same time.
- flexible
- Something that can change or have multiple possible options.
Recall questions
- What is the first step you should take when solving a floor or scheduling puzzle?
- If you encounter a relative constraint like 'A is immediately above B', what should you do?
- How do you use negative constraints (e.g., 'C does not live on floor 1') in your method?
Questions & answers
Five boxes are stacked. Box A is exactly in the middle. Box B is immediately above Box C. Box D is at the very top. Where is Box E?
At the 4th position from the bottom (just below top).
Approach: Grid 5 to 1. D is 5. A is 3. B above C means they need consecutive spots (2,1). So E takes the remaining spot at 4.
Seven lectures are scheduled from Monday to Sunday. Math is on Thursday. Physics is immediately before Chemistry. Biology is on Tuesday. Only one day is empty between Math and English. On which day is English if it's held after Math?
Saturday
Approach: Grid Mon-Sun. Bio=Tue, Math=Thu. English is after Math with 1 day gap, so Math=Thu, gap=Fri, English=Sat.
Continue learning
Previous: Linear & Circular Seating