The decision version of the Vertex Cover problem is:
Correct Answer: B. NP-Complete
Explanation: The Vertex Cover problem is a classic NP-Complete problem, which means: 1) It is in NP (solutions can be verified in polynomial time) 2) Every problem in NP can be reduced to it in polynomial time This makes it one of the fundamental problems in computational complexity theory.
What is the objective of the Vertex-Cover problem?
Correct Answer: A. Cover all edges with minimum number of vertices
Explanation: In the Vertex Cover problem, we need to find the smallest set of vertices such that every edge in the graph has at least one endpoint in this set. The goal is to "cover" all edges while using the minimum number of vertices. This is distinct from edge cover, which covers all vertices with edges.
Which of the following algorithms can approximate the Vertex Cover within a factor of 2?
Correct Answer: B. Greedy Matching
Explanation: The Greedy Matching approach for Vertex Cover works by repeatedly selecting an edge and including both its endpoints in the solution, then removing all edges incident to these vertices. This simple algorithm guarantees a 2-approximation, meaning the solution is at most twice the size of the optimal vertex cover.
The Set Covering Problem is:
Correct Answer: B. NP-Hard
Explanation: The Set Covering Problem is NP-Hard, which means it's at least as hard as the hardest problems in NP. In fact, it's one of the original 21 NP-complete problems identified by Richard Karp in 1972. This classification explains why we typically use approximation algorithms for solving it.
The Set Covering Problem involves:
Correct Answer: A. Covering all elements with the minimum number of sets
Explanation: In the Set Covering Problem, we have a universe of elements U and a collection of subsets S of U. The goal is to find the smallest sub-collection of sets from S whose union equals the universe U. In other words, we want to select the minimum number of sets that cover all elements.
Greedy algorithm gives a logarithmic approximation ratio for which problem?
Correct Answer: B. Set-Cover
Explanation: For the Set Cover problem, the standard greedy algorithm (which repeatedly selects the set that covers the most uncovered elements) achieves a logarithmic approximation ratio of ln(n) where n is the number of elements. This is notably better than the linear approximation of many other NP-hard problems, but it has been proven that this logarithmic approximation is essentially the best possible unless P=NP.
The First-Fit heuristic for Bin Packing has an approximation factor of:
Correct Answer: B. 2
Explanation: The First-Fit algorithm for Bin Packing has an approximation factor of 2, meaning it will never use more than twice the optimal number of bins. This makes it a decent practical algorithm despite its simplicity. The First-Fit Decreasing variant (which sorts items by decreasing size first) performs even better with an approximation factor of 11/9 ≈ 1.22.
The Bin Packing Problem is classified as:
Explanation: The Bin Packing Problem is NP-Hard, which means finding an exact solution is computationally intractable for large inputs. The decision version ("Can all items be packed in k bins?") is NP-Complete, but the optimization version ("What is the minimum number of bins needed?") is NP-Hard. This explains why approximation algorithms and heuristics are commonly used for practical applications.
Which strategy places each item in the first bin that has enough space?
Correct Answer: B. First-Fit
Explanation: The First-Fit algorithm scans through bins in order and places each item in the first bin that can accommodate it. If no such bin exists, it opens a new bin. This differs from Best-Fit (which chooses the bin with minimal remaining capacity) and Next-Fit (which only checks the most recently used bin).
Which of the following is true for the Bin Packing Problem?
Correct Answer: C. Exact solution requires exponential time
Explanation: Finding the exact solution to the Bin Packing Problem requires exponential time (unless P=NP), as it's an NP-Hard problem. This is why approximation algorithms are so important in practice. Many polynomial-time approximation algorithms exist with different approximation ratios, and the problem is known to be APX-hard, meaning it cannot be approximated arbitrarily well in polynomial time unless P=NP.