Albert enjoys walking through his neighborhood to buy groceries. He models the neighborhood as an undirected simple graph \(G=(V,E)\), where:
- Each corner is represented by a vertex.
- Each street connecting two corners is represented by an edge.
Albert starts from his home at vertex \(s\) and wants to reach the grocery store at vertex \(t\).
Some dogs in the neighborhood bark aggressively. Dogs may be located either at corners or along streets, and they are represented in the graph as follows:
- If a dog is located at a corner, the corresponding vertex is considered unsafe.
- If a dog is located along a street, the corresponding edge is considered unsafe.
Consider the graph with:
Vertices
\(V=\{s,1,2,3,4,5,6,t\}\)
Edges
\(E=\{(s,1),(s,3),(1,3),(1,2),(3,4),(3,6),(4,5),(5,6),(4,2),(2,t)\}\)
Additionally:
- Edge \((1,2)\) is unsafe.
- Edge \((3,4)\) is unsafe.
- Vertex \(1\) is unsafe.
For each of the following statements, determine whether it is True (T) or False (F).
- If all vertices and edges are considered safe, the BFS distance from \(s\) to \(t\) is 3.
- If all vertices are safe but unsafe edges cannot be used, the BFS distance from \(s\) to \(t\) is 4.
- If unsafe vertices cannot be visited but all edges are considered safe, there exists a path from \(s\) to \(t\).
- If unsafe vertices cannot be visited and unsafe edges cannot be used, the distance from \(s\) to \(t\) is 5.
Alternatives
a) TTTT
b) TTTF
c) TTFT
d) TFTT
e) None of the above
Original idea by: Luis Alberto Vásquez Vargas
Comments
Post a Comment