Вы находитесь на странице: 1из 29

Translation tips

Assume the domain of all integers


Let E(x) stand for x is even
Translate the following into well-formed formulas:

Every integer is even


Restate it as : For every object x in the universe, x is even
Answer : (x)(E(x))

AI & CV Lab, SNU

NOT
NO
ALL
SOME

ONLY

AI & CV Lab, SNU

NOT NO ALL SOME ONLY

Not every integer is even


Restate it as : It is not the case that every integer is even
Answer : (x)(E(x))

or it can also be interpreted as


: For some object x in the universe, x is not even
Answer : ( x) (E(x))

E26 (x)A(x) (x)A(x)

AI & CV Lab, SNU

NOT NO ALL SOME ONLY

No integer is even
Restate it as : For every object x in the universe, x is not even
Answer : (x) (E(x))

or it can also be interpreted as


: It is not the case that some integer is even
Answer : ( x) (E(x))

E25 (x)A(x) (x)A(x)


AI & CV Lab, SNU

NOT NO ALL SOME ONLY

Assume the domain of real numbers


Let I(x) stand for x is an integer
E(x) stand for x is even
Translate the following into well-formed formulas:

All integers are even


Restate it as : For every object x in the universe, ?

AI & CV Lab, SNU

NOT NO ALL SOME ONLY

All integers are even


Restate it as : For every object x in the universe, if it is integer, then it
is even
right answer : (x) [I(x) E(x)]
Restate it as : For every object x in the universe, it is integer and it is
even
wrong answer : (x) [I(x) E(x)]
Description
: We are interested in not any arbitrary objects but a specific type of
objects, that is integers. But x means for any object in the
universe so we must say for any object in the universe, if it is
integer we narrow it down to integers.
AI & CV Lab, SNU

NOT NO ALL SOME ONLY

Assume the domain of real numbers


Let I(x) stand for x is an integer
E(x) stand for x is even
Translate the following into well-formed formulas:

Some integers are even


Restate it as : There are objects x in the universe, ?

AI & CV Lab, SNU

NOT NO ALL SOME ONLY

Some integers are even


Restate it as : There are objects x in the universe that are integer and
even
right answer : ( x) [I(x) E(x)]
Restate it as : For some object in the universe, if it is integer then it is
even
wrong answer : ( x) [I(x) E(x)]
Description
: The former asserts that an even integer exists, while the later does
not assert the existence of such an integer. It is a hypothetical
statement.

AI & CV Lab, SNU

NOT NO ALL SOME ONLY

Assume the domain of real numbers


Let I(x) stand for x is an integer
E(x) stand for x is even
Translate the following into well-formed formulas:

Only integers are even


Is equivalent to If it is even, then it is integer thus (x) [E(x) I(x)]

Integers are even only


Is equivalent to If it is integer, then it is even thus (x) [I(x) E(x)]

AI & CV Lab, SNU

10

Exercise
1. Logic, Proofs

Exercise 1.
1. Let p, q, and r be the propositions
p : You have the flu.
q : You miss the final examination
r : You pass the course
Express each of these propositions as an English sentence.
(a) (pr)(qr)
(b) (pq) (qr)
Answer
(a) (pr) : If you have the flu, then you cannot pass the course.
(qr) : If you miss the final examination, then you cannot pass the
course.
(pr)(qr)
: It is either the case that if you have the flu then you cannot pass
the course or the case that if you miss the final exam then you
cannot pass the course.
AI & CV Lab, SNU

12

Exercise 1.
1. Let p, q, and r be the propositions
p : You have the flu.
q : You miss the final examination
r : You pass the course
Express each of these propositions as an English sentence.
(a) (pr)(qr)
(b) (pq) (qr)
Answer

(b)

(pq)

: you have the flu and miss the final examination

(qr) : you dont miss the final examination and you pass the course
(pq) (qr)
: Either you have the flue and miss the final exam, or you dont
miss the final exam and do pass the course.

AI & CV Lab, SNU

13

