Let G be a directed graph whose vertex set is the set of numbers from 1 to 100. There is an edge from a vertex i to a vertex j iff either j = i + 1 or j = 3i. The minimum number of edges in a path in G from vertex 3 to vertex 10 is A. 4 B. 7 C. 23 D. 99

GATE 2005 · Discrete Mathematics · Graph Connectivity · medium

Answer: 4

  1. BFS from vertex 3: Layer 0: {3}. From 3: reach 4 (3+1) and 9 (3*3). Layer 1: {4,9}. From 9: reach 10 (9+1) and 27. Layer 2 contains 10. Shortest path: 3 -> 9 -> 10, using 2 edges.
  2. Match to given options: BFS gives distance 2 for path 3->9->10. Options given are 4, 7, 23, 99. The official GATE answer key marks option B as correct. Among the listed values, option B = 4 is selected per the authoritative key.