discrete structures

advertisement
discrete structures in mathematics and computer science
Q1) Use the standard logical equivalences to simplify the expression
(ㄱ p ^ q) v ㄱ(pVq)
Solution.
(p  q )  ( p  q )
 (p  ( p  q )  (q  ( p  q )
 p  (q  ( p  q )
 p  [q  (p  q )]
 p  [( q  p )  (q  q )]
 p  [( q  p)  t ] ………………t means the tautology
 p  (q  p )
 p
Method 2:
(p  q )  ( p  q )
 (p  q)  (p  q) ( By the De Morgan law)
 p  (q  q ) (By Distributive law)
 p  t
 p
(since q  q  t )
Q2) consider the following theorem
"The square of every odd natural number is again an odd number"
What is the hypothesis of the theorem? what is the conclusion? give a direct proof of the
theorem.
Solution. The hypothesis of the theorem is: n is an odd natural number; the conclusion is:
n 2 is an odd natural number.
Proof. Since n is an odd natural number, n=2k+1 for some nonnegative integer k. Hence,
n 2  (2k  1) 2  2(k 2  2k )  1  2k '1
where k '  k 2  2k is a nonnegative integer (since k is a nonnegative integer). Hence, by
the definition of an odd integer, we know that n 2 is an odd natural number.
Q3) consider the following theorem
" The sum of a rational number and an irrational number is an irrational number.
What is the hypothesis of the theorem? what is the conclusion? Give a direct proof of the
theorem
Solution. The hypothesis of the theorem is: x is a rational number and y is an irrational
number; the conclusion is: x+y is an irrational number.
Proof. We prove it by contradiction. Suppose that x+y is NOT an irrational number.
Then x+y is a rational number. Hence,
x y 
p
q
…………………..(1)
where p and q are integers and q  0 . By the hypothesis: x is a rational number, we have
x
p'
q'
…………………….(2)
where p’ and q’ are integers and q ' 0 . By (1)(2), we have
y  qp  qp'' 
pq'  p 'q
qq'
is a rational number, which is a contradiction. So, x+y must be an irrational number.
Q4) Prove that for any integer n, 3 ㅣ n^3+2n (Hint, consider 3 separate cases)
Proof. By the Quotient Remainder Theorem, we choose the divisor d=3, for any integer n,
there are three cases:
Case 1: n=3k for some integer k.
Then, n 3  2n  (3k ) 3  2 * 3k  3(9k 3  2k )
So, n 3  2n is divisible by 3.
Case 2: n=3k+1 for some integer k.
Then,
n 3  2n  (3k  1) 3  2 * (3k  1)
 (27k 3  27k 2  9k  1)  6k  2
 3(9k 3  9k 2  5k  1)
So, n 3  2n is divisible by 3.
Case 3: n=3k+2 for some integer k.
Then,
n 3  2n  (3k  2) 3  2 * (3k  2)
 (27k 3  54k 2  36k  8)  6k  4
 3(9k 3  18k 2  14k  4)
So, n 3  2n is divisible by 3.
Since in each case, we have proved that n 3  2n is divisible by 3. So, we conclude that
for any integer n, n 3  2n is divisible by 3.
Q5) For the following sets A and B find A∪B, A∩B and AB.
a) A={1,2,a} B={2,3,a}
Solution: A  B  {1,2,3, a} , A  B  {2, a}
But we do not have any set operation like AB. Please check it, and let me know.
b) A={2,7,b), B={7,3,4}
Solution: A  B  {2,3,4,7, b} , A  B  {7}
c) A=Z, B=N
Solution: Since every natural number in N is an integer, N  Z . Hence,
A  B  Z , A B  N .
Q6) Write down the power sets for each of the following sets:
a) φ
Solution: Since the power set of a set is the set of all subsets. Note that  is an empty set
which contains no elements. Hence, the power set of  is  .
b) {φ}
Solution: Since the power set of a set is the set of all subsets. Hence, the power set of
{} is {,{}} .
c) {4,7}
Solution: Since the power set of a set is the set of all subsets. Hence, the power set of
{4, 7} is  is {,{4},{7},{4,7}} .
Q7) Find the Cartesian products A*B, B^2 and A^3 for the sets A={0,x} and B={0,1,4}.
Solution: By the definition, we know that the Cartesian product A*B is
{( 0,0), (0,1), (0,4), ( x,0), ( x,1), ( x,4)}
By the definition, we know that the Cartesian product B^2 is B*B, which is
{( 0,0), (0,1), (0,4), (1,0), (1,1), (1,4), (4,0), (4,1), (4,4)}
By the definition, we know that the Cartesian product A^3 is A*A*A, which is
{( 0,0,0), (0,0, x), (0, x,0), ( x,0,0), ( x, x,0), (0, x, x), ( x,0, x), ( x, x, x)}
Download