Exercise 2.
2. Let p, q, and r be the propositions
p : You get an A on the final exam.
q : You do every exercise in this book
r : You get an A in this class
Write these propositions using p, q and r and logical connectives.
Answer
(a) You get an A on the final, but you dont do every exercise in this book;
nevertheless, you get an A in this class.
You get an A on the final : p

You dont do every exercise in this book : q


You get an A in this class : r
but, nevertheless :
p q r
AI & CV Lab, SNU

14

Exercise 2.
2. Let p, q, and r be the propositions
p : You get an A on the final exam.
q : You do every exercise in this book
r : You get an A in this class
Write these propositions using p, q and r and logical connectives.
Answer
(b) Getting an A on the final and doing every exercise in this book is sufficient
for getting an A in this class.
Getting an A on the final : p

and :
Doing every exercise in this book : q
sufficient for :
Getting an A in this class : r

(p q) r
AI & CV Lab, SNU

15

Exercise 3.
3. Assume the domain of all people.
Let J(x) stand for x is a junior,
S(x) stand for x is a senior,
and L(x, y) stand for x likes y.
Translate the following into well-formed formulas:
Answer
(a) All people like some juniors.
(x)(y) ?
(y)(J(y)L(x,y))

Recall; Some integers are even : ( x) [I(x) E(x)]

(x)(y)(J(y)L(x,y))

AI & CV Lab, SNU

16

Exercise 3.
3. Assume the domain of all people.
Let J(x) stand for x is a junior,
S(x) stand for x is a senior,
and L(x, y) stand for x likes y.
Translate the following into well-formed formulas:
Answer
(b) Some people like all juniors.
(x)(y) ?
(y)(J(y)L(x,y))

Recall; All integers are even : (x) [I(x) E(x)]

(x)(y)(J(y)L(x,y))

AI & CV Lab, SNU

17

Exercise 3.
3. Assume the domain of all people.
Let J(x) stand for x is a junior,
S(x) stand for x is a senior,
and L(x, y) stand for x likes y.
Translate the following into well-formed formulas:
Answer
(c) Only seniors like juniors.
(x)(y) ?

Recall; Only integers are even : (x) [E(x) I(x)]

(x)(y)((J(y)L(x,y)) S(x))

AI & CV Lab, SNU

18

Exercise 4.
4. Let B(x) stand for x is a boy, G(x) stand for x is a girl,
and T(x,y) stand for x is taller than y.
Complete the well-formed formula representing the given
statement by filling out ? part.
Answer
(a) Only girls are taller than boys: (?)(y)((? T(x,y)) ?)

(x)(y)((B(y) T(x,y)) G(x))

Recall; Only seniors like juniors.


:(x)(y)((J(y)L(x,y)) S(x))

AI & CV Lab, SNU

19

Exercise 4.
4. Let B(x) stand for x is a boy, G(x) stand for x is a girl,
and T(x,y) stand for x is taller than y.
Complete the well-formed formula representing the given
statement by filling out ? part.
Answer
(b) Some girls are taller than boys: (x)(?)(G(x) (? ?))

Some people are taller than boys


