[题解]Lecture 11. Approximatio

NF算法:只允许装当前的箱子。如果当前装不下,就开一个新的箱子。不允许向之前的箱子装。

FF算法:遍历所有之前的箱子,向第一个可以装进去的装,

BF算法:遍历之前所有的箱子,如果有多个可以装,向装完以后剩余空间最小的箱子装,

1.Suppose ALG is an α-approximation algorithm for an optimization problem Π whose approximation ratio is tight. Then for every ϵ>0 there is no (α−ϵ)-approximation algorithm for Π unless P = NP.

F

可能有更好的算法。这个tight是啥意思不知道。

2.As we know there is a 2-approximation algorithm for the Vertex Cover problem. Then we must be able to obtain a 2-approximation algorithm for the Clique problem, since the Clique problem can be polynomially reduced to the Vertex Cover problem.

F

规约只是说明是否有解。能否找到解并不知道。

3.For the bin-packing problem: let S=∑Si​​. Which of the following statements is FALSE?

A.The number of bins used by the next-fit heuristic is never more than ⌈2S⌉

B.The number of bins used by the first-fit heuristic is never more than ⌈2S⌉

C.The next-fit heuristic leaves at most one bin less than half full

D.The first-fit heuristic leaves at most one bin less than half full

FF, BF, NF算法近似比都小于2, C不对,因为next-fit算法不允许放入之前的盒子,只能放入当前的或者下一个,之前的可能有没有半满的。

4.To approximate a maximum spanning tree T of an undirected graph G=(V,E) with distinct edge weights w(u,v) on each edge (u,v)∈E, let’s denote the set of maximum-weight edges incident on each vertex by S. Also let w(E′​​)=∑​(u,v)∈E​′,w(u,v) for any edge set E′. Which of the following statements is TRUE?

A.S=T for any graph G

B.S≠T for any graph G

C.w(T)≥w(S)/2 for any graph G

D.None of the above

5.Assume that you are a real world Chinese postman, which have learned an awesome course “Advanced Data Structures and Algorithm Analysis” (ADS). Given a 2-dimensional map indicating N positions pi(xi,yi) of your post office and all the addresses you must visit, you’d like to find a shortest path starting and finishing both at your post office, and visit all the addresses at least once in the circuit. Fortunately, you have a magic item “Bamboo copter & Hopter” from “Doraemon”, which makes sure that you can fly between two positions using the directed distance (or displacement).

However, reviewing the knowledge in the ADS course, it is an NPC problem! Wasting too much time in finding the shortest path is unwise, so you decide to design a 2−approximation algorithm as follows, to achieve an acceptable solution.

Compute a minimum spanning tree T connecting all the addresses.
Regard the post office as the root of T.
Start at the post office.
Visit the addresses in order of a _____ of T.
Finish at the post office.
There are several methods of traversal which can be filled in the blank of the above algorithm. Assume that P≠NP, how many methods of traversal listed below can fulfill the requirement?

Level-Order Traversal
Pre-Order Traversal
Post-Order Traversal

A.0

B.1

C.2

D.3

6.An approximation scheme that runs in O ( n 2 / 3 ϵ ) O(n^2/3^\epsilon) O(n2/3ϵ) for any fixed ϵ>0 is
a fully polynomial-time approximation scheme.

1 / ϵ 1/\epsilon 1/ϵ取为N,如果算出来是多项式的,则是FPTAS

F

7.An approximation scheme that runs in O ( n 2 / ϵ ) O(n^2/\epsilon) O(n2/ϵ)​​for any fixed ϵ>0 is a polynomial-time approximation scheme.

如果n是多项式的,就是PTAS

T

8.In the bin packing problem, we are asked to pack a list of items L to the minimum number of bins of capacity 1. For the instance L, let FF(L) denote the number of bins used by the algorithm First Fit. The instance L′is derived from L by deleting one item from L. Then FF(L′) is at most of FF(L).

F, 可以举出反例。但是NF算法是T

9.For the 0-1 version of the Knapsack problem, if we are greedy on taking the maximum profit or profit density, then the resulting profit must be bounded below by the optimal solution minus the maximum profit.

T

po<pm+pg

10.An (1+ϵ)-approximation scheme of time complexity ( n + 1 / ϵ ) ​ 3 (n+1/ϵ)^​3 (n+1/ϵ)3is a PTAS but not an FPTAS.

F

11.The K-center problem can be solved optimally in polynomial time if K is a given constant.
T

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
《计算机操作系统(第4版)》学习指导与题解 含实验.pdf是一本关于计算机操作系统的学习指导和题解的电子书。这本书主要针对操作系统这个重要的计算机课程内容进行了详细的解释和讲解,对读者学习操作系统具有很大的帮助。 这本电子书的特点是结合了学习指导和题解,旨在帮助读者更好地理解和掌握操作系统的知识。书中通过讲解操作系统的基本概念、原理和技术,引导读者深入理解操作系统的工作原理和实现方法。同时,书中还提供了一些习题和实验,帮助读者巩固所学的知识,提升操作系统的实践能力。 这本电子书的内容丰富全面,涵盖了操作系统的各个方面。包括进程管理、内存管理、文件系统、输入输出管理等内容。每个章节都有详细的解释和示例,配有相关的习题和实验,可以帮助读者更好地理解和运用所学的知识。 对于计算机专业的学生和从事计算机相关工作的技术人员来说,这本电子书是一本很好的学习资料。通过学习这本书,读者可以全面了解和掌握操作系统的知识,提高自己的技能水平。同时,这本电子书还适合作为操作系统相关课程的参考教材,帮助教师更好地教授操作系统的知识。 总之,《计算机操作系统(第4版)》学习指导与题解 含实验.pdf 是一本内容丰富、有助于学习操作系统的电子书,对于学习操作系统或从事计算机相关工作的人士来说都是一本很有价值的学习资料。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值