130 likes | 611 Views
Conversion to CNF. Everyone who loves all animals is loved by someone x [y Animal(y) Love(x,y)] y Love(y,x) x ¬[ y Animal(y) Love(x,y)] y Love(y,x) x y ¬[ Animal(y) Love(x,y)] y Love(y,x) x y[ ¬ Animal(y) ¬ Love(x,y)] y Love(y,x)
E N D
Conversion to CNF • Everyone who loves all animals is loved by someone • x [y Animal(y) Love(x,y)] y Love(y,x) • x ¬[y Animal(y) Love(x,y)] y Love(y,x) • x y ¬[Animal(y) Love(x,y)] y Love(y,x)x y[¬Animal(y) ¬Love(x,y)] y Love(y,x) • x y ¬Animal(y) ¬Love(x,y) z Love(z,x) • x ¬Animal(C1) ¬Love(x,C1) Love(C2,x) • ¬Animal(C1) ¬Love(x,C1) Love(C2,x) ECE457 Applied Artificial Intelligence R. Khoury (2007) Page 1
Conversion to CNF • There is a book which everyone buys only if there is a class that requires it • x Book(x) {[y Buy(y,x)] [y Class(y) Requires(y,x)]} • x Book(x) {[y Buy(y,x)] [y Class(y) Requires(y,x)]} {[y Class(y) Requires(y,x)] [y Buy(y,x)]} • x Book(x) {¬[y Buy(y,x)] [y Class(y) Requires(y,x)]} {¬[y Class(y) Requires(y,x)] [y Buy(y,x)]} • x Book(x) {[y ¬Buy(y,x)] [y Class(y) Requires(y,x)]} {[y ¬Class(y) ¬Requires(y,x)] [y Buy(y,x)]} • x Book(x) {y ¬Buy(y,x) [z Class(z) Requires(z,x)]} {[z ¬Class(z) ¬Requires(z,x)] y Buy(y,x)} • Book(C1) {¬Buy(C2,C1) [Class(C3) Requires(C3,C1)]} {[z ¬Class(z) ¬Requires(z,C1)] y Buy(y,C1)} • Book(C1) {¬Buy(C2,C1) [Class(C3) Requires(C3,C1)]} {¬Class(z) ¬Requires(z,C1) Buy(y,C1)} • Book(C1) [¬Buy(C2,C1) Class(C3)] [¬Buy(C2,C1) Requires(C3,C1)] [¬Class(z) ¬Requires(z,C1) Buy(y,C1)] ECE457 Applied Artificial Intelligence R. Khoury (2007) Page 2