Академический Документы
Профессиональный Документы
Культура Документы
ABSTRACT
Keywords
1.
PROPOSITIONAL LOGIC
1. Which of these sentences are propositions? What are
the truth values of those that are propositions?
(a) 2 + 3 = 5.
(a) q
(b) 5 + 7 = 10.
(b) p q
(c) x + 2 = 11.
(d) Answer this question.
2. What is the negation of each of these propositions?
(c) p q
(d) p q
(e) q p
(f) p q
(g) p q
(c) 2 + 1 = 3
(h) p (p q)
3.
(a) p q
PROPOSITIONAL EQUIVALENCES
(b) q r
(c) q r
(d) p q r
(e) (p r) (q r)
(f) (p q) (q r)
7. Explain, without using a truth table, why (p q r)
(p q r) is true when at least one of p, q, and
r is true and at least one is false, but is false when all
three variables have the same truth value.
8. The nth statement in a list of 100 statements is Exactly n of the statements in this list are false.
(a) What conclusions can you draw from these statements?
2.
8. Show that (s r) (q r) s q r.
9. Show that p (q r) r (q p).
10. Show that (p q) (r q) (p q) q r.
APPLICATION
1. Each inhabitant of a remote village always tells the
truth or always lies. A villager will give only a Yesor
a Noresponse to a question a tourist asks. Suppose
you are a tourist visiting this area and come to a fork
in the road. One branch leads to the ruins you want
to visit; the other branch leads deep into the jungle. A
villager is standing at the fork in the road. What one
question can you ask the villager to determine which
branch to take?
2. To use the wireless network in the airport you must
pay the daily fee unless you are a subscriber to the
service. Express your answer in terms of w: You can
use the wireless network in the airport, d: You pay
the daily fee, and s: You are a subscriber to the service.
Exercises 3 7 relate to inhabitants of the island of
knights and knaves created by Smullyan, where knights
always tell the truth and knaves always lie. You encounter two people, A and B. Determine, if possible,
what A and B are if they address you in the ways
described. If you cannot determine what these two
people are, can you draw any conclusions?
3. A says At least one of us is a knave and B says nothing.
4. A says The two of us are both knights and B says A
is a knave.
4.
5.
NESTED QUANTIFIERS
1. Translate these statements into English, where the domain for each variable consists of all real numbers.
(a) xy(x < y)
(b) xy(((x 0) (y 0)) (xy 0))
(c) xyz(xy = z)
(a) There is a student at CU who can speak Cantonese and who knows C++.
(b) There is a student at CU who can speak Cantonese but who doesnt know C++.
(c) Every student at CU either can speak Cantonese
or knows C++.
(a) xyQ(x, y)
(b) xyQ(x, y)
(d) xyQ(x, y)
(c) xyQ(x, y)
(a) P (0)
(b) P (1)
(c) P (2)
(d) P (1)
(e) xP (x)
(f) xP (x)
(a) xP (x)
(b) xP (x)
(c) xP (x)
(d) xP (x)
(e) xP (x)
(f) xP (x)
6.
REFERENCES
APPENDIX
A.
A.1
ANSWER
Propositional Logic
1. (a)
(b)
(c)
(d)
Yes, T
Yes, F
No
No
2. (a)
(b)
(c)
(d)
3. (a)
(b)
(c)
(d)
(e)
F
T
T
T
T
r p
p q r
r (q p)
q p r
(q (r p)) ((r p) q)
(p r) q
6. (a) If you have the flu, then you will miss the final
exam.
(b) Not missing the final exam is necessary and sufficient for passing the course. OR: You will pass the
course if and only if you dont miss the final exam
(c) If you miss the final, you will not pass the course.
(d) You have the flu, or you miss the final, or you pass
the course.
(e) If you have the flu, then you will not pass the
course, or, if you miss the final, you will not pass
the course.
(f) You have the flu and miss the final exam, or you
dont miss the final exam and pass the course.
7. The first clause is true if and only if at least one of p,
q, and r is true. The second clause is true if and only
if at least one of the three variables is false. Therefore
8. (a) The 99th statement is true and the rest are false.
(b) Statements 1 through 50 are all true and statements 51 through 100 are all false.
(c) This cannot happen; it is a paradox, showing that
these cannot be statements.
A.2
Application
A.3
Propositional Equivalences
1.
T
T
F
F
T
F
T
F
T
F
F
F
T
T
T
T
2. It is a tautology.
(q (p q)) p
(q (p q)) p
q (p q)) p
q (p q) p
((q p) (q q)) p
((q p) T ) p
q p p T
3. If both q and r are false, (pq) and (pr) is opposite,
then (q r) (p q) (p r) is tautology,
so (q r) ((p q) (p r)) is tautology, and
(p q) (p r) (q r) is tautology.
Or:
(p q) (p r) (q r)
(p q) (p r) (q r)
(p q) (p r) (q r)
(p q) q (p r) r
((p q) (q q)) (p r) r
((p q) T ) ((p r) (r r))
(p q) ((p r) T )
p q p r
(p p) q r T
4. ((p F ) (q T )) p
(p q) p
(p p) (q p)
T (q p)
q p
qp
5. (p) (r q)
(p) (r q)
p (r q)
r (p q)
((r)) (p q)
(r) (p q)
(r) (((p)) q)
(r) ((p) q)
6. p (r q)
p (r q)
p (r q)
(p q) r
(p q) r
7. (p q) (p r)
(p q) (p r)
(p p) (q r)
p (q r)
8. LHS (s r) (q r)
(s q) r
(s q) r
(s q) r RHS
9. p (q r)
p (q r)
p (q r)
r (q p)
r (q p)
10. (p q) (r q) (p q)
(q p) (q p) (r q)
(q (p p)) (r q)
(q F ) (r q)
q (r q)
(q r) (q q)
(q r) F q r
11. (p (p q)) q
(p (p q)) q
(p (p q)) q
((p p) (p q)) q
p q q T
12. ((p q) (q r)) (p r)
((p q) (q r)) (p r)
((p q) (q r)) (p r)
((p p) (q p)) (q r)) r
(q p) ((q r) (r r))
q p q r T
13. (p (p q)) q
(p (p q)) q
p (p q) q
((p p) (p q) q
p q q T
A.4
1. (a)
(b)
(c)
2. (a)
3.
4.
5.
6.
7.
8.
9.
T
T
F
There is a student who spends more than 5 hours
every weekday in class.
(b) Every student spends more than 5 hours every weekday in class.
(c) There is a student who does not spend more than
5 hours every weekday in class.
(d) No student spends more than 5 hours every weekday in class.
(a) Every comedian is funny.
(b) Every person is a funny comedian.
(c) There exists a person such that if she or he is a
comedian, then she or he is funny.
(d) Some comedians are funny.
(a) x(P (x) Q(x))
(b) x(P (x) Q(x))
(c) x(P (x) Q(x))
(d) x(P (x) Q(x)
(a) T
(b) T
(c) F
(d) F
(e) T
(f) F
(a) P (0) P (1)
(b) P (0) P (1)
(c) P (0) P (1)
(d) P (0) P (1)
(e) (P (0) P (1))
(f) (P (0) P (1))
Many answers are possible.
(a) All students in CSCI3190; all students in the world
(b) All members of the Legislative Council; all students
in CSCI3190
(c) Tan Sri Dr Runme Shaw and Sir Run Run Shaw;
all members of the Legislative Council
(d) Sir Donald Tsang Yam-kuen and Leung Chun-ying;
all students in the world
(a) There is no counterexample.
(b) x = 0
(c) x = 2
They are not equivalent. Let P (x) be any propositional function that is sometimes true and sometimes
false, and let Q(x) be any propositional function that
is always false. Then x(P (x) Q(x)) is false but
xP (x) xQ(x) is true.
A.5
Nested Quantifiers