Mathematics 220 Workshop 2 - Logic

advertisement
Mathematics 220 Workshop 2 - Logic
Note: to be able to solve logic problems easier, you should know by heart all definitions — what is
a converse? what is a contrapositive? conjunction? tautology? You may wish to write for yourself
a dictionary of logic terms. Also, know by heart logical equivalences (for example, that P ⇒ Q and
(∼ P ) ∨ Q are logically equivalent). Make for yourself a formula sheet with all the fundamental
equivalences. Have a good understanding how each formula is proved.
⋄
‘Then you should say what you mean,’ the March Hare went on.
‘I do,’ Alice hastily replied; ‘at least — at least I mean what I say–that’s the same thing,
you know.’
‘Not the same thing a bit!’ said the Hatter. ‘You might just as well say that “I see what
I eat” is the same thing as “I eat what I see”!’
‘You might just as well say,’ added the March Hare, ‘that “I like what I get” is the same
thing as “I get what I like”!’
‘You might just as well say,’ added the Dormouse, who seemed to be talking in his sleep,
‘that “I breathe when I sleep” is the same thing as “I sleep when I breathe”!’
‘It IS the same thing with you,’ said the Hatter, and here the conversation dropped.
⋄
1. Express each of the following statements as a conditional statement in “if-then” form. For
(a),(b) and (c) also write the negation (without phrases like “it is false that”), converse and
contrapositive. Your final answers should use clear English, not logical symbols.
(a) Every odd number is prime.
(b) Passing the test requires solving all the problems.
(c) Being first in line guarantees getting a good seat.
(d) I get mad whenever you do that.
(e) I won’t say that unless I mean it.
Solution:
(a) Statement: Every odd number is prime.
“If-then” form: If a number is odd, then it is prime.
Negation: There exists an odd number that is not prime.
Converse: If a number is prime, then it is odd.
Contrapositive: If a number is not prime, then it is not odd.
(b) Statement: Passing the test requires solving all the problems.
“If-then” form: If one passes the test, one has to have solved all the problems.
Negation: One can pass the test without solving all the problems.
Converse: If one solves all the problems, then one passes the test.
Contrapositive: If one has not solved all the problems, then one does not pass the test.
Page 1 of 7
Mathematics 220 Workshop 2 - Logic
(c) Statement: Being first in line guarantees getting a good seat.
“If-then” form: If one is first in line, then one gets a good seat.
Negation: One can be first in line without getting a good seat.
Converse: If one gets a good seat, then one must be first in line.
Contrapositive: If one does not a get a good seat, then one must not have been first in
line.
(d) Statement: I get mad whenever you do that.
“If-then” form: If you do that, then I get mad.
(e) Statement: I won’t say that unless I mean it.
“If-then” form: If I say that, then I mean it.
2. Show that (P ∧ R) ∧ (Q ∨ R) ≡ (P ∧ R). (We have several ways of doing this including using
known equivalences, proving the corresponding biconditional or writing out a truth table.)
Solution:
We could do this by writing out the truth table. Unlike the last Homework, in this case it
doesn’t take long to prove the biconditional:
(P ∧ R) ∧ (Q ∨ R) ⇔ (P ∧ R).
(1)
Assume (P ∧ R) ∧ (Q ∨ R) is T. Then by definition P ∧ R is T. This proves ⇒ in (1).
Assume P ∧ R is T. Then R is T and hence so is Q ∨ R. We therefore see that both P ∧ R
and Q ∨ R are T and hence so is (P ∧ R) ∧ (Q ∨ R). This proves ⇐ in (1) and so completes
the proof of (1).
3. The statement
For all integers m and n, either m ≤ n or m2 ≥ n2 .
can be expressed using quantifiers as:
∀m ∈ Z, ∀n ∈ Z, m ≤ n or m2 ≥ n2
or if you prefer as
∀m, n ∈ Z, m ≤ n or m2 ≥ n2 .
Consider the following two statements:
(a) There exist integers a and b such that both ab < 0 and a + b > 0.
(b) For all real numbers x and y, x 6= y implies that x2 + y 2 > 0.
• Using quantifiers, express in symbols the negations of the statements in both (a) and (b).
• Express in words the negations of the statements in (a) and (b).
• Decide which is true in each case, the statement or its negation.
Page 2 of 7
Mathematics 220 Workshop 2 - Logic
Solution:
(a) ∃a ∈ Z ∃b ∈ Z s.t. (ab < 0) and (a + b > 0)
Negation is —∀a ∈ Z ∀b ∈ Z, (ab ≥ 0) or (a + b ≤ 0) or in words:
For all integers a, b either ab ≥ 0 or a + b ≤ 0.
The original statement is T. Take a = 2 and b = −1.
(b) ∀x ∈ R ∀y ∈ R, x 6= y ⇒ x2 + y 2 > 0
Negation is — ∃x ∈ R ∃y ∈ R s.t. x = y and x2 + y 2 ≤ 0 or in words:
There are real numbers x, y so that x 6= y and x2 + y 2 ≤ 0.
The original statement is T. If x 6= y then one of the values is non-zero, say x 6= 0.
Therefore x2 + y 2 ≥ x2 > 0. Think about this solution. To be very careful we should
note that the other possibility is that y 6= 0. In this case x2 + y 2 ≥ y 2 > 0 and we
obtain the same result. It may be safer to spell out the argument in both cases. This
is up to you but be careful–sometimes the other cases are not so obvious.
Page 3 of 7
Mathematics 220 Workshop 2 - Logic
4. Given a real number x,
• let A(x) be the statement “ 21 < x < 25 ”,
• let B(x) be the statement “x ∈ Z”,
• let C(x) be the statement “x2 = 1”, and
Which statements below are true for all x ∈ R?
(a) A(x) ⇒ C(x)
(b) C(x) ⇒ B(x)
(c) (A(x) ∧ B(x)) ⇒ C(x)
(d) C(x) ⇒ (A(x) ∧ B(x))
(e) (A(x) ∨ C(x)) ⇒ B(x)
Solution:
(a) ∀x ∈ R A(x) ⇒ C(x) is false, since for x = 2, A(2) is true ( 12 < 2 < 52 ), but C(2) is
false (22 = 4 6= 1),
(b) ∀x ∈ R C(x) ⇒ B(x) is true, since if x2 = 1, then x is 1 or −1 and hence is an integer.
We have shown for every x ∈ R C(x) implies B(x).
(c) ∀x ∈ R (A(x) ∧ B(x)) ⇒ C(x) is false, since for x = 2, (A(2) ∧ B(2)) is true (both A(2)
and B(2) are true), but C(2) is false (as shown in (a)),
(d) ∀x ∈ R C(x) ⇒ (A(x) ∧ B(x)) is false, since for x = −1, C(−1) is true ((−1)2 = 1),
but A(−1) is false (−1 < 21 ), and so A(−1) ∧ B(−1) is false,
(e) ∀x ∈ R (A(x) ∨ C(x)) ⇒ B(x) is false, since for x = 32 , A( 32 ) is true ( 21 <
makes A( 23 ) ∨ C( 32 ) true, but B( 23 ) is false ( 23 6∈ Z).
3
2
< 52 ), which
5. Let us say that two trees are ‘neighbours’ if the distance between them is less than 15 metres.
(a) Consider the statement:
P: ‘There exists a tree in Stanley park such that all the neighbouring trees are at
least as tall as this tree.’
Let T be the set of trees in Stanley Park, let {Nt }t∈T be the indexed collection of subsets
of T : for every tree t ∈ T , Nt is the set of its neighbours. Let h(t) be the height of a tree
t. Using this notation, write the statement P using quantifiers.
(b) Write down the negation of the statement P, both using the set notation and quantifiers,
and in plain English.
(c) Do you think the statement P is true? Why or why not? Do you have to go to Stanley
Park and look at every tree and its neighbours in order to find out? If not, why not?
(d) Write the negation of the statement:
For every number h < 100 there exists a tree in Stanley Park that has a neighbour
that is at least h meters tall.
Page 4 of 7
Mathematics 220 Workshop 2 - Logic
Solution: (a) The answer: ∃t ∈ T s.t. ∀x ∈ Nt , h(x) ≥ h(t).
Note that the first existential quantifier gives a name to the tree we are talking about, it
says: ”there exists a tree, named t”. Then the same name is used to denote the set of
neighbours: we are saying that for any tree x which is in the set of neighbours of the tree t
that we already named, the height of x is greater than or equal to the height of our tree t.
(b) Negation: ∀t ∈ T ∃x ∈ Nt s.t. h(x) < h(t).
In words: ‘Every tree in Stanley park has a shorter neighbour’.
(c) There are finitely many trees in Stanley Park, and among them, there has to be the
shortest one (since there are finitely many). Let us give the shortest tree a name – call it s
for “short”. Now let us consider the set of its neighbours Ns . Let x ∈ Ns . Since s is the
shortest tree in the whole park, no other tree can be shorter than s, and so h(x) ≥ h(s), and
our statement is proved: we have shown that for every x ∈ Nt , we must have h(x) ≥ h(t).
(d) The original statement says:
∀h < 100 ∃t ∈ T s.t. ∃x ∈ Nt s.t. h(x) ≥ h.
Then the negation is: ∃h < 100 ∀t ∈ T ∀x ∈ Nt h(x) < h. In words, this says: ‘There exists
a number h < 100 such that for every tree in Stanley Park, all its neighbours are less than
h metres tall.’
6. A problem on sets: Let I denote the interval [0, ∞). For each r ∈ I, define
Ar = {(x, y) ∈ R × R : x2 + y 2 = r 2 }
Br = {(x, y) ∈ R × R : x2 + y 2 ≤ r 2 }
Cr = {(x, y) ∈ R × R : x2 + y 2 > r 2 }
S
T
a) Determine r∈I Ar and r∈I Ar .
T
S
b) Determine r∈I Br and r∈I Br .
S
T
c) Determine r∈I Cr and r∈I Cr .
d) Prove or disprove: {Ar : r ∈ I} is a partition of R × R.
Solution:
a) For each r ∈ I, Ar is the set of points on the circle centered at the origin with radius r.
S
• Claim: r∈I Ar = R × R.
Intuitively speaking, every point on the plane lies on some circle centered at the
origin. So if we take the union of all such circles with all radii, then we must get
the whole plane.
Proof: (⊆) is trivial. (⊇) For each (x, y) ∈ R × R, then (x, y) ∈ A√x2 +y2 since
p
S
S
x2 + y 2 = ( x2 + y 2 )2 . So, (x, y) ∈ r∈I Ar . Thus, R × R ⊆ r∈I Ar . Hence, the
claim follows.
T
• Claim: r∈I Ar = ∅.
Page 5 of 7
Mathematics 220 Workshop 2 - Logic
Intuitively speaking, every point on the plane lies on one circle centered at the origin
with a specific radius. So, if we change the radius, that point is no longer in the
intersection. Since we take the intersection over all possible radii, the intersection
must be empty.
p
Proof: Let (x, y) ∈ R×R. Then, (x, y) 6∈ A√x2 +y2 +1 since x2 +y 2 6= ( x2 + y 2 +1)2 .
T
Hence, (x, y) 6∈ r∈I Ar , which proves the claim.
b) For each r ∈ I, Br is the set of points lying inside and on the circle centered at the origin
with radius r.
S
• Claim: r∈I Br = R × R.
Intuitively speaking, given any point on the plane, we can find a big enough circle
that includes it in the interior. So, the union over all such circles will include every
point on the plane.
Proof:
(⊆) is trivial. (⊇) For each (x, y) ∈ R × R, then (x, y) ∈ B√x2 +y2 since x2 + y 2 =
p
S
S
( x2 + y 2 )2 . So, (x, y) ∈ r∈I Br . Thus, R × R ⊆ r∈I Br , and this proves the
claim.
T
• Claim: r∈I Br = {(0, 0)}.
Intuitively speaking, every point on the plane lies on one circle centered at the origin
with a specific radius, but not on a circle with slightly smaller radius. So, if the
point is not the center of the circle, then we can always shrink the radius to exclude
that point from the intersection over all radii.
Proof:
p
Let (x, y) ∈ R × R, and (x, y) 6= (0, 0). Denote by d = x2 + y 2 . Observe that
2
d 6= 0 since (x, y) 6= (0, 0). Then, d2 < d, and (x, y) 6∈ A d because x2 + y 2 = d2 > d4 .
2
T
2
2
So, (x, y) 6∈ r∈I Br . On the other hand, (0, 0) is a point such
T that 0 + 0 = 0 ≤ r
for all r ∈ I. So, (0, 0) ∈ Br for any r ∈ I. Thus, (0, 0) ∈ r∈I Br .
c) For each r ∈ I, Cr is the set of points lying strictly outside the circle centered at the
origin with radius r.
S
• Claim: r∈I Cr = R × R\{(0, 0)}.
Intuitively speaking, given any point on the plane except for the origin, one can
find a small enough circle such that that point is on the outside of the circle by
shrinking the radius. The only point on the plane where that is not possible is the
origin, because its radius is already minimal at 0.
Proof: (⊆) For anySr ∈ I, if (x, y) ∈ Cr , then x2 + y 2 > r ≥ 0. So, (0, 0) 6∈ Cr for
any r ∈ I. Hence, r∈I Cr ⊆ R × R\{(0, 0)}.
(⊇) Observe that C0 = {(x, y) ∈ R × R :Sx2 + y 2 > 0}, which is precisely the set
R × R\{(0, 0)}. Hence, R × R\{(0, 0)} ⊆ r∈I Cr , and the claim follows.
T
d) Claim: r∈I Cr = ∅.
Intuitively speaking, given any point on the plane, then we can always find a circle with
large enough radius that include that point in the interior. So, the intersection of the
exteriors of circles of all radii must have no points.
p
2 . Then, (x, y) 6∈ C
by d = x2 + yT
Proof: Let (x, y) ∈ R × R. Denote T
d+1 because
2
2
2
2
x + y = d < (d + 1) . So, (x, y) 6∈ r∈I Cr . Hence, r∈I Cr = ∅.
Page 6 of 7
Mathematics 220 Workshop 2 - Logic
e) {Ar : r ∈ I} is a partition of R × R.
Proof. For each r ≥ 0, Ar 6= ∅ because (r, 0) ∈ Ar . For r 6= s we have Ar ∩ As = ∅
since any point in the intersection must satisfy x2 + y 2 = r 2 and x2 + y 2 = s2 , which is
impossible. Finally ∪r∈I Ar = R × R by (a). These 3 properties show that {Ar : r ∈ I}
is a partition of R × R.
7. Consider the following two statements:
(a) For all w ∈ R, there exists x ∈ R such that w < x.
(b) There exists y ∈ R such that for all z ∈ R, y < z
One of the statements is true, and the other one is false. Determine which is which and prove
your answers (both of them). (Final exam 2005)
Solution:
(a) The first statement is true. No matter which real w we choose, we can pick x = w + 1
which is a real number. Then w < x.
(b) The second statement is false — we show the negation is true. The negation is “For all
y ∈ R, there exists z ∈ R so that y ≥ z. Now, no matter which y we choose, we can
pick z = y − 1 and then y > z. Since the negation is true, the original statement is
false.
Solution: Quiz: Consider the statement: ∀x ∈ R ∃y ∈ Q, |x−y| < 0.1. State this statement
in English, and then form its negation, both symbolically and in English.
Solution: The original statement: For every real number x there exists a rational number
y such that the distance between x and y is less than 0.1 (in other words, every real number
can be approximated by a rational number with approximation error less than 0.1.)
Negation: ∃x ∈ R s.t. ∀y ∈ Q, |x − y| > 0.1. There exists a real number x such that the
distance from x to any rational number is at least 0.1 (this would say that such a number
x cannot be approximated by any rational number with error at least 0.1).
⋄
Page 7 of 7
Download