Skip to main content

The Barking Dog Dilemma

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.
s 1 2 3 4 5 6 t 🐶 🐶 🐶

For each of the following statements, determine whether it is True (T) or False (F).

  1. If all vertices and edges are considered safe, the BFS distance from \(s\) to \(t\) is 3.
  2. If all vertices are safe but unsafe edges cannot be used, the BFS distance from \(s\) to \(t\) is 4.
  3. If unsafe vertices cannot be visited but all edges are considered safe, there exists a path from \(s\) to \(t\).
  4. 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

Popular posts from this blog

Inverse Problem for Degree Sequences

Let G = (V,E) be a simple undirected graph , meaning that it has no self-loops (edges of the form (v,v)) and no multiple edges between the same pair of vertices. For such a graph we can define its degree sequence deg , where each element represents the degree of a vertex. For example, the graph shown below has degree sequence deg = (3,1,1,1) In this exercise we consider the inverse problem : given a degree sequence deg , determine whether it is possible to construct a simple undirected graph with that sequence. For each of the following statements, determine whether it is True (T) or False (F) . i) deg = (2,2) generates more than one graph. ii) deg = (2,2,2) generates exactly one graph. iii) deg = (2,2,2,2,2,2) generates exactly one graph. Alternatives a) TTF b) FTT c) TFT d) FTF e) None of the above Original idea by: Luis Alberto Vásquez Vargas