egcomparisonResProlog

egcomparisonResProlog - In CNF: 1. -p(var_x) | -q(var_x) |...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
# Comparison of backward chaining over horn clauses and resolution # theorem proving. Example covered in class. Prolog: z(X) :- p(X),q(X). p(Y) :- r(Y). q(Z) :- s(Z),t(Z). s(a). t(a). r(a). Goal is to prove z(a). z(X) :- p(X),q(X). X/a Prove p(a) p(a) :- r(a) Prove r(a) . .. yes Prove q(a) q(a) :- s(a),t(a) Prove s(a) . .. yes Prove t(a) . .. yes Logical sentences the Prolog sentences correspond to: 1. All X ((p(X) ^ q(X)) --> z(X)). 2. All Y ((r(Y) --> p(Y))). 3. All X ((s(Z) ^ t(Z)) --> q(Z)). 4. s(a). 5. t(a). 6. r(a).
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: In CNF: 1. -p(var_x) | -q(var_x) | z(var_x) 2. -r(var_y) | p(var_y) 3. -s(var_z) | -t(var_z) | q(var_z) 4. s(a). 5. t(a). 6. r(a). Goal: z(a)? Negation of goal: -z(a). p1: -z(a) p2: -p(var_x) | -q(var_x) | z(var_x) r: -p(a) | -q(a) p1: -p(a) | -q(a) p2: -r(var_y) | p(var_y) r: -r(a) | -q(a) p1: -r(a) | -q(a) p2: r(a). r: -q(a). p1: -q(a). p2: -s(var_z) | -t(var_z) | q(var_z). r: -s(a) | -t(a) p1: -s(a) | -t(a) p2: s(a). r: -t(a). p1: -t(a). p2: t(a). r: {}...
View Full Document

This note was uploaded on 10/22/2011 for the course CS CS 2710 taught by Professor Wiebe during the Fall '11 term at Pittsburgh.

Page1 / 2

egcomparisonResProlog - In CNF: 1. -p(var_x) | -q(var_x) |...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online