Download CMSC 203 : Section 0201 Hw3 Solution

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

Knapsack problem wikipedia , lookup

Sieve of Eratosthenes wikipedia , lookup

Computational complexity theory wikipedia , lookup

Multiple-criteria decision analysis wikipedia , lookup

Weber problem wikipedia , lookup

Transcript
CMSC 203 : Section 0201 Hw3 Solution
March 20, 2007
1. Exercise set 3.1
Problem 18
(10 points)
Prove the follwoing using the method of exhaustion
For each integer n with 1 ≤ n ≤ 10, n2 − n + 11 is a prime number
Solution
Method of exhaustion for 1 ≤ n ≤ 10
n = 1, n2 − n + 11 = 11 is
n = 2, n2 − n + 11 = 13 is
n = 3, n2 − n + 11 = 17 is
n = 4, n2 − n + 11 = 23 is
n = 5, n2 − n + 11 = 31 is
n = 6, n2 − n + 11 = 41 is
n = 7, n2 − n + 11 = 53 is
n = 8, n2 − n + 11 = 67 is
n = 9, n2 − n + 11 = 83 is
n = 10, n2 − n + 11 = 101
a prime number
a prime number
a prime number
a prime number
a prime number
a prime number
a prime number
a prime number
a prime number
is a prime number
Problem 21
For all real numbers x, if x > 1 then x2 > x
(10 points)
Solution
Starting point: Let x ∈ R such that x > 1
Conclusion to be shown: x2 > x
Problem 27
The sum of any two odd integers is even
(15 points)
Solution
Let m and n be any two (particular but arbitrarily chosen) odd integers, then by definition
of odd integers,
m = 2j + 1
n = 2k + 1
where j and k are some integers
1
Hence,
m + n = (2j + 1) + (2k + 1)
= (2j + 2k + 2)
= 2(j + k + 1)
where (j + k + 1) is an integer say l
Hence, (m + n) = 2(l) which by definition of an even number is even.
Thus (m + n) is an even integer. i.e. the sum of any two odd integers is even.
Problem 33
(15 points)
Prove that the given statement is false
There exists an integer k such that k ≥ 4 and 2k 2 − 5k + 2 is prime
Solution
To prove the statement, there exists an integer k such that k ≥ 4 and 2k 2 − 5k + 2 is
prime, to be f alse, we will show that,
∀k ∈ Z, such that k ≥ 4 and 2k 2 − 5k + 2 is not prime
2k 2 − 5k + 2 = 2k 2 − 4k − k + 2
= 2k(k − 2) − 1(k − 2)
= (2k − 1)(k − 2)
Now since k ≥ 4, (2k − 1) and (k − 2) both are greater than 1. Hence 2k 2 − 5k + 2 =
(2k − 1)(k − 2) is a product of two integers both greater than 1. Therefore 2k 2 − 5k + 2
is not a prime number. Thus the statement, there exists an integer k such that k ≥ 4 and
2k 2 − 5k + 2 is prime, is F alse
Problem 37
Find the mistakes in the given proofs.
(10 points)
Solution
The problem with this proof is that of begging the question i.e. to assume what is to
be proved. In the proof the author first states what it means for the conclusion to be true
i.e. if mn is even then there exists an integer r such that mn = 2r.
Problem 42
(10 points)
Determine wether the given statement is true or false.
The product of any even integer and any integer is even.
Solution
The given statement is true.
Consider m and n, be any two integers such that m is even integer.
2
Now since m is an even integer it can be expressed as m = 2k where k is some integer.
Thus,
mn = (2k)n = 2(kn)
where (kn) is some integer. Thus by the definition of even numbers, 2(kn) is even. Therefore the product of any even integer and any integer is even.
2. Exercise set 3.2
Problem 5
Write each number as a ratio of two integers.
0.56565656...
(10 points)
Solution
Let x = 0.56565656...
Therefore,
100x = 56.56565656...
.
= 56 + 0.56565656...
.
= 56 + x
i.e. 99x = 56
i.e. x = 56
99
Problem 15
(10 points)
Determine if the statement is true or false.
The difference of any two rational numbers is rational number.
Solution
The given statement is true.
Suppose r and s be any two rational numbers. We have to show that r − s is rational. By
definition of rational numbers, r = a/b and s = c/d, where a, b, c, d are integers and b 6= 0
and d 6= 0. Thus,
r − s = ab − dc
by substitution
.
=
ad−bc
bd
by basic algebra
Let p = ad − bc and q = bd, then p and q are integers and also q 6= 0 since b 6= 0 and d 6= 0
Thus,
r−s=
p
q
where p and q are integers and q 6= 0, i.e. r − s is rational number.
3. Exercise set 3.3
Problem 25, 30
(10 points)
For each statement determine if the statement is true or false
25. For all integers a, b and c, if a | bc, then a | b or a | c
3
30. Is it possible to have a combination of nickels, dimes, and quarters, that add up to
$4.72
Solution
25. Given statement is false. Consider the counterexample:
Let a = 6, b = 2 and c = 3, thus,
a | bc since bc = ak, i.e. (2)(3) = 6(k) where k = 1
However neither a | b nor a | c
30. The given statement is false. Since using combination of nickels, dimes, and quarters all the denomination we can have is a multiple of 5 cents. Hence we can not have
$4.72, using any combination of nickels, dimes, and quarters.
4