Download Solution

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

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

Document related concepts
no text concepts found
Transcript
CmSc175 Discrete Mathematics
Homework 06 due 02/22 SOLUTIONS
1. Using the logical equivalences show that (A V B)  ~A = B  ~A
(A V B)  ~A = (A  ~A) V (B  ~A) = F V (B  ~A) = B  ~A
2. Give direct proof for the following statement
The product of two odd numbers is odd
Let p = 2k – 1 , q = 2m – 1
p . q = (2k – 1 )(2m – 1 ) = 2k . 2m – 2k – 2m +1 = 2 (2km – k – m) + 1
Therefore the product of two odd numbers is odd
3. Let S(n) = 1*2 + 2*3 + 3*4 + … +n*(n+1) , n ≥1
Note: '*' is multiplication
Prove by mathematical induction that S(n) = n*(n+1)*(n+2)/3
We will prove the statement P(n): S(n) = n*(n+1)*(n+2)/3
a. Inductive base:
We will show that P(1) is true
P(1): S(1) = 1(1+1)(1+2)/3 = 1*2*3/3 = 2
By the definition of the sum, S(1) = 1*2 = 2
Therefore P(1) is true
b. Inductive step
We will show that P(k)  P(k+1) is true
Assume that P(k): S(k) = k(k+1)(k+2)/3 is true.
We will show that P(k+1): S(k+1) = (k+1)(k+2)(k+3)/3 is also true
S(k+1) = S(k) + (k+1)(k+2) = k(k+1)(k+2)/3 + 3(k+1)(k+2)/3 =
= ( k(k+1)(k+2) + 3(k+1)(k+2) ) /3 =
= ( (k+1)(k+2) (k + 3))/3 = (k+1)(k+2)(k+3)/3
By the principle of mathematical induction for all n ≥1
1*2 + 2*3 + 3*4 + … +n*(n+1) =n*(n+1)*(n+2)/3
4. 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 A says: "B is a knight". B says: “ A and I are of opposite type”
What are A and B? Explain your reasoning.
1
Assume that A is a knight. Then, what A says is true. Therefore B is a knight.
What B says should be true, therefore A cannot be a knight – should be of
opposite type. This is a contradiction.
Therefore A is a knave. A lies, so B is a knave too.
5. True or false? Check the appropriate box
True
{3}  { 1, 2, 3}
2  { 1, 2}
X
2  { 1}
X
{1}  {{1}, 2}
X
{1}  {1, {2}}
X
1  {1}
X
{3}  {1, {2}, {3} }
X
{2}  {1, {2, 4}, {3} }
X
1  {{1}, 2}
X
1  { 1 , 2}
X
{1}  { {1} , 2}
X
X
{1}  { {1} , 2}
6.
False
X
{1}  { 1 , 2}
X
{1}  {1}
X
Let A = {1,2,3,4,5,6,7}. For each set below determine whether it is a partition of
A or not. If the answer is negative, explain why the set is not a partition:
a. {{1,2},{3,4,5,7},{6}} yes
b. {{1,3,7},{3,4,5,6}} no, 3 appears in two sets, 2 is missing
c. {{1}{2,4,5},{3,6,7}} yes
d. {{2,3,4},{1,5,7}}
no, 6 is missing
2
7.
Let X = {a,b}, Y = {1,2}
a. Write down the elements of (X x Y)
X x Y = {(a,1), (a,2), (b,1), (b,2)}
b. Write down the elements of (Y x X)
(Y x X) = {(1,a), (1,b), (2,a), (2,b)}
8. Let A = {x | x < 3 V x > 10}
Let B = {x | 2  x < 5 V 6  x < 20}
Find
A  B={x|x<5 V 6x}
A  B = {x | 2  x < 3 10 < x < 20}
A – B = { x | x <2 V 20  x }
B – A = { x | 3  x < 5 V 6  x  10 }
9. Using set identities and the equivalence A – B = A  ~B prove that
A – B = A – (A  B)
A – (A  B)
(Alternative Representation)
= A  ~(A  B)
(De Morgan’s Laws)
= A  (~A  ~B)
(Distributive Laws)
= (A  ~A)  (A  ~B)
(Exclusion Law)
=   (A  ~B)
(Identity Law)
= A  ~B
(Alternative Representation)
=A–B
10. 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.
Using set operations union, intersection and complement, write the expressions for the
following sets
a. The set of all male computer programmers who are also accountants
A ~CB
b. The set of all female accountants under 40
C  B  ~D
3
c. The set of all female persons that are either computer programmers or
accountants.
C  (A  B )
11. For each Venn diagram below write down the set expression corresponding to the
shaded area
a) A  B  C
b) (A  B)  (A  C)  (B  C)
c) (A  B)  (A  C)  (B  C) - A  B  C
d) ((A – B ) – C)  ((B – C) – A)  ((C – A ) – B)
Or: (A  C  B) – ((A  B)  (A  C)  (B  C))
Or: (A – (B  C) )  (B – (C A))  (C – (A  B))
12. Write the power sets of the following sets:
12.1. A = {1, 2}
P (A) = {, {1}, {2}, {1, 2 }}
4
12.2.
A=
P (A) = {}
12.3.
A = {}
P (A) = {, {}}
5
Related documents