2.3 We are are interested in examining if it is possible to evacuate the rooms in case of fire. The entrance is a special room on the floor plan. A fire door is a door that will automatically close in case of fire. A room can be evacuated to the entrance if there is a connection from the room to the entrance that does not use any fire doors. Give an algorithm that given a floor plan, an entrance e and a set B of k fire doors determines if all rooms can be evacuated to e. Analyze the running time of your algorithm in the relevant parameters of the problem.
So once the graph created from the room and door plan, we are interested to know whether there exist a path from every room to the entrance e without using any fire door.
So answer is very simple. Given the graph G=(V,E) where one of the vertex is e which is entrance, perform following steps:-
1. Remove those edges from the graph G=(V,E) which corresponds to fire door.
2. Now we need to check whether every vertices v in V is connected to vertex e or not when fire door has been removed. In order to check this, perform Breadth First Search in graph G=(V,E) starting from vertex e, which will created BFS tree with root vertex e.
3. If the BFS tree with root e covers all the vertices in G=(V,E) then this means there exist path from every room to the entrance e without any fire door. And if BFS tree does not over all the vertices, then this means every vertices are not connected to entrance e without any fire door.
So the time complexity of above task will be O(V+E) which is the time complexity of performing BFS on graph G=(V,E).
Please comment for any clarification.
2.3 We are are interested in examining if it is possible to evacuate the rooms in case of fire. T...
How can we assess whether a project is a success or a failure? This case presents two phases of a large business transformation project involving the implementation of an ERP system with the aim of creating an integrated company. The case illustrates some of the challenges associated with integration. It also presents the obstacles facing companies that undertake projects involving large information technology projects. Bombardier and Its Environment Joseph-Armand Bombardier was 15 years old when he built his first snowmobile...