GATE CS 2014 · Set-3 · Asymptotic Analysis & Recurrences

NAT · 2 marks · Problem PROG-DIVC-0105

Suppose you want to move from 0 to 100 on the number line. In each step, you either move right by a unit distance or you take a shortcut. A shortcut is simply a pre-specified pair of integers i,j with \(i \lt j\). Given a shortcut i, j if you are at position i on the number line, you may directly move to j. Suppose T(k) denotes the smallest number of steps needed to move from k to 100. suppose further that there is at most 1 shortcut involving any number, and in particular from 9 there is a shortcut to 15. Let y and z be such that T(9) = 1 + min(T(y), T(z)). Then the value of the product yz is.

Numerical answer (NAT).

Solve it on GATE DA practice →More Searching & Sorting Algorithms problems

Show the worked solutionOfficial GATE Answer Key: [150.0, 150.0].See full step-by-step discussion on GateOverflow: https://gateoverflow.in/2071/gate2014-3-37

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com