Computer Sciences > GATE 2021 SET-1 > Dynamic Programming
Define Rn 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, p = 5, p = 8, p = 9, p = 10, p = 17, p = 18
Which of the following statements is/are correct about R7?
A
R7 = 18
B
R7 = 19
C
R7 is achieved by three different solutions.
D
R7 cannot be achieved by a solution consisting of three pieces.

Correct : a, c

Similar Questions

Let A1, A2, A3, and A4 be four matrices of dimensions 10 x 5, 5 x 20, 20 x 10, and 10 x 5, respectively. The minimum number of scalar multiplications required t...
#544 Fill in the Blanks
Consider two strings A = ""qpqrr"" and B = ""pqprqrp"". Let x be the length of the longest common subsequence (not necessarily contiguous) between A and B and l...
#1269 Fill in the Blanks
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...
#1311 Fill in the Blanks

Related Topics

No tags found

Unique Visitor Count

Total Unique Visitors

Loading......