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.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…