Ten persons are living in two different flats i.e. Flat X and Flat Y of a five-storeyed building, but not necessarily in the same order. Flat X is to the west of Flat Y. The lowermost floor is numbered as 1 and the floor above is numbered as 2 and till floor 5.
L lives on an even-numbered floor.
P lives immediately west of L.
| Case 1 | Case 2 |
Floor | Flat X | Flat Y | Flat X | Flat Y |
5 | | | | |
4 | P | L | | |
3 | | | | |
2 | | | P | L |
1 | | | | |
G lives immediate above P.
No one lives to the west of G.
| Case 1 | Case 2 |
Floor | Flat X | Flat Y | Flat X | Flat Y |
5 | G | | | |
4 | P | L | | |
3 | | | G | |
2 | | | P | L |
1 | | | | |
Only one floor is between M and G.
M lives below A in the same flat.
M does not lives in flat X.
| Case 1 | Case 2 |
Floor | Flat X | Flat Y | Flat X | Flat Y |
5 | G | | | |
4 | P | L | | |
3 | | M | G | |
2 | | | P | L |
1 | | | | M |
H lives immediately east of N.
Q lives immediately below N.
A and Q live on the same floor.
M lives below A in the same flat.
Thus, Case 1 gets cancelled.
| Case 2 |
Floor | Flat X | Flat Y |
5 | N | H |
4 | Q | A |
3 | G | |
2 | P | L |
1 | | M |
D lives above K.
Floor | Flat X | Flat Y |
5 | N | H |
4 | Q | A |
3 | G | D |
2 | P | L |
1 | K | M |
This is the final arrangement.
M lives immediately below L, who likes immediately east of P.