Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

3-cnf-sat with a twist question

If you change the 3-cnf-sat problem as follows:
For each ci, ci = -xi1 OR -xi2 OR xi3 meaning exactly one of the variables appears without a negation.
You are also given values (0 or 1) to some (or all) of the x's.
You should be able to solve the problem (finding values of the x's that satisfy the problem or prove that it is unsatisfiable) in polynomial time.

  1. What is a polynomial running time algorithm that solves this problem?
  2. Prove that it runs in polynomial time.

hint: show that ci = -xi1 OR -xi2 OR xi3 is equal to c = (xi1 AND -xi2) -> xi3

like image 657
Madcapslaugh Avatar asked Dec 01 '25 04:12

Madcapslaugh


1 Answers

The formulas you describe are a subset of Horn formulas. The satisfiability problem is thus no harder than Horn satisfiability and admits the same linear-time solution.

like image 186
Kyle Jones Avatar answered Dec 02 '25 20:12

Kyle Jones



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!