In a 8- storey building, ground floor being numbered 1, next floor being numbered 2 and so on , there lives 8 persons- A, B, C, D, E, F, G and H along with their wives – P, Q, R, S, T, U, V and W. They have different cars- Alto, Breeza, Desire, Ferrari, Mercedes, Santro, Scorpio, and Zen not necessarily in the same order. Each couple has a unique car.
H lives with his wife, P on an even numbered floor but not on the top most floor. H does not have Santro. The one having Alto lives immediately below the one in which W lives. The one who has Breeza lives on an odd numbered floor. U has Scorpio. D lives on an odd numbered floor. B does not live on floor numbered 1. The one who has Ferrari lives on one of the floors below the one who has Santro. D is not married to U. T is wife of neither B nor E. F lives on an odd numbered floor but above floor number 3. Only one person lives between H and G. The one who has Breeza lives immediately above the one who has Ferrari. D’s wife is not among T, Q and S. Q is not married to E. T has Breeza car. Three person live between F and E, who has Desire car. R has Mercedes. C is married to W and he lives immediately above B who lives on an odd numbered floor. B and F are not neighbours to each other (can not live immediately above or below each other). More than 3 persons live between B and one having Mercedes. The one having Mercedes does not live on floor numbered 2. F and the one who has Mercedes does not live on floor numbered 7. C does not live on the top most floor. T lives two floors below D.
SOLUTION
Floors: 1 to 8 | Persons: A, B, C, D, E, F, G, H | Wives: P, Q, R, S, T, U, V, W | Cars: Alto, Breeza, Desire, Ferrari, Mercedes, Santro, Scorpio, Zen
F Lives on an odd numbered floor above floor no. 3. ( So, there are two cases – F lives on floor 5 or floor 7).
Three persons live between F and E.
E has desire.
C does not live on the topmost floor.
C lives immediately above B, who lives on an odd numbered floor.
C is married to W.
The one having Alto lives immediately below W.
CASE-1
CASE-2
FLOOR
PERSON
WIFE
CAR
FLOOR
PERSON
WIFE
CAR
8
8
7
7
F
6
6
C
W
5
F
5
B
Alto
4
C
W
4
3
B
Alto
3
E
Desire
2
2
1
E
Desire
1
More than three persons live between B and the one having Mercedes and the one living on floor 7 does not have Mercedes. ( So, case two is eliminated)
Case-1
FLOOR
PERSON
WIFE
CAR
8
Mercedes
7
6
5
F
4
C
W
3
B
Alto
2
1
E
Desire
R has Mercedes.
Only one person lives between H and G and H does not live on topmost floor. ( So H must live on floor 6).
H is married to P.
D lives on an odd numbered floor.
Case-1
FLOOR
PERSON
WIFE
CAR
8
G
R
Mercedes
7
D
6
H
P
5
F
4
C
W
3
B
Alto
2
1
E
Desire
T lives two floors below D. (So, T lives on floor 5)
T has Breeza.
The one having Ferrari lives immediately below the one having Breeza.
D is not married to U.
U has Scorpio. ( U can only live on Floor )
Case-1
FLOOR
PERSON
WIFE
CAR
8
G
R
Mercedes
7
D
6
H
P
5
F
T
Breeza
4
C
W
Ferrari
3
B
Alto
2
U
Scorpio
1
E
Desire
H does not have Santro. ( H can only have Zen).
D is married to neither Q nor S. ( So, only possibility is D is married to V)
E is not married to Q. (So, only possibility is E is married to S).