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