You are on page 1of 2

Exam

3 Prep:
1) Double SAT takes input, boolean function in CNF, outputs two distinct assignment of variables such that all clauses evaluate to true, reports No
if no such pair exists.
EG.
(x1 v X2) Ù x3 Double SAT could output following answer.
(X1, X2, X3) = (True, True, True )
(X1, X2, X3) = (True, True, False)
Prove Double SAT NP complete.
Answer:
Now, In the above given Double-SAT problem to prove it to be NP-Complete. We need to test following two scenarios.
1) Double-SAT ∈NP : Double-Sat can be verified in Polynomial Time for given input.
2) Double-SAT is NP Hard Problem : Reduce SAT to Double SAT in polynomial time which is also an NP-complete problem. Hence, Double SAT
is as hard as SAT.
Verification of the Above Two Requirement.
1) Double-SAT ∈ NP Problem:

For given CNF function f we can check in O(n) time if any clause is satisfied or not and in O(mn) time can be checked that (m) clause will be
satisfied or not. So, evaluating one solution will take O(m*n) time. So, for two solutions it will take 2* O(m*n) time. We also have to check
that two assignments are different. So, to check if two assignments are diff, it will take O(n) time. Hence, given CNF with the provided
assignment is satisfiable with Double-SAT problem can be verify in total time 2*O(m*n) + O(n) which is polynomial in nature. This proves
that Double SAT is of NP type.

2) Double -SAT is NP-Hard Problem:
To prove this, need to reduce SAT to Double -SAT problem. If that is done in polynomial time we can say that Double-SAT is NP-Hard.
(Note that as per Cook-Levin theorem SAT problem is NP-Complete)

Check f(SAT) is satisfiable ⟺F1(Double SAT) has literal assignment that m+1 clause satisfies.

a) F->F’ forward implication:
For reducing SAT -> Double -SAT we can follow as mentioned below.
i) For any SAT problem with n literals and m clauses add two more literals and clause (Z V𝒁 ) where z is not present in F .
ii) Here, New F1 = F ∧ (Z V 𝒁 ) and total clause m1 = (m + 1)
Adding clause (Z V𝒁 ) shall take O(1) time. Which is polynomial time.
b) F’-> F Reverse implication: Return No if Double SAT algorithm returns NO.
With the taken scenarios of literals Z or 𝒁 only one literal can be true. So for F’ to be satisfiable, there exist solution in
orginal m clauses present in F . In such case if we discard Z then F will have satisfiable assignment. This can be done O(1) time.
Which is polynomial time.
Correctness:
For SAT-> Double SAT. After adding clause (Z V 𝒁 ) With Z = 1 implication, 𝒁 becomes 0 and we have 2 satisfying assignments for
F’ evaluated to True for Double-SAT. With Z = 0 implication, 𝒁 becomes 1 and again we have 2 satisfying assignments for F’ evaluated
to True for Double-SAT.

If F belongs to SAT, then F has at least 1 satisfying assignment, and therefore F’ has at least 2 satisfying assignments as we can satisfy the new
clauses (Z V 𝒁) by assigning either Z=1 or Z= 0 to the new clause Z, so F’ ∈ Double-SAT.
Here, F ⟺F’ takes polynomial time only O(1). Hence, SAT can be reduced to Double-SAT (SAT-> Double-SAT). So, Double-SAT isn't easier
then SAT. So, Double-SAT is NP-Hard.
Hence, considering above two points it can be said that Double-SAT is NP & NP-Hard. Hence it can be said that Double-SAT is NP-Complete.

2) A flower is a graph on n+4 vertices such that n vertices form a clique and the other four form a star
connected to the clique by exactly one edge. The picture shows flowers of seven and eight vertices.
Consider the Flower problem:

Input: A graph G = (V;E) and an integer k > 0.


Output: A subset of k+4 vertices such that the induced subgraph is a flower, or report NO if such
subset does not exist.

Prove that the Flower problem is NP-complete.

Answer:
To prove that the flower problem is NP-complete, first we need to prove that the solution can be verified in polynomial time. Also
find the reduction from any known NP complete problem to Flower Problem in polynomial time. For that Here we can consider
reduction from clique to Flower problem in polynomial time.

