Define \(R_n\) to be the maximum amount earned by cutting a rod of length n…

GATE · 2021 · CS · Set 1 · Computer Science & IT

Define RnR_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 i > 0 , let  p[i]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\text{p}[1]=1,\text{p}[2]=5,\text{p}[3]=8,\text{p}[4]=9,\text{p}[5]=10,\text{p}[6]=17,\text{p}[7]=18

Which of the following statements is/are correct about R7R_7 ?

  1. A.

    R7R_7 = 18

  2. B.

    R7R_7 = 19

  3. C.

    R7R_7 is achieved by three different solutions.

  4. D.

    R7R_7 cannot be achieved by a solution consisting of three pieces.

Attempted by 36 students.

Sign up free to check your answer

Sign up free

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…