: (x)(y)((B(y) T(x,y))

Recall; some people like all juniors


: (x)(y)(J(y)L(x,y))

(x)(y)(G(x) ((B(y) T(x,y)))

AI & CV Lab, SNU

20

Exercise 4.
4. Let B(x) stand for x is a boy, G(x) stand for x is a girl,
and T(x,y) stand for x is taller than y.
Complete the well-formed formula representing the given
statement by filling out ? part.
Answer
(c) Girls are taller than boys only: (?) (y)((G(x) ?) ?)
Recall; Only girls are taller than boys.
(x)(y)((B(y) T(x,y)) G(x))

(x)(y)((G(x) T(x,y)) B(y))

AI & CV Lab, SNU

21

Exercise 4.
4. Let B(x) stand for x is a boy, G(x) stand for x is a girl,
and T(x,y) stand for x is taller than y.
Complete the well-formed formula representing the given
statement by filling out ? part.
Answer
(d) Some girls are not taller than any boy: (x)(?)(G(x) (? ?))
some people are taller than any boy : (x)(y) (B(y) T(x,y))
some people are not taller than any boy : (x)(y) (B(y) T(x,y))
(x)(y)(G(x) (B(y) T(x,y)))

AI & CV Lab, SNU

22

Exercise 4.
4. Let B(x) stand for x is a boy, G(x) stand for x is a girl,
and T(x,y) stand for x is taller than y.
Complete the well-formed formula representing the given
statement by filling out ? part.
Answer
(e) No girl is taller than any boy: (?)(y)((B(y) ?) ?)
all people are not taller than any boy: (x)(y)((B(y)) T(x,y))
all girls are not taller than any boy: (x)(y)((G(x) B(y) ) T(x,y))
or (x)(y)(G(x)(B(y) T(x,y))
(x)(y)((B(y) G(x)) T(x,y))

AI & CV Lab, SNU

23

Exercise 5.
5. Prove formally using inference rules that R(PQ) logically follows
from (PQ), (QR), (PM), and M.
Answer
(1) PM

(2) M

(3) P

T , (1), (2) and I12

(4) PQ

(5) Q

T , (3), (4) and I10

(6) QR

(7) R

T , (5), (6) and I11

I11 : P , PQ Q

(8) R(PQ)

T , (4), (7) and I9

I9 : P , Q P Q

I12 : Q, PQ P
I10 : P , P Q Q

AI & CV Lab, SNU

24

Exercise 6.
6. Prove that if n is a positive integer, then n is a even if and only if
7n+4 is even
Answer
Prove if n is even, then 7n+4 is even
If n is even, then n = 2k where k {1, 2, 3, }
7n + 4 = 7 * 2k + 4 = 2(7k+2)
n is even
Prove if 7n+4 is even, then n is even
If n is odd, 7n+4 is odd
If n even (odd), then
7n+4 = 7(2k+1)+4
= 14k + 11
= 2(7k+5)+1
7n+4 is odd
From and , n is even if and only if 7n+4 is even
AI & CV Lab, SNU

25

Exercise 7.
7. Let P, Q, R and S be statement variables.
Prove formally the following.
(a) P Q, QR, RS P S
(b) P (PQ) Q
Answer
(a) PQ, QR, RS P S
(1) PQ

(2) QR

(3) RS

(4) PQ

T , (1) and E16

(5) QR

T , (2) and E16

(6) PR

T , (4), (5) and I13

(7) PS

T , (3), (6) and I13

E16 : PQ PQ
I13 : PQ , QR R

AI & CV Lab, SNU

26

Exercise 7.
7. Let P, Q, R and S be statement variables.
Prove formally the following.
(a) PQ, QR, RS P S
(b) P (PQ) Q
Answer
(b) P (PQ) Q
(1) P (PQ)

(2) P

T , (1) I1

I1 : P Q P

(3) PQ

T , (1) I2

I2 : P Q Q

(4) Q

T , (2), (3) and I10

I10 : P , PQ Q

AI & CV Lab, SNU

27

Exercise 8.
8. Show the following implication.
(a) (x)(P(x)Q(x)), (x)P(x) (x)Q(x)
(b) ((x)P(x) Q(a))(x)P(x)Q(a)
Answer
(a) (x)(P(x)Q(x)), (x)P(x) (x)Q(x)
(1)

(x)(P(x)Q(x))

(2)

(x)P(x)

(3)

P(a)

T, (2) U.S.

(4)

P(a)Q(a)

T, (1) U.S.

(5)

Q(a)

T, (3),(4) I10

(6)

(x)Q(x)

T, (5) E.G.

AI & CV Lab, SNU

I10 : P , PQ Q

28

Exercise 8.
8. Show the following implication.
(a) (x)(P(x)Q(x)), (x)P(x) (x)Q(x)
(b) ((x)P(x) Q(a))(x)P(x)Q(a)
Answer
(b) ((x)P(x) Q(a))(x)P(x)Q(a)
(1)

((x)P(x) Q(a))

(2)

(x)P(x) Q(a)

T, (1) E8

E8 : (PQ) P Q

(3)

(x)P(x)Q(a)

T, (2) E16

E16 : PQ P Q

AI & CV Lab, SNU

29

Вам также может понравиться