DU Ka Unit (Science Unit) study materials
DU Ka Unit (Science Unit) study resources

Seating and Scheduling Constraint Puzzle

DU Ka Unit (Science Unit) · Put your knowledge to work in context.

All case studies

Seating and Scheduling Constraint Puzzle

Five scientists - P, Q, R, S, T - give talks on one day, one per slot, in slots 1 to 5. Constraints: Q must be immediately before R. S cannot be in slot 1 or 5. T must be after P but not immediately after. P cannot be in slot 5. The organiser must build a valid schedule and answer what-if questions.

1. Determine one complete valid schedule and explain the reasoning steps.

Read the worked answer

Q and R form a block (QR). Possible block positions: (1,2), (2,3), (3,4), (4,5). S must be in slot 2, 3 or 4. P cannot be in slot 5, and T must come after P but not immediately after. Try QR at (4,5): then S must be in 2 or 3, and P, T fill the rest with T after P but not adjacent. If S = 2, remaining slots 1 and 3 for P and T; T after P means P = 1, T = 3 - but T is then not immediately after P (slot 2 is S), which is allowed. Schedule: P, S, T, Q, R. Check: QR adjacent ✓, S in 3? No, S is in slot 2 ✓, P not in 5 ✓, T after P and not immediately after ✓. So P-S-T-Q-R is valid. The reasoning is to place the fixed block first, then apply the 'not slot 1 or 5' constraint to S, then satisfy the ordering constraint on P and T.

2. If S must be in slot 3, how many valid schedules exist?

Read the worked answer

Fix S = 3. QR block can be at (1,2), (2,3) - impossible since slot 3 is S - (3,4) - impossible - or (4,5). So QR is at (1,2) or (4,5). Case QR = (1,2): remaining slots 4 and 5 for P and T. T after P and not immediately after: P = 4, T = 5 - but they are adjacent, which violates 'not immediately after'. P = 5 is forbidden. So no valid arrangement in this case. Case QR = (4,5): remaining slots 1 and 2 for P and T. T after P: P = 1, T = 2 - adjacent, violates the constraint. No valid arrangement. Therefore with S fixed in slot 3 there are zero valid schedules. The judgement is to test each block placement systematically rather than assuming a solution exists.

3. If the 'not immediately after' condition is removed, how many schedules have S in slot 3?

Read the worked answer

With S = 3, QR at (1,2): slots 4,5 for P,T; T after P means P=4, T=5 (one schedule). QR at (4,5): slots 1,2 for P,T; T after P means P=1, T=2 (one schedule). Total = 2 schedules: P,T,S,Q,R and Q,R,S,P,T. Check S not in 1 or 5 ✓, P not in 5 ✓. So removing the adjacency condition turns zero solutions into two. This illustrates how a single extra constraint can eliminate all solutions - a key judgement in scheduling problems: always check feasibility before optimising.