GATE CS 2021 (Forenoon) — Question 50

AlgorithmsDynamic Programming InfrastructureMSQ2 marksMedium

Define \(R_n\) to be the maximum amount earned by cutting a rod of length \(n\) meters into one or more pieces of integer length and selling them. For \(i > 0\), let \(p[i]\) denote the selling price of a rod whose length is \(i\) meters. Consider the array of prices: \(p[1] = 1, p[2] = 5, p[3] = 8, p[4] = 9, p[5] = 10, p[6] = 17, p[7] = 18\) Which of the following statements is/are correct about \(R_7\)?
  1. A
    \(R_7 = 18\)
  2. B
    \(R_7 = 19\)
  3. C
    \(R_7\) is achieved by three different solutions.
  4. D
    \(R_7\) cannot be achieved by a solution consisting of three pieces.
Practise the full 2021-FN paper
Challenge a friend: WhatsApp Telegram
Recommended book · affiliate linkIntroduction to Algorithms (CLRS)The standard reference behind most GATE algorithm questions.
Practise more on Dynamic Programming InfrastructureTimed, in the real exam interface · free to start

A GATE question every morning

One real past-paper question every morning for your branch, answer hidden until you tap. Free on Telegram.

Join
Stuck? Ask in the student group