All mock tests are FREE till 31 December — register to save your progress
Unit 7 · Data Structures and Algorithms Paper 2 CS · November 2020

Let be a directed graph whose vertex set is the set of numbers from 1 to 100 . There is an i j edge from a vertex to a vertex if and only if j = i + 1 j = 3i either or . The minimum G number of edges in a path in from vertex 1 to vertex 100 is ____

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: D. 7 L = L ∩ L

Explanation

Working backwards from 100: 100 ← 99 ← 33 ← 11 ← 10 ← 9 ← 3 ← 1. The path 1 → 3 → 9 → 10 → 11 → 33 → 99 → 100 uses 7 edges.

More Data Structures and Algorithms questions