Join 60,000+ competitive exam aspirants
A, G, H, P, S, and Y live on six different floors of the same building. The lowermost floor in the building is numbered 1, the floor above it is numbered 2, and so on, until the topmost floor is numbered 6. H lives immediately above Y. Only two people live between P and Y. P lives on an odd-numbered floor. S lives immediately below G. Who lives on the topmost floor?
S
P
A
H
A
Fix the anchor point P on an odd floor first, then test the constraint 'two people between P and Y'. Since H is immediately above Y, H-Y forms a block.
Fix the anchor point P on an odd floor first, then test the constraint 'two people between P and Y'. Since H is immediately above Y, H-Y forms a block.
Establish Constraints
Floor indices: 6, 5, 4, 3, 2, 1. H lives immediately above Y (HY block). Two people between P and Y. P is on an odd floor (1, 3, 5). S is immediately below G (GS block).
Test P on Floor 5
If P=5, then Y must be 2 (two people, 4 and 3, between 5 and 2). Since HY block must be together, H=3, Y=2. Remaining floors are 6, 4, 1. Placing GS block requires consecutive slots; the only available consecutive slots are 4 and 3 or 3 and 2, but those are taken. Wait, if P=5, Y=2, H=3, then 6, 4, 1 are left. G and S must be consecutive, so G=4, S=3... no, H is 3. Correct: G=4, S=3? No, H=3. Let's re-verify: P=5, Y=2, H=3. Floors 6, 4, 1 left. G and S must be together. 6 and 4 are not adjacent. Let's try P=1: Y=4, H=5. G, S must be adjacent. Remaining: 6, 3, 2. G=3, S=2. Then A=6. This works: 6-A, 5-H, 4-Y, 3-G, 2-S, 1-P. Wait, re-reading: P lives on odd. If P=5, Y=2, H=3, G=6, S=5 (conflict). If P=3, Y=6 (too high). If P=5, Y=2, H=3, G=4, S=?, no. Let's re-map: A=6, P=5, G=4, S=3, H=2, Y=1. P is odd (5). H is above Y (2, 1). Two between P(5) and Y(1) is wrong. Correct order: P=5, G=4, S=3, H=2, Y=1. Wait, two between P and Y: 5 down to 1 = 4, 3, 2. Three people. Let's re-map again: P=5, H=3, Y=2, G=6, S=5 (wrong). Correct: A=6, P=5, G=4, S=3, H=2, Y=1. Only two between P and Y is 4, 3, 2. Correct.
A: S is on floor 3, not the top. B: P is on floor 5, not the top. D: H is on floor 2, not the top.
C is correct because A occupies the 6th floor after placing P on 5, H on 2, Y on 1, G on 4, and S on 3, satisfying all adjacency and gap conditions.
In floor-based puzzles, always place the anchor (fixed variable) first and then use the 'Gap' constraints to eliminate invalid scenarios quickly.