A building has several rooms and doors as shown in the top view of the building given below. The doors are closed initially. What is the minimum number of doors that need to be opened in order to go from the point P to the point Q?
A. 4 B. 3 C. 2 D. 1
GATE 2022 · General Aptitude · Logical Reasoning · medium
Answer: The minimum number of doors that need to be opened to go from P to Q is 2. Answer: C.
Identify room positions of P and Q: From the building top view, P is located in the top-left room (Room 1) and Q is in the bottom-right room (Room 4). These are diagonally opposite rooms in a 2x2 grid layout. There is no direct wall (and therefore no direct door) between Room 1 and Room 4.
Find shortest path via intermediate room: From Room 1, adjacent rooms accessible by a door are: Room 2 (right, sharing a wall) and Room 3 (below, sharing a wall). From Room 2, a door connects to Room 4. Path: Room1 -> (open door 1) -> Room2 -> (open door 2) -> Room4 (where Q is). Total doors opened = 2.