




已阅读5页,还剩1页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
一、 Please answer T or F for each of the following statements to indicate whether the statement is true or false1. An algorithm is an instance, or concrete representation, for a computer program in some programming language. ( F )2. The following problem is a Decision Problem: What is the value of a best possible solution? ( F )3. The dynamic programming method can not solve a problem in polynomial time. ( F )4. Assume that there is a polynomial reduction from problem A to problem B. If we can prove that A is NP-hard, then we know that B is NP-hard. ( F ) 5. If one can give a polynomial-time algorithm for a problem in NP, then all the problems NP can be solved in polynomial time. ( F )6. In an undirected graph, the minimum cut between any two vertices a and b is unique. ( F )7. Linear programming can be solved in polynomial time, but integer linear programming can not be solved in polynomial time. ( T )8. We can solve the maximum independent set problem in a graph with at most 100 vertices in polynomial time. ( T )结论9. If an algorithm solves a problem of size n by dividing it into two subproblems of size n/2, recursively solving each subproblems, and then combine the solutions in linear time. Then the algorithm runs in O(nlogn) time. ( T )10. Neural Computation, Fuzzy Computation and Evolution Computing are the three research fields of Computational Intelligence. ( T )二、 Given the following seven functions f1(n) = n5 + 10n4, f2(n) = n2 + 3n, f3(n) = 210000, f4(n) = logn + (2logn)3, f5(n) = 2n+n!+ 5en, f6(n) = 3log(2n) + 5logn, f7(n) = 2nlogn+lognn. Please answer the questions:(a) Give the tight asymptotic growth rate (asymptotic expression with q) to each of them; (7分)(b) Arrange them in ascending order of asymptotic growth rate。 (3分)参考答案和评分标准:a)(1) n5 + 10n4 = q (n5) (1分,非最简表达式或写成O或W不符合题意,不给分)(2) n2 +3n = q (3n) (1分,标准同上)(3) 210000 = q (n0.75) (1分,标准同上)(4) logn + (2logn)3 = q ( (logn)3) (1分,标准同上)(5) 2n+n!+ 5en = q (n!) (1分,标准同上)(6) 3log2n + 5logn = q (n) (1分,标准同上)(7) 2nlogn+lognn. = q (nn) (1分,标准同上)b)f4 f3 f6 f1 f2 f5 f7 (3分,每个错误位置扣0.5分,扣完为止)三、 Please answer the following questions:(a)。四、 In the interval scheduling problem, we are given n jobs each of which has a starting time s and a finishing time f, and the goal is to find a maximum set of mutually compatible jobs (two jobs are compatible if they dont overlap). Please answer the following questions:(a) Design a greedy algorithm for the interval scheduling problem and prove the correctness of it. (b) Assume that we are given 8 jobs with starting time and finishing time (s, t) being (0,2), (1,3), (8,9), (3,7), (7,8), (2,4),(6,9), (4,5). Use your algorithm to find a solution to this instance. 参考答案及评分标准:a)将所有工作(jobs)按其完成时间的先后进行排序; 在排好序的序列中用弹性法则,以此选取最小完成时间且和前面已选工作不冲突的工作。 证明用反证法,假设贪心算法不是最优导出矛盾,课件中有证明。证明思路大体正确即可给全分。 b)答案是 (0,2),(2,4),(4,5),(7,8),(8,9). 五、 Find a minimum s-t cut in the following directed graph (the number beside the edge is the capacity of the edge). You are required to give the computation steps and show the cut and its size. (9分)参考答案: 18. 评分标准:说明计算该图从s到T的最大流 (2分)给出第一个和增广路径 (2分)后面任意两个增广路径 (1分一个)最后答案 18和这个cut (3分,任给一个cut即可,最后结果18错误则不给分) 六、 Prove that if we can check if a graph has a clique of size k in polynomial time then we can also find a clique of size k in polynomial time (a clique of a graph is a complete subgraph ). 参考答案及评分标准:设检查算法为B,我们构造一个找到解的算法A,该算法多项式次调用B。 (1分)算法A的步骤和思想:依次从图中删除一个点,再调用算法B来检查是否还存在大小为k的clique,如果存在则直接从图中删除这个点 (2分);如果不存在,则将这个点放入解集,同时将图中所有不和这个点相邻的点全删除,再删除这个点本身,在剩余的图中再检查是否存在大小为k-1的clique。(3分)以上思想正确给全分,其它正确解法也给全分。七、 We know that finding a longest path in a graph is NP-hard. Please show that finding a longest path that passing through a given vertex is also NP-hard. (6分)参考答案及评分标准:将最长路径问题归约到通过某个点的最长路径问题。思想如下:对于每个最长路径问题G,我们对图G中每个点得到一个通过这个点的最长路径问题,总共得到n(n为G中点的个数)个问题,如果后一个问题存在多项式算法,则前一个问题也存在。以上思想正确给全分,否则最多给3分。八、 In a supermarket, there are n different types of goods for sale. Each type of goods has a price of dollars and a value of . Now you are asked to buy some goods such that: for each type of goods, at most 2 pieces are bought, the total value of the goods is at least V and the total money used is minium. Use a dynamic programming algorithm to solve the above problem. (a) Please define your subproblem; (b) Give the recurrence relation based on your subproblems; (c) Solve the following instance showed in Table 1 by using the bottom-up method, where V=10. You are required to give the computation steps (the table used to store the solutions to the subporblems).
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 宣传推广部管理制度
- 家具厂车辆管理制度
- 库房配料员管理制度
- 张作霖家庭管理制度
- 彩票店台账管理制度
- 律师会见室管理制度
- 德克士岗位管理制度
- 快时尚门店管理制度
- 急救培训证管理制度
- 总监级薪酬管理制度
- 尿崩症诊疗规范内科学诊疗规范诊疗指南2023版
- 老年法律法规体系初识 老年服务与管理法律法规概述
- 民航服务沟通PPT完整全套教学课件
- 【地方政府促进乡村旅游发展研究文献综述3600字】
- 某工业安装工程设备监理实施细则
- 西安市商品住宅使用说明书
- 西部科学城重庆高新区引进急需紧缺人才38人模拟检测试卷【共1000题含答案解析】
- 湖南2022年事业编招聘考试《职业能力倾向测验》真题及答案解析【最全版】
- GB 1903.27-2022食品安全国家标准食品营养强化剂低聚半乳糖
- 带传动教学课件
- 新护士五年规范化培训手册
评论
0/150
提交评论