Solution

advertisement
CmSc180 Discrete Mathematics
Homework 06 due 02/22 SOLUTIONS
1. Determine whether the following arguments are valid or invalid.
a.
Sandra knows COBOL and Sandra knows C.
Therefore Sandra knows C
Valid - conjunctive Simplification
b.
If the number is larger than 2, then its square is larger than 4.
This number is not larger than 2.
Therefore the square of this number is not larger than 4.
Invalid – inverse error
c.
If at least one of these two numbers is divisible by 6, then the product is
divisible by 3.
Neither of these two numbers is divisible by 6.
Therefore the product is not divisible by 3.
Invalid – inverse error
d.
If there are as many rational numbers as there are irrational numbers, then
the set of all rational numbers is infinite.
The set of all rational numbers is infinite.
Therefore there are as many rational numbers as there are irrational
numbers.
Invalid – converse error
2. Suppose you are visiting an island where two kinds of people live: knights who
always tell the truth, and knaves who always lie. Two natives A and B approach
you, and B says: "Both of us are knaves".
What are A and B?
Explain your reasoning.
A – knave, B – knight
Assume A is a knight. Therefore A says the truth. Therefore A is a knave –
contradiction.
Therefore A is a knave.
According to A B is a knave too, but A does not say the truth, therefore B is a
knight
1
3. Prove by mathematical induction
1 + 2 + 22 + 23 + … + 2n = 2(n+1) - 1, n = 0, 1, 2, 3, …
Let P(n) be the statement S(n) = 2(n+1) - 1
1. Base step P(0) : S(0) = 2(0+1) – 1 = 2 – 1 = 1
By definition of the sequence, S(0) = 1
Therefore P(0) is true
2. Inductive step
Let P(k) = 2(k+1) – 1, P(k+1) = 2(k+2) - 1
We want to show that P(k)  P(k+1)
Assume P(k) is true, i.e. S(k) = 2(k+1) – 1
We want to show that S(k+1) = 2(k+2) – 1
S(k+1) = S(k) + 2(k+1) = 2(k+1) – 1 + 2(k+1) = 2. 2(k+1) - 1 = 2(k+2) -1
Therefore P(k+1) is true
By the principle of mathematical induction, for all n = 0, 1, …
1 + 2 + 22 + 23 + … + 2n = 2(n+1) – 1
4. Let the universal set be the set R of all real numbers and let
A = {x  R | -2  x  3}, B = { x  R | -1 < x < 4}.
Find each of the following:
AB
= {x  R | -2  x < 4}
AB
= {x  R | -1 < x  3}
~A
= {x  R | x < -2 V 3 < x}
~B
= {x  R | x  -1 V 4  x}
~A  ~B
= {x  R | x < -2 V 4  x }
~A  ~B
= {x  R | x  -1 V 3 < x }
~(A  B)
= {x  R | x < -2 V 4  x }
~(A  B)
= {x  R | x  -1 V 3 < x }
2
5. Prove using element proof that
(A - B) - C = A - (B  C)
1. We will show that (A - B) - C  A - (B  C)
Let x  (A - B) – C
By def of difference this means that
x  (A - B)
(1)
xC
(2)
From (1) by def of difference
xA
(3)
xB
(4)
From (2) and (4)
xBC
(5)
From (3) and (5) and def of difference
x  A - (B  C)
Therefore (A - B) - C  A - (B  C)
(6)
2. We will show that A - (B  C)  (A - B) - C
Let x  A - (B  C)
By def of difference
xA
(7)
xBC
(8)
From (8) x  ~( B  C)
Therefore
x~B~C
Therefore
x  ~ B and x  ~ C
Therefore
xB
(9)
xC
(10)
From (7) and (9) and def of difference
x  (A - B)
(11)
From (11) and (10) and def of difference
x  (A - B) – C
Therefore A - (B  C)  (A - B) – C
(12)
From (6) and (12) it follows that
(A - B) - C = A - (B  C)
6. Find the power set of
6.1. A = {{a}, {b}}
P(A) = {, {{a}}, {{b}}, {{a}, {b}}}
6.2. A = 
3
P (A) = {}
6.3. A = {}
P(A) = {, {}}
7. Let the universal set be all people. Within the universal set, A is the set of all
computer programmers, B is the set of all accountants, C is the set of all women,
D is the set of all people of age 40 and older. What are the following sets:
a. ~(A  B) = ~A  ~B The set of all people that are neither computer
programmers nor accountants
b. (A  B)  ~C The set of male computer programmers and male accountants
c. ~D  C  A The set of female computer programmers that are younger than 40.
8. Let A = {1,2,3,4,5}, B = {a, b, c, d, e}
a. Give a one-to-one function from A to B. Is it a bijection?
F = {(1,a), (2,b), (3,c), (4,d), (5,e)}
Yes it is a bijection
b. Give a function from A to B which is not one-to-one. Is it an onto function?
F = {(1, a), (2,a), (3,a), (4,a), (5,b)}
No, it is not an onto function
c. Give a function from A to B which is not onto. Is it one-to-one?
F = F = {(1, a), (2,a), (3,a), (4,a), (5,b)}
No, it is not an one-to-one function
9. Let A = {a,b,c}, B = {1,2}
a. Give an onto function from A to B. Is it one-to-one?
F = {(a,1), (b,1), (c,2)}
No, not one-to-one
b. Give a function from B to A which is one-to-one. Is it “onto”?
F = {(1,a), (2,b)} not onto
4
Download