Download CSCI 2824: Assignment #3. Due date: Wed, 2/15/2012 by start of the

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
CSCI 2824: Assignment #3. Due date: Wed, 2/15/2012 by start of the class.
Note: This assignment is due on a wednesday morning.
Problem 1 (40 points). We have some simple “theorems” below and “proofs”. Explain briefly for
each case if the theorem is right. And furthermore, explain if there are any flaws in the proofs. If
there are no flaws then say so clearly. Please be brief.
Theorem-1: Every odd number is prime.
Proof. 3, 5, 7, 11, 13, 17 are all prime and they are also odd. (QED).
Solution: Theorem is false. 15 is odd but not prime. The proof is flawed. It uses a proof by
example to prove a universal property.
Converse: For every number, if it is prime then it is odd.
Contrapositive: For every number, if it is not prime then it is not odd.
Theorem-2: There is an odd prime number.
Proof. 3, 5, 7, 11, 13, 17 are all prime and they are also odd. (QED).
Solution: Theorem is true. Proof is fine. Examples can be used to prove existential properties.
The statement is not an implication. Therefore, we do not write the converse or the contrapositive.
Theorem-3: For every number n if n is divisible by 2 then n is composite.
Proof. Since n is divisible by 2, we may write n = 2k for some k. Therefore, n is composite.
(QED)
Solution: The theorem is false. n = 2 is divisible by 2 but not composite. The proof is flawed
since when we write n = 2k for some k, we are not proving that k 6= 1. Otherwise, we do not
automatically conclude that n is composite.
Converse: For every number n, if n is composite then it is divisible by 2.
Contrapositive: For every number n, if n is not compositive then n is not divisible by 2.
Theorem-4: For every number n if n is divisible by 2 then n3 is divisible by 8.
Proof. Let n be a number such that n3 is divisible by 8. We can write n3 = 8k, wherein k is
the cube of some number l. Therefore, n = 2k 1/3 = 2l. Therefore n is even. (QED)
Solution: The theorem is true. The proof is wrong. It attempts to prove the converse of the
original statement.
Converse: For every number n, if n3 is divisible by 8 then n is divisible by 2.
Contrapositive: For every number n, if n3 is not divisible by 8, then n is not divisible by 2.
Theorem-5: For every number n if n is divisible by 2 then n3 is divisible by 8.
Proof.Let n be an even number. Therefore n = 2k for some k ∈ N. n3 = 8k 3 is divisible by 8.
(QED).
Solution: The theorem is true. The proof is correct.
The converse and contrapositive are the same as the previous problem.
Theorem-6: For any two consecutive natural numbers m, n, we have m2 − n2 is always odd.
Proof: Let m, n be consecutive numbers. Then we may write m = n + 1. Therefore, m2 − n2 =
(n + 1)2 − n2 = 2n + 1 is always odd. (QED).
1
Solution: The theorem is true. The proof is almost correct. But it is technically flawed in one
sense: we consider m = n + 1 but the other case is entirely possible — n = m + 1, since all we say
are that m, n are consecutive numbers.
Well-written proofs will often mention something to the effect: Without loss in generality, we
may write m = n + 1. The case where n = m + 1 is symmetric.
Converse: For any two numbers m, n, if m2 − n2 is odd then m, n are consecutive numbers.
Contrapositive: For any two numbers m, n, if m2 −n2 is not odd then m, n are not consecutive
numbers.
Theorem-7: For any two consecutive natural numbers n, n + 1, we have that their product is
divisible by 2.
Proof: Let n and n + 1 be two consecutive numbers. Then if n is odd, then n + 1 is even.
Otherwise, if n is even, then n + 1 is odd. Therefore, one of them is even. Hence, n(n + 1) is even.
Solution: The theorem is true. The proof is mostly correct. An entirely rigorous proof may still
want to prove that product of an odd and an even number is even. But many texts do not require
this level of detail or “rigor”.
This statement is not an implication as such. We may rewrite the theorem above to be the
following implication:
For any two natural numbers m, n, if m = n + 1 then their product mn is divisible by 2.
Converse: If mn is divisible by 2 then m = n + 1.
Contrapositive: If mn is not divisible by 2 then m 6= n + 1.
Theorem-7: For any two consecutive natural numbers n, n + 1, we have that their product is
not divisible by 4.
Proof: Let n and n + 1 be two consecutive numbers. Then if n is odd, then n + 1 is even.
Otherwise, if n is even, then n + 1 is odd. Therefore, both cannot be even at the same time. Hence,
n(n + 1) is not divisible by 4. (QED)
Solution: The theorem is false. Eg., n = 3 gives us n × (n + 1) = 12, which is divisible by 4. The
proof is flawed in that it rightly argues that one of n or n + 1 has to be odd and the other even.
But thtat does not mean that the product is not divisible by 4. So the last sentence is clearly does
not follow from the rest of the proof.
As such, there is no clear implication in the theorem above. But along the same lines as the
previous problem, we may restate the theorem as:
For any two natural numbers m, n, if m = n + 1 then their product mn is not divisible by 4.
Converse: If mn is not divisible by 4 then m = n + 1.
Contrapositive: If mn is divisible by 4 then m 6= n + 1.
Theorem-8: The product of any three consecutive numbers is divisible by 4.
Proof: Let n, n + 1, n + 2 be three consecutive numbers. If n is even, then n + 2 is even as well.
Therefore n(n + 1)(n + 2) is divisible by 4. (QED)
Solution: The theorem is false. Take n = 1, we have 1 × 2 × 3 = 6 is not divisible by 4. The
proof is flawed because it misses the case when n is odd. This is where the theorem actually can
fail.
Converse: If the product of any three numbers is divisible by 4 then they are consecutive.
Contrapositive: If the product of any three numbers is not divisible by 4 then they are not
consecutive.
2
Theorem-9: If m and n are prime numbers, then mn + 1 is composite.
Proof: Let m and n be prime numbers, then mn + 1 = m(n + 1) is a product of two numbers.
Note that both m, n > 1 therefore neither of the numbers in the product are 1 or mn + 1 itself.
(QED)
Solution: The theorem is false. Take m = 3, n = 2, we have mn + 1 = 7, which is not composite.
The proof is flawed in many places. First, mn + 1 6= m(n + 1). Later flaws do not matter.
Converse: If mn + 1 is composite then m, n are both prime numbers.
Contrapositive: If mn + 1 is not composite then at least one of m or n is not prime.
Theorem-10: If m, n are composite numbers then m − n is also composite.
Proof: We can write m = i × j for some i, j > 1. Likewise, we can write n = i × k for some
i, k > 1. Therefore m − n = i × (j − k) which is itself a product of two numbers. Hence m − n is
composite. (QED)
Solution: The theorem is false. 6, 4 are compsite but their difference is not.
The proof is flawed in multiple places. First, we are reusing the variable i. Next, we are not
proving that i 6= 1 or j − k 6= 1.
Converse: If m − n is composite then m, n are both composite.
Contrapositive: If m − n is not composite then either m or n (at least one of m, n) is not
composite.
Problem 2 (30 points). Write down the converse and contrapositives of each of the theorems in
problem 1. Please skip the theorems that are not implications. You may write your answers in
english or first-order logic.
Problem 3 (30 points). Prove the following theorems.
Theorem 1: The product of every three consecutive natural numbers is divisible by 6.
Solution:
We split into three cases based on n mod 3.
Case-1: n mod 3 = 0. n itself is divisible by 3. Thus n(n + 1)(n + 2) is also divisible by 3 in this
case.
Case-2: n mod 3 = 1, then n + 2 is divisible by 3. Thus n(n + 1)(n + 2) is also divisible by 3 in
this case.
Case-3: n mod 3 = 2, then n + 1 is divisible by 3. Thus n(n + 1)(n + 2) is also divisible by 3 in
this case.
Since no other cases are possible, we conclude that the product of any three numbers is divisible
by 3.
We have established in class and previously in this assignment that the product of any two
consecutive numbers is divisible by 2. As a result, we may conclude that the product of any three
consecutive numbers is divisible by 2.
Since 2, 3 are prime numbers, a number that is divisible by 2 and 3 is also divisible by 6. We
conclude that the product of three consecutive numbers is divisible by 6.
Theorem 2: For every number n, n2 + n + 1 is odd.
3
Solution: We have n2 + n + 1 = n(n + 1) + 1. We have previously proved (in class and see correct
theorem/proof in this assignment) that n(n + 1) is always even for any number n. Therefore,
n(n + 1) + 1 is always odd for any number n.
Theorem 3: For every even number n > 1, (n − 1)2 + (n + 1)2 is not divisible by 4.
Solution: Since n is an even number, we can write n = 2k for some k.
(n − 1)2 + (n + 1)2 = 2n2 + 2 = 2(2k)2 + 2 = 4(2k 2 ) + 2
Therefore, we have proved that (n − 1)2 + (n + 1)2 will always leave a remainder of 2 when
divided by 4 and hence cannot be divisible by 4.
Theorem 4: There are no two consecutive prime numbers other than 2, 3. (Alternative Statement: For any n > 2, at least one of n or n + 1 is composite. )
Solution: We have previously (in class and in this assignment) shown that for any number n,
one of n or n + 1 is even. It remains to show that one of them is composite.
Case -1: n is even. Since n > 2, n = 2k for some k > 1. Therefore n can be written as the
product of two numbers where neither number is 1 or n itself. Thus n is composite.
Case -2: n + 1 is even. Since n + 1 > 3, n + 1 = 2l for some l > 1. Therefore n + 1 can be
written as the product of two numbers where neither number is 1 or n + 1 itself. Thus n + 1 is
composite.
In either case, we have that at least one of n or n + 1 is composite.
Theorem 5: Let p, q be two prime natural numbers such that p, q > 3, we have that q 2 − p2 is
composite.
Solution: The theorem is technically false. If p = q, we have q 2 − p2 = 0 which is neither prime
nor composite.
We will prove assuming that p 6= q. Without loss of generality, we assume q > p. The reverse
case when p > q is proved along identical lines.
We may write q 2 − p2 as (q − p)(q + p). It remains to show that neither factor can be 1. We
have q − p 6= 1 since by the previous theorem, two prime numbers cannot be consecutive. We also
have p ≥ 0, q ≥ 0. Therefore p + q 6= 1. Combining, we have that q 2 − p2 is the product of two
numbers, neither of which are 1.
4
Related documents