Question: 2 . A clause ( i . e . a disjunction of literals ) is called a Horn clause, if it contains at most one

2. A clause (i.e. a disjunction of literals) is called a Horn clause, if it contains at most one positive literal. Such a clause can be written as an implication; e.g.(\(
eg x \vee y \vee
eg z \vee
eg u \)) is equivalent to
\[
(x \wedge z \wedge u)\rightarrow y
\]
HORNSAT is the problem of deciding whether a given Boolean formula, which is a conjunction of Horn clauses, is satisfiable.
(a) Show that there is a polynomial algorithm for solving HORNSAT. (Hint: if a variable is the only literal in the clause, it must be set to T ; if all the negative variables in the clause have been set to T , then the positive one must also be
set to T. Continue this procedure until a contradiction is reached or a satisfying assignment is found.)
(b) In the proof of the NP-completeness for SAT, it was shown how to construct, for every nondeterministic Turing machine \( M \), integer \( k \), and a string \( x \), a Boolean expression \(\phi=f(x)\), which is satisfiable if, and only if,\( M \) accepts \( x \) in at most \( n^{k}\) steps. Show that, if \( M \) is deterministic, then \(\phi \) can be chosen to be a conjunction of Horn clauses.
(c) Conclude from (b) that the problem HORNSAT is P complete.
2 . A clause ( i . e . a disjunction of literals

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!