# Puzzle | Six Houses P, Q, R, S, T, and U

There are three houses on each side of the road. These six houses are labeled as P, Q, R, S, T, and U. The houses are of different colors, namely, Red, Blue, Green, Orange, Yellow, and White. The houses are of different heights.

• T, the tallest house, is exactly opposite to the Red-colored house.
• The shortest house is exactly opposite to the Green colored house.
• U, the Orange colored house, is located between P and S.
• R, the Yellow-colored house, is exactly opposite to P.
• Q, the Green colored house, is exactly opposite to U.
• P, the white-colored house, is taller than R, but shorter than S and Q.

What is the color of the tallest house and how many houses are taller than the house R?

Solution:

• From the given information the tallest house is T and it is opposite to the Red-colored house. and the Shortest house is exactly opposite to the Green colored house.
• The color of the house U is Orange and it is situated between P and S. It implies that houses P, S, and U are on one side of the road and the other three houses, namely, Q, R, and T are on another side of the road. P, S, and U can be placed in two ways. One way is {P, U, S}, and another way is {S, U, P}
• The color of the house R is Yellow and it is opposite to P
• The color of the house Q is Green and it is opposite of U. The shortest house is exactly opposite to the Green colored house it means the shortest house is U
• The remaining house T, the tallest house, is opposite to S. The color of the house which is exactly opposite to T is Red. It means the color of S is Red. P, the white-colored house, is taller than R, but shorter than S and Q. The heights of P, Q, R, and S can be arranged in two ways. One of the ways is {S, Q, P, R} and another way is {Q, S, P, R}
• Therefore, {P, U, S} are one side on the road, and {R, Q, T} are on another side of the road. P is opposite to R, U is opposite to Q and S is opposite to T. These two cases are shown below:

Heights of houses also have two ways which are shown in the table below:

From the above table,
The color of the tallest house is Blue and the tallest house is T. Therefore, there are four houses taller than R which are T, Q, S, and P.

My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

Article Tags :
Practice Tags :

2

Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.