GATE CS 2021 Set 1 | Question 50
Algorithms › Algorithm Design Techniques · MSQ · 2 marks · Answer: A, C
- Question 50Algorithmsmsq2 marksDefine to be the maximum amount earned by cutting a rod of length meters into one or more pieces of integer length and selling them. For , let denote the selling price of a rod whose length is meters. Consider the array of prices:Which of the following statements is/are correct about ?
- A.✓
- B.
- C.is achieved by three different solutions.✓
- D.cannot be achieved by a solution consisting of three pieces.
Answer: A, C
Solution
The optimal revenue is , achievable as , or (5+10=... ) — in fact three distinct cuts give 18: , , . So (A) and it is achieved by three different solutions (C). - A.
More GATE PYQ on Algorithm Design Techniques
All GATE CS Algorithms PYQ →Attempt GATE CS 2021 Set 1 in real GATE exam mode
Full paper with a timer, the GATE interface and a topic-wise analysis — free.
Create free account →