0% found this document useful (0 votes)
24 views6 pages

Sheet 5

The document provides steps for using resolution to prove a statement from given facts. It first converts the facts to first-order logic, then to conjunctive normal form. It negates the statement to be proved and applies resolution to derive a contradiction, proving the original statement.

Uploaded by

arwam2734
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views6 pages

Sheet 5

The document provides steps for using resolution to prove a statement from given facts. It first converts the facts to first-order logic, then to conjunctive normal form. It negates the statement to be proved and applies resolution to derive a contradiction, proving the original statement.

Uploaded by

arwam2734
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

1-Apply Modus Ponens to statements 1 and 3 in the following list

of premises (that is, statements that we take to be true).


1. (p q)→(r ~s)
2. ~r→s
3. p q

Solution

Notice that all the statements are compound statements, and that they
have the following patterns:
1. A→B
2. C
3. A.
Statement A appears twice; in lines (1) and (3). Looking at Modus Ponens, we
see that we can deduce B = r ~s from these lines.
1. (p q)→(r ~s) Premise
2. ~r→s Premise
3. p q Premise
4. r (~s) 1,3 Modus Ponens

we refer to it as a proof of the argument


(p q)→(r ~s) Premise
~r→s Premise
p q Premise

r (~s) Conclusion

2- Apply Modus Tollens to the following premises:

1. (p q)→(r ~s)
2. ~(r ~s)
3. (p q)→p

Solution
Looking at the given premises, we see the pattern:
1. A→B
2. ~B
3. A→C

As a rule of inference, Modus Tollens has the following form:

A→B
~B

~A
1. (p q)→(r ~s) Premise
2. ~(r ~s) Premise
3. (p q)→p Premise
4. ~(p q) 1,2 Modus Tollens

3- Write the statement with FOL form


“All lions are fierce.”

“Some lions do not drink coffee.”

“Some fierce creatures do not drink coffee.”

solution

4- 1. All birds fly.


In this question the predicate is "fly(bird)."
And since there are all birds who fly so it will be represented as
follows.
∀x bird(x) →fly(x).
5- 2. Every man respects his parent.
In this question, the predicate is "respect(x, y)," where x=man, and
y= parent.
Since there is every man so will use ∀, and it will be represented as
follows:
∀x man(x) → respects (x, parent).
6- 3. Some boys play cricket.
In this question, the predicate is "play(x, y)," where x= boys, and y=
game. Since there are some boys so we will use ∃, and it will be
represented as:
∃x boys(x) → play(x, cricket).
7- 4. Not all students like both Mathematics and Science.
In this question, the predicate is "like(x, y)," where x= student, and
y= subject.
Since there are not all students, so we will use ∀ with negation, so
following representation for this:
¬∀ (x) [ student(x) → like(x, Mathematics) ∧ like(x,
Science)].
8- 5. Only one student failed in Mathematics.
In this question, the predicate is "failed(x, y)," where x= student, and
y= subject.
Since there is only one student who failed in Mathematics, so we will
use following representation for this:
∃(x) [ student(x) → failed (x, Mathematics) ∧∀ (y) [¬(x==y)
∧ student(y) → ¬failed (x, Mathematics)].
9-

Steps for resolution:


1. Conversion of facts into first-order logic.
2. Convert FOL statements into CNF
3. Negate the statement which needs to prove (proof by contradiction)

Exercise 1:

a. John likes all kind of food.


b. Apple and vegetable are food
c. Anything anyone eats and not killed is food.
d. Anil eats peanuts and still alive
e. Harry eats everything that Anil eats.

Prove by resolution that:

John likes peanuts.

ans

Step-1: Conversion of Facts into FOL

In the first step we will convert all the given statements into its first order logic.

Step-2: Conversion of FOL into CNF

o Eliminate all implication (→) and rewrite


a. ∀x ¬ food(x) V likes(John, x)
b. food(Apple) Λ food(vegetables)
c. ∀x ∀y ¬ [eats(x, y) Λ ¬ killed(x)] V food(y)
d. eats (Anil, Peanuts) Λ alive(Anil)
e. ∀x ¬ eats(Anil, x) V eats(Harry, x)
f. ∀x¬ [¬ killed(x) ] V alive(x)
g. ∀x ¬ alive(x) V ¬ killed(x)
h. likes(John, Peanuts).
o Move negation (¬)inwards and rewrite
. ∀x ¬ food(x) V likes(John, x)
a. food(Apple) Λ food(vegetables)
b. ∀x ∀y ¬ eats(x, y) V killed(x) V food(y)
c. eats (Anil, Peanuts) Λ alive(Anil)
d. ∀x ¬ eats(Anil, x) V eats(Harry, x)
e. ∀x ¬killed(x) ] V alive(x)
f. ∀x ¬ alive(x) V ¬ killed(x)
g. likes(John, Peanuts).
o Rename variables or standardize variables
. ∀x ¬ food(x) V likes(John, x)
a. food(Apple) Λ food(vegetables)
b. ∀y ∀z ¬ eats(y, z) V killed(y) V food(z)
c. eats (Anil, Peanuts) Λ alive(Anil)
d. ∀w¬ eats(Anil, w) V eats(Harry, w)
e. ∀g ¬killed(g) ] V alive(g)
f. ∀k ¬ alive(k) V ¬ killed(k)
g. likes(John, Peanuts).

o Drop Universal quantifiers.

In this step we will drop all universal quantifier since all the statements are
not implicitly quantified so we don't need it.

a. ¬ food(x) V likes(John, x)
b. food(Apple)
c. food(vegetables)
d. ¬ eats(y, z) V killed(y) V food(z)
e. eats (Anil, Peanuts)
f. alive(Anil)
g. ¬ eats(Anil, w) V eats(Harry, w)
h. killed(g) V alive(g)
i. ¬ alive(k) V ¬ killed(k)
j. likes(John, Peanuts).
o Step-3: Negate the statement to be proved
In this statement, we will apply negation to the conclusion statements,
which will be written as ¬likes(John, Peanuts)

You might also like