1 - 22B软工二学位 算法分析与设计-覃桂敏
1 - 22B软工二学位 算法分析与设计-覃桂敏
1 - 22B软工二学位 算法分析与设计-覃桂敏
装 订 线
考试时间 120 分钟
试 题
题号 一 二 三 四 五 六 七 总分
分数 16 20 12 12 16 16 8
得分
任课教师:
1.考试形式:闭卷 开卷□
2.考试日期: 年 月 日(答案直接答在试卷上,不要超出装订线)
forms a max-heap.
(5) Radix sort runs correctly when using any correct sorting algorithm to sort each
digit..
(6) In Greedy strategy, optimal substructure means that an optimal solution to the
problem contains within it an optimal solution to subproblems.
(7) Greedy strategy can be used to obtain an optimal solution of the fractional
knapsack problem by choosing the most value/ weight per unit in descending
order.
姓名:
2 / 4
4. Divide and Conquer Strategy (12 points)
(1) Describe the 3 steps used in Divide and Conquer strategy to solve a problem.
(2) Illustrate the operation of merge sort on the array <41, 52, 26, 38, 57, 9, 49>. (给
出排序过程)
3 / 4
6. Maximum Subarray Problem (16 points)
There are 5 items that have a value and weight list below, the knapsack can
contain at most 100 kg.
Value ($) 20 30 65 40 60
Weight(kg) 10 20 30 40 50
(1) Evaluate the most valuable load for this 0-1 knapsack problem.
(2) Evaluate the most valuable load for this fractional knapsack problem.
4 / 4