1) Proof for NP:

This study source was downloaded by 100000783398912 from CourseHero.com on 07-03-2023 15:50:53 GMT -05:00

https://www.coursehero.com/file/188145213/Exam-3-Prep-1pdf/
Here with the given input graph G = (V,E) and integer k>0. Need to verify that flower is made of two parts one Clique of k vertices
set (C) and Star of 4 vertices (S) and star is connected to clique by exactly one edge. That can be verified in following steps.

Step-1: Here, first to check the clique is valid, We can check it by checking if there is edge between each clique vertex set
(CÌV, for all x,yÎC, x,yÎE) available in G or not. This shall take O(|V|^2) polynomial time.

Step 2: If the clique to be found valid then the number of vertices can be counted for it in O(|V|) time. If |Clique| = k is
validated then need to check that k+4 = |V|.

Step 3: After checking above Now to check that the remaining 4 vertices are connected to the clique by exactly one
edge and internally connected in such a way that make a star as shown in the problem statement. That can be verified in
O(|V|^2) polynomial time maximum.

Hence, to verify flower problem it takes total runtime O(|V|^2) which is polynomial time.

2) NP Hard Problem:
Here, now to prove that Flower problem is NP-Complete need to prove that Flower problem is at least as hard as any known NP-complete
problem.

To prove this, Clique problem can be reduced to flower problem. If that can be done in polynomial time, we can say that Flower
problem is as hard as Clique problem.

Step 1: Input, Forward Implication (Clique Problem -> Flower Problem)
Given G = (V,E) and k no of vertices in the Clique Set.
We additionally create 4 more vertices.
These four vertices are connected with each other and with Clique in such a way that creates a graph G' = (V',
E') where there is one center vertices(Vc) which is connected to another three vertices through only one edge. (Vc,V'i(i=1,2,3)ÎC,
Vc,V'iÎE', (V'i, V'i ÏE')). Moreover this central vertices is connected to any one vertices of the G=(V,E) that is Clique (|Vc, Vi| =1)
These can be done in maximum O(|V|+4) ~ O(|V|) time. Which is polynomial time.

Step2 : Output, Reverse Implication (Flower Problem-> Clique Problem)
To get Clique from Flower problem just need to remove the star connected to clique.
This returns G(V,E) and it shall take O(1) polynomial time.

Hence, it can be said that solution for Flower problem exists if and only if Solution for Clique exists

Check Correctness:
Hence, if we found clique in the flower problem, just by adding the star with connected to Clique with only one edge
will give solution for Flower problem. If there is no solution for the clique with |V|-4 vertices than the flower problem will not
be having required arrangement. Hence no solution for flower problem could be achieved.
This proves that Flower problem can be verified in NP and it is as Hard as Clique which is NP- complete. Hence
Flower problem is NP Complete.

MCQ:
Consider LP
Min 2X1 –X2
X1<= X2
X1-2<=1
-X1+2<=1
X1,X2>=0

Q3: Function minimized in dual LP will be
a) Y1-y2+2y3-2y4
b) 3y2-y3
c) y1+3y2-3y3
d) y2-y3

Q4: WRT above primal LP is unbounded? T or F
Q5: WRT above primal LP is Feasible? T or F
Q6: Dual of this primal is infeasible? T or F
Q7: A bounded and feasible LP always achieves optimal value at boundry of feasible region. T or F
Q8: Let x* be point in the feasible region of bounded LP such that CtX*<=BtY all y in feasible region of the dual LP. Then X* must be optimal point of Primal LP. T or F
Q9: LP with feasible bounded region can have a bounded objective function? T or F

Q10: You are given A,B,C such that A is in Class P. B is in NP-Complete and C is not known to be in class NP. You are told that A reduces to B and B reduces to C. Check all that
apply.
1) If S is a candidate solution an instance I for problem C, we can check in poly time if S is indeed a solution
2) A reduces to C
3) A is in class NP
4) C is NP hard.
This study source was downloaded by 100000783398912 from CourseHero.com on 07-03-2023 15:50:53 GMT -05:00

https://www.coursehero.com/file/188145213/Exam-3-Prep-1pdf/
Powered by TCPDF (www.tcpdf.org)

You might also like