Question:

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?

Show Hint

In problems involving paths through buildings or networks, always look for the shortest route by considering the number of obstacles (like doors) that need to be overcome. Sometimes drawing the diagram helps in visualizing the best path.
  • 4
  • 3
  • 2
  • 1
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is C

Solution and Explanation

We are given a building with several rooms and doors as shown in the diagram. Initially, all the doors are closed. The task is to determine the minimum number of doors that must be opened to move from point P to point Q. Let's break down the solution step by step.

Step 1: Analyze the layout of the building.
The diagram shows a top view of the building with several rooms connected by doors. Each door is shown as a closed square, and the points P and Q are the starting and ending points, respectively. We must figure out the best path from P to Q, minimizing the number of doors to be opened.

Step 2: Observe the structure of the rooms and doors.
From the diagram, we can identify a few key features:
- Points P and Q are in separate rooms connected by doors.
- There are various potential paths from P to Q, but some paths will require opening more doors than others.

Step 3: Identify the optimal path.
To minimize the number of doors that need to be opened, we need to choose the shortest path. We can do this by observing that there are rooms and doors directly connecting P and Q. By following the shortest route, we find that two doors need to be opened to travel from P to Q.
Thus, the minimum number of doors to open is 2.
Was this answer helpful?
0
0

Questions Asked in GATE XH- C6 exam

View More Questions