Question: 2 . A clause ( i . e . a disjunction of literals ) is called a Horn clause, if it contains at most one
A clause ie 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; eg
eg x vee y vee
eg z vee
eg u is equivalent to
x wedge z wedge urightarrow 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 NPcompleteness for SAT, it was shown how to construct, for every nondeterministic Turing machine M integer k and a string x a Boolean expression phifx which is satisfiable if and only if M accepts x in at most nk 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.
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
