Question:medium

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 j if and only if either j = i + 1 or j = 3i. The minimum number of edges in a path in G from vertex 1 to vertex 100 is:

Show Hint

When solving shortest path problems: Use BFS or Dijkstra’s algorithm for directed graphs and Understand the edge conditions carefully.
Updated On: Feb 11, 2026
  • 4
  • 7
  • 23
  • 99
Show Solution

The Correct Option is B

Solution and Explanation

Breadth-First Search (BFS) determines the shortest path. The total edges count 7, summing 4 and 3.
Was this answer helpful?
0