Sunteți pe pagina 1din 2

Western University

Computer Science Department


CS 2209A: Applied Logic for Computer Science
Fall 2012
Midterm
9:30am-11:15am, Wednesday, November 14, 2012
1. (7 points) Translate each of the following sentences into the language of propositional
calculus using the indicated letters for atomic sentences.
(a) Deductive logic does not provide a method for establishing the empirical truth
of the premises (P).
(b) John attends the ballet whenever he has the money for the ticket. (A,H)
(c) Two lines on the plane are parallel if and only if they never intersect. (P, I)
(d) A necessary condition for the business to succeed is to have a good plan and
target the market not covered by competitors.(S, P, M)
(e) A sufficient condition for the function f to have a minimum on [a, b] is that f is
continuous on (a, b) and f is continuous at both a and b. (M, C, A, B)
2. (12 points) Prove the validity (soundness) of the following argument using the laws
of propositional calculus (you dont have to mention the laws, but make sure to show
the proof in sufficient detail). Use S, I and M.
Premise 1. If knowing is a state of mind (like feeling a pain), then I could always tell
by introspection whether I know.
Premise 2. If I could always tell by introspection whether I know, then Id never
mistakenly think that I know.
Premise 3. I sometimes mistakenly think that I know.
Conclusion. Knowing isnt a state of mind.
3. (10 points) Prove by mathematical induction
(a) 1 + 2 + 3 + ... + n =

n(n+1)
2

(b) n! nn
4. (8 points) Find the disjunctive normal form of the following formula by using
a) the truth table method, and
b) the laws of propositional calculus (no need to name the laws)
(P Q) Q R
5. (8 points) Simplify each of the following formulas using Karnaugh maps. Clearly circle
the blocks that you use for simplification in the Karnaugh maps
(a) pqr pq
r pqr pqr
(b) pqr pq
r pqr pqr pq
r pqr
Continued on the next page

6. (8 points) Draw a circuit for each formula


(a) pq + pq
(b) abc + ab
c
7. (10 points) Let
E(x): x is an Earth-like planet.
L(x): x supports life.
Translate the following statements in the language of predicate calculus. The universe
of discourse is all numbers.
(a) Every life-supporting planet is Earth-like.
(b) Either all planets are Earth-like, or all of them support life.
(c) A planet is either Earth-like or it is not.
(d) All planets are Earth-like or all planets are not.
(e) Some planets are neither Earth-like nor support life.
8. (8 points) Let
Z(x): x is an integer.
N (x): x is negative.
P (x): x is positive.
S(x): square of x is positive.
Translate the following statements in the language of predicate calculus
(a) The square of every negative integer is positive.
(b) Not every integer is positive.
(c) No positive integer is negative.
(d) All integers are positive or no integers are positive.
9. (8 points) Translate each of the following formulas, of the Predicate Calculus into
idiomatic English, using the given interpretation for the constants, function symbols
and predicate symbols:
a=Alex
n=Nancy
P (x, y): x is a problem on exam y
E(x) : x is an exam
M (x): x is a man
W (x): x is a woman
S(x, y): x solves y
(a) x(E(x) y(P (y, x) S(a, y)))
(b) x(E(x) y(P (y, x) S(n, y)))
(c) x(W (x) yz(E(y) P (z, y) S(x, z)))
(d) x(M (x) yx(E(y) P (z, y) S(x, z)))

S-ar putea să vă placă și