Question: 3 . The hitting set problem takes in a set ( X ) , a family ( F ) of subsets
The hitting set problem takes in a set X a family F of subsets of X and an integer k and returns whether there is some subset of X of size k that overlaps every element of F For example, if X F and k the set is a solution, since overlaps the first two sets in F hits them and overlaps the other two.
The CNF Satisfiability problem SAT takes in a Boolean expression in CNF and returns whether that expression is satisfiable. A Boolean expression in CNF has a set of clauses joined by "ands," where each clause is literals joined by "ors."
Answer the following questions about the reduction algorithm below.
Input: C: set of clauses in CNF form literals per clause
Input: n: number of variables in the clauses
Input: m: number of clauses
Output: whether there is some assignment of variables mp@subsupvmp@subsupvldotsmp@subsupvnmathrm such
that every clause in C is satisfied by at least one of its three literals
Algorithm: HittingSetReduction
X ;
F ;
kn;
for i to n do
Add vi and
Add mp@subsupvioverlinev
end
for i to m do
Let c be the literals in Ci;
Add c to F;
end
return HittingSetXFk;
a points What is the worstcase time complexity for HittingSetReduction? Justify your answer.
b points Does HittingSetReduction prove that Hitting Set is NPHard if SAT is NPHard, or does it prove that SAT is NPHard if Hitting Set is NPHard? Justify your answer.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
