Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
643 views
in Technique[技术] by (71.8m points)

logic - Satisfiability with DP and DPLL yields different results

I have the following clauses:

1. {P,Q,~R}
2. {~P,R}
3. {P,~Q,S}
4. {~P,~Q,~R}
5. {P,~S}

I have to prove the satisfiability using DP and DPLL separately. The problem is that I am getting different results for each algorithm. With DP:

1. {P,Q,~R}
2. {~P,R}
3. {P,~Q,S}
4. {~P,~Q,~R}
5. {P,~S}
6. {Q} from 1 and 2

2. {~P,R}
3'. {P,S}
4'. {~P,~R}
5. {P,~S}
7. {P} from 3' and 5

2. {R}
4'. {~R}
8. {}

So it is unsatisfiable. But with DPLL:

1. {P,Q,~R}
2. {~P,R}
3. {P,~Q,S}
4. {~P,~Q,~R}
5. {P,~S}
6. {P} split(P)

2'. {R}
4'. {Q,~R}

7.{Q}

Which would mean it is satisfiable... What did I do wrong?

question from:https://stackoverflow.com/questions/65857819/satisfiability-with-dp-and-dpll-yields-different-results

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

In the first inference in DP, the resolution rule is not applied correctly. Let's focus of the inference of 6. {Q} from 1 and 2 from 1. {P,Q,~R} and 2. {P,Q,~R}. The assignment of P, Q, and R to false satisfies {P,Q,~R} and {~P,R}, but it does not satisfy {Q} which the inference is are claiming is entailed by the previous two. The possible resolvents of {P,Q,~R} and {~P,R} are:

  • {Q, ~R, R} by resolving on P
  • {P, Q, ~P} by resolving on R

Both of these clauses are always true and are discarded by DP. (Discarding is sometimes called the tautology rule.) These do not entail {Q} as shown in the previous counter example.

Also note that on the DPLL example, you have assigned P, R, Q to true. This is inconsistent with clause 4. {~P,~Q,~R}. Unit propagation needs to be applied exhaustively for this split.

You can find many presentations of DP and DPLL online. Examples: 1, 2. Try to apply the rules consistently and exhaustively.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...