Question
Transcribed Text
Exercise 1 (1 pt). Is the following Boolean formula satisfiable? If so, find a satisfying
assignment.
(aV bV d) ( a V b) (a V c V d) (b V c V d) ( a V d) ( c V d) ( b V d)
Exercise 2 (2 pts). Find the edit distance between HORSE and NORTH. Give a
dynamic-programming table for computating this distance.
Exercise 3 (2 pts). The 3-CLIQUE problem is defined as follows:
Input: <G> where G is a graph.
Question: Does G contain a clique of size 3?
Is this problem in P? Yes, no, unknown? Justify your answer (if your answer is "yes",
briefly describe a polynomial-time algorithm).
Exercise 4 (2 pts). Consider the following decision problem: Given a finite set of
integers, determine whether the set contains three integers that sum to zero. Is this
problem in P? Yes, no, unknown? Justify your answer (if your answer is "yes", briefly
describe a polynomial-time algorithm).
Exercise 5 (1 pt for each correct answer). For each of the following statements indicate
whether it is true, false, or unknown.
1.The SAT problem is in P.
2.The SAT problem is in NP.
3.The SAT problem is in EXP.
Exercise 6 (2 bonus points). Show that, if P = NP then there is a polynomial-time
algorithm that takes an undirected graph as input and finds a largest clique contained
in that graph.
Solution Preview
These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction
of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice.
Unethical use is strictly forbidden.
Yes, 3-CLIQUE problem is in P. Since it is a particular case of the more general problem (k-CLIQUE – which is NP-Complete) where k is a constant and is not part of the input (in that case it would be a function of n), it can be designed a brute-force algorithm in the following way:
- take each sub-graph with 3 vertices that can be formed from the original graph;
- verify whether it can be found a clique in each sub-graph...
This is only a preview of the solution. Please use the purchase button to see the entire solution