Uploaded by panther1315

Chapter1 Sample Questions

advertisement
In this chapter, here are 12 sample questions with solutions.
Part1 and Part2 Propositional Logic
Q1. Determine whether each of these conditional statements is true or false.
a) If 1+1=3, then unicorns exist.
b) If 1+1=3, then dogs can fly.
c) If 1+1=2, then dogs can fly.
d) If 2+2=4, then 1+2=3.
Solution:
a) This is 𝐹 → 𝐹, which is true.
b) This is 𝐹 → 𝐹, which is true.
c) This is 𝑇 → 𝐹, which is false.
d) This is 𝑇 → 𝑇, which is true.
Q2. For each of these sentences, determine whether an inclusive or, or and exclusive or,
is intended. Explain your answer.
a) Experience with C++ or Java is required
b) Lunch includes soup or salad as a choice for the side dish.
c) To enter the country, you need a passport or a voter registration card.
d) Publish or perish.
e) Coffee or tea comes with dinner.
Solution:
a) The employer making this request would be happy if the applicant knew both of
these languages, so this is clearly an inclusive or.
b) The restaurant would probably charge extra if the dinner wanted both these items, so
this is an exclusive or.
c) If a person happened to have both forms of identification, so much the better, so this
is an inclusive or.
d) This could be argued either way, but the inclusive interpretation seems more
appropriate. This phrase means that faculty members who do not publish papers in
research are likely to be fired from their jobs during the probationary period. On the other
hand, it may happen that they will be fired even if they do publish (e.g. their teaching is
poor).
e) Exclusive or: you get only one beverage.
Q3. How many rows appear in a truth table for each of these compound propositions?
a) (𝑞 → ¬𝑝) ∨ (¬𝑝 → ¬𝑞)
b) (𝑝 → 𝑟) ∨ (¬𝑠 → ¬𝑡) ∨ (¬𝑢 → 𝑣)
Solution:
A truth table will need 2𝑛 rows if there are 𝑛 variables.
a). 22 = 4
b). 26 = 64
Part3 Propositional Equivalence
Q1. The dual of a compound proposition that contains only the logical operators ∧,∨, and
¬ is the compound proposition obtained by replacing each ∧ by ∨, each ∨ by ∧, each 𝑇
by 𝐹, and each 𝐹 by 𝑇. The dual of 𝑠 is denoted by 𝑠 ∗ .
(1). Find the dual of each of these compound propositions
a). 𝑝 ∨ ¬𝑞
b). (𝑝 ∧ ¬𝑞) ∨ (𝑞 ∧ 𝐹)
(2). When does 𝑠 ∗ = 𝑠, where 𝑠 is a compound proposition.
Solution:
(1). a). 𝑝 ∧ ¬𝑞
b). (𝑝 ∨ ¬𝑞) ∧ (𝑞 ∨ 𝑇)
(2). If 𝑠 has any occurrences of ∧, ∨, 𝑇, or 𝐹, then the process of forming the dual will
change it. Therefore 𝑠 ∗ = 𝑠 if and only if 𝑠 is simply one propositional variable (like 𝑝).
A more difficult question is to determine when 𝑠 ∗ will be logically equivalent to 𝑠. For
example, 𝑝 ∨ 𝐹 is logically equivalent to its dual 𝑝 ∧ 𝑇, because both are logically
equivalent to 𝑝.
This example would help understand the similar idea as De Morgan’s Laws.
Q2. How many of the disjunctions 𝑝 ∨ ¬𝑞, ¬𝑝 ∨ 𝑞, 𝑞 ∨ 𝑟, 𝑞 ∨ ¬𝑟, and ¬𝑞 ∨ ¬𝑟 can be
made simultaneously true by an assignment of truth values to 𝑝, 𝑞 and 𝑟?
Solution:
If we want the first two of these to be true, then 𝑝 and 𝑞 must have the same truth
value. If 𝑞 is true, then the third and fourth expressions will be true, and if 𝑟 is false, the
last expression will be true. So all five of these disjunctions will be true if we set 𝑝 and 𝑞
to be true, and 𝑟 to be false.
This example would help understand consistent assignment.
Part4 Predicates and Quantifiers
Q1. Suppose that the domain of the propositional function 𝑃(𝑥) consists of -5, -3, -1, 1, 3,
and 5. Express these statements without using quantifiers, instead using only negations,
disjunctions, and conjunctions.
a) ∃𝑥𝑃(𝑥)
b) ∀𝑥𝑃(𝑥)
c) ∀𝑥((𝑥 ≠ 1) → 𝑃(𝑥))
d) ∃𝑥((𝑥 ≥ 0) ∧ 𝑃(𝑥))
e) ∃𝑥(¬𝑃(𝑥)) ∧ ∀𝑥((𝑥 < 0) ∧ 𝑃(𝑥))
Solution:
a) 𝑃(−5) ∨ 𝑃(−3) ∨ 𝑃(−1) ∨ 𝑃(1) ∨ 𝑃(3) ∨ 𝑃(5)
b) 𝑃(−5) ∧ 𝑃(−3) ∧ 𝑃(−1) ∧ 𝑃(1) ∧ 𝑃(3) ∧ 𝑃(5)
c) 𝑃(−5) ∧ 𝑃(−3) ∧ 𝑃(−1) ∧ 𝑃(3) ∧ 𝑃(5)
d) 𝑃(1) ∨ 𝑃(3) ∨ 𝑃(5)
e) (¬𝑃(−5) ∨ ¬𝑃(−3) ∨ ¬𝑃(−1) ∨ ¬𝑃(1) ∨ ¬𝑃(3) ∨ ¬𝑃(5)) ∧ (𝑃(−5) ∧ 𝑃(−3) ∧
𝑃(−1)), and this is equivalent to (¬𝑃(1) ∨ ¬𝑃(3) ∨ ¬𝑃(5)) ∧ (𝑃(−5) ∧ 𝑃(−3) ∧
𝑃(−1)).
This example shows how to understand the domain.
Q2. Show that ∀𝑥𝑃(𝑥) ∨ ∀𝑥𝑄(𝑥) and ∀𝑥(𝑃(𝑥) ∨ 𝑄 (𝑥)) are not logically equivalent.
Solution:
It is enough to find a counterexample. It is intuitively clear that the first proposition is
asserting much more than the second. It is saying that one of the two predicates, 𝑃 or 𝑄,
is universally true; whereas the second proposition is simply saying that for every 𝑥 either
𝑃(𝑥) or 𝑄(𝑥) holds, but which it is may well depend on 𝑥. As a simple counterexample,
let 𝑃(𝑥) be the statement that 𝑥 is odd, and let 𝑄(𝑥) be the statement that 𝑥 is even. Let
the domain of discourse be the positive integers. The second proposition is true, since
every positive integer is either odd or even. But the first proposition is false, since it is
neither the case that all positive integers are odd nor the case that all of them are even.
We need to be careful about which part should we apply the quantifiers.
Q3. Let 𝑄(𝑥, 𝑦) be the statement “𝑥 + 𝑦 = 𝑥 − 𝑦”. If the domain for both variables
consists of all integers, what are the truth values?
a) Q(1,1)
b) ∀𝑦𝑄(1, 𝑦)
c) ∃𝑥𝑄(𝑥, 2)
d) ∀𝑥∃𝑦𝑄(𝑥, 𝑦)
e) ∃𝑦∀𝑥𝑄(𝑥, 𝑦)
f) ∀𝑦∃𝑥𝑄(𝑥, 𝑦)
Solution:
a) False. 1 + 1 ≠ 1 − 1
b) False. E.g. when 𝑦 = 1,1 + 𝑦 ≠ 1 − 𝑦
c) False. 𝑥 + 2 ≠ 𝑥 − 2 has no solution
d) True. When 𝑦 = 0, this is true for each 𝑥.
e) True. We can take 𝑦 = 0
f) False. c) is a counterexample.
Q4. Rewrite each of these statements so that negations appear only within predicates
(that is, so that no negation is outside a quantifier or an expression involving logical
connectives).
a) ¬∃𝑦∃𝑥𝑃(𝑥, 𝑦)
b) ¬∃𝑦(𝑄 (𝑦) ∧ ∀𝑥¬𝑅(𝑥, 𝑦))
Solution:
Just apply the De Morgan’s Laws.
a) ∀𝑦∀𝑥¬𝑃(𝑥, 𝑦)
b) ∀𝑦(¬𝑄(𝑦) ∨ ∃𝑥𝑅 (𝑥, 𝑦))
Q5. Show that ∀𝑥𝑃(𝑥) ∨ ∀𝑥𝑄(𝑥) and ∀𝑥∀𝑦(𝑃(𝑥) ∨ 𝑄(𝑦)), where all quantifiers have
the same nonempty domain, are logically equivalent. (Compare this question with Q2 in
Section 1.4)
Solution:
We need to show that each of these propositions implies the other.
Suppose that ∀𝑥𝑃(𝑥) ∨ ∀𝑥𝑄(𝑥) is true. We want to show that ∀𝑥∀𝑦(𝑃(𝑥) ∨ 𝑄(𝑦)) is
true. By our hypothesis, one of two things must be true. Either 𝑃 is universally true, or 𝑄
is universally true. In the first case, ∀𝑥∀𝑦(𝑃(𝑥) ∨ 𝑄(𝑦)) is true, since the first expression
in the disjunction is true, no matter what 𝑥 and 𝑦 are; and in the second case,
∀𝑥∀𝑦(𝑃(𝑥) ∨ 𝑄(𝑦)) is also true, since now the second expression in the disjunction is
true, no matter what 𝑥 and 𝑦 are.
Next we need to prove the converse. So suppose that ∀𝑥∀𝑦(𝑃(𝑥) ∨ 𝑄(𝑦)) is true. We
want to show that ∀𝑥𝑃(𝑥) ∨ ∀𝑥𝑄(𝑥) is true. If ∀𝑥𝑃(𝑥) is true, then we are done.
Otherwise, 𝑃(𝑥0 ) must be false for some 𝑥0 in the domain of discourse. For this 𝑥0 , then,
the hypothesis tells us that 𝑃(𝑥0 ) ∨ 𝑄(𝑦) is true, no matter what 𝑦 is. Since 𝑃(𝑥0 ) is false,
it must be the case that 𝑄(𝑦) is true for each 𝑦. In other words, ∀𝑦𝑄(𝑦) is true, or, to
change the name of the meaningless quantified variable, ∀𝑥𝑄(𝑥) is true. This certainly
implies that ∀𝑥𝑃(𝑥) ∨ ∀𝑥𝑄(𝑥) is true, as desired.
Part5 Introduction to Proofs
Q1. Prove or disprove that the product of two irrational numbers is irrational.
Solution:
Disprove by a counterexample: √2 ∙ √2 = 2, and 2 is a rational number.
Download