The distance-2 layer of a graph

Run breadth-first search from vertex 11 on this undirected graph, whose edges are {1-2, 1-3, 2-4, 2-5, 3-5, 3-6, 5-7}.\{1\text{-}2,\ 1\text{-}3,\ 2\text{-}4,\ 2\text{-}5,\ 3\text{-}5,\ 3\text{-}6,\ 5\text{-}7\}. How many vertices lie at shortest-path distance exactly 22 from vertex 11?

Show hints (2)+
  1. Layer 0={1}0=\{1\}, layer 1={2,3}1=\{2,3\}. Which new vertices do the neighbours of 22 and 33 reveal?
  2. Vertex 55 is reachable from both 22 and 33 - count it once. Vertex 77 sits one layer further out.

Answer

Reveal answer →

3

Want the full step-by-step worked solution? It's part of Premium - along with a worked solution for every question in the bank.

Asked at: Game-Based Aptitude, Options Market-Making

Related questions