Solution

advertisement
CmSc180 Discrete Mathematics
Homework 03 due 06/23
1. Give direct proof for the following statements
1.a. The sum of two even numbers is even
Detailed Proof:
Let A and B be two arbitrary chosen even numbers
(1) x, even(x)  multiple of 2(x), i.e.  p, integer(p) & x = 2p
(2) even(A)
given in the problem
(3) even(B)
given in the problem
 (4)  p, integer(p) such that A = 2p by (1), (2) and MP
 (5)  q, integer(q) such that B = 2q by (1), (3) and MP
(6) S = A + B = 2p + 2q = 2(p+q)
(7) x, multiple of 2(x)  even(x)
(8) multiple_of_2(S)
 (9) even(S)
by (4), (5), and basic algebra
by definition of even numbers
by (6)
by (7), (8) and MP
The short solution is:
Since A and B are even, they can be represented as multiples of 2:
A = 2m, B = 2n
Then, A + B = 2m + 2n = 2(m+n)
A + B is a multiple of 2, therefore it is even
1.b. The product of two even numbers is even
Detailed Proof:
Let A and B be two arbitrary chosen even numbers
(1) x, even(x)  multiple of 2(x), i.e.  p, integer(p) such that x = 2p
(2) even(A)
given in the problem
(3) even(B)
given in the problem
 (4)  p, integer(p) such that A = 2p by (1), (2) and MP
 (5)  q, integer(q) such that B = 2q by (1), (3) and MP
(6) P = A * B = 2p * 2q = 2(2pq)
(7) x, multiple of 2(x)  even(x)
(8) multiple_of_2(P)
 (9) even(P)
by (4), (5), and basic algebra
by definition of even numbers
by (6)
by (7), (8) and MP
1
The short solution is:
Since A and B are even, they can be represented as multiples of 2:
A = 2m, B = 2n
Then, A * B = 2m * 2n = 2(m*n)
A * B is a multiple of 2, therefore it is even
1.c. The sum of two odd numbers is even
Detailed Proof:
Let P and Q be two odd numbers
(1) x, odd(x)   p, integer(p) such that x = 2p+1
(2) odd(P)
given in the problem
(3) odd(Q)
given in the problem
 (4)  p, integer(p) such that P = 2p+1
by (1), (2) and MP
 (5)  q, integer(q) such that Q = 2q+1
by (1), (3) and MP
(6) S = P + Q = 2p + 2q +2 = 2(p+q +1)
basic algebra
(7) x, multiple_of_2(x)  even(x)
by definition
(8) multiple_of_2(S)
by (6)
 (9) even(S)
by (7), (8) and MP
The short solution is:
Since A and B are odd, they can be represented as:
A = 2m -1 , B = 2n -1
Then, A + B = 2m -1 + 2n -1 = 2(m+n -1)
A + B is a multiple of 2, therefore it is even
1.d. The sum of three consecutive integers is divisible by 3
Hint: represent the three consecutive numbers as m, m+1, m+2. Then find
their sum and show that it is a multiple of 3.
Let S = m + m + 1 + m + 2
S = m + m + 1 + m + 2 = 3m + 3 = 3(m + 1)
S is a multiple of 3, therefore S is divisible by 3
2
2. Prove by mathematical induction :
1 + 3 + … + (2n – 1) = n2
Let Sn = 1 + 3 + … + (2n – 1)
Let P(n) be the statement Sn = n2
1. Inductive base:
P(1) : S1 = 12 = 1
By definition of the sum S1 = 1
Therefore P(1) is true
2. Inductive step:
We shall show that P(k)  P(k+1) is true
Assume that for some Sk = k2
S k+1 = Sk + 2(k+1) – 1 = Sk + 2k + 1 = k2 + 2k + 1 = (k+1) 2
Therefore if Sk = k2 then S k+1 = (k+1) 2
By the principle of mathematical induction
1 + 3 + … + (2n – 1) = n2
for all positive n
3. Use propositional logic to prove that the following argument is a valid argument.
If my client is guilty, then the knife was in the drawer. Either the knife was not
in the drawer, or Jason Pritchard saw the knife. If the knife was not there on
October 10, it follows that Jason Pritchard did not see the knife. Furthermore, if
the knife was there on October 10, then the knife was in the drawer and also the
hammer was in the barn. But we all know that the hammer was not in the barn.
Therefore, ladies and gentlemen of the jury, my client is innocent.
Note to problem 3: Here we do not question the truth of the statements in the
argument. We assume that they are true. The question we have to answer is: is
the argument a valid argument. When solving this problem, follow the “Sherlock
Holmes” example solved in class.
Hint: In order to represent the statements in the problem, use the following
atomic propositions:
P1 = the client is guilty
P2 = The knife was in the drawer
P3 = Jason Pritchard saw the knife
P4 = the knife was there on October 10
3
P5 = the hammer was in the barn
The premises in the problem can be represented as follows:
P1  P2
~P2 V P3
~P4  ~P3
P4  P2  P5
~P5
(1) If my client is guilty, then the knife was in the
drawer
(2) Either the knife was not in the drawer, or Jason
Pritchard saw the knife.
(3) If the knife was not there on October 10, it
follows that Jason Pritchard did not see the
knife
(4) if the knife was there on October 10, then the
knife was in the drawer and also the
hammer was in the barn.
(5) the hammer was not in the barn
Using the above premises and applying the inference rules that we have
studied, you have to show that ~P1 holds.
From ~P5 it follows that ~(P2  P5)
(6)
Note: P5 is false, therefore any conjunction with P5 will be false
From (6), (4) and MT we have ~P4
(7)
From (7), (3) and MP we have ~P3
(8)
From (8), (2) by DS we have ~P2
(9)
From (9), (1) and MT we have ~P1
(10)
Therefore the client is innocent and the argument is valid
4. For the sets A = {a, c, d, e}, B = { d, e, a, c}, C = { d, a, c}, D = {e, a, d}, find
A
A
A
A
D





B=
B=
C=
C=
C=
{a,c,d,e}
{a,c,d,e}
{a,c,d, e}
{a, c,d}
{a, d}
A– B= 
A – C = {e}
C– A= 
4
Download