Step 1: Evaluate revenue possibilities for rod length 7.
To determine the optimal revenue, consider all meaningful ways of cutting a rod of length 7 and compute the total
price using the given price table.
Possible cases:
• No cut: p[7] = 18
• One cut:
6 + 1 → p[6] + p[1] = 17 + 1 = 18
5 + 2 → p[5] + p[2] = 10 + 5 = 15
4 + 3 → p[4] + p[3] = 9 + 8 = 17
• Multiple cuts:
3 + 2 + 2 → p[3] + p[2] + p[2] = 8 + 5 + 5 = 18
Step 2: Determine optimal revenue.
From all evaluated cases, the highest revenue obtainable is 18.
Hence, the optimal revenue for a rod of length 7 is:
R7 = 18
Therefore, statement (A) is correct.
Step 3: Count distinct optimal cutting strategies.
The maximum revenue of 18 is achieved in the following three distinct ways:
• No cut (7)
• 6 + 1
• 3 + 2 + 2
Thus, there are three optimal solutions, making statement (C) correct.
Step 4: Reject incorrect statements.
Statement (B): Incorrect, since no combination yields a revenue of 19.
Statement (D): Incorrect, because an optimal solution using three pieces
(3 + 2 + 2) does exist.
Final Conclusion:
The correct statements are (A) and (C).
| 60 | 70 | 80 | 90 | 100 |
The minimum number of swaps performed during this Quicksort is ________.