Download Answers to some typical exercises

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

Large numbers wikipedia , lookup

List of important publications in mathematics wikipedia , lookup

Mathematics of radio engineering wikipedia , lookup

Addition wikipedia , lookup

Georg Cantor's first set theory article wikipedia , lookup

Laws of Form wikipedia , lookup

Chinese remainder theorem wikipedia , lookup

Fundamental theorem of calculus wikipedia , lookup

Volume and displacement indicators for an architectural structure wikipedia , lookup

Theorem wikipedia , lookup

Recurrence relation wikipedia , lookup

Fermat's Last Theorem wikipedia , lookup

Wiles's proof of Fermat's Last Theorem wikipedia , lookup

Four color theorem wikipedia , lookup

Mathematical proof wikipedia , lookup

Elementary mathematics wikipedia , lookup

Fundamental theorem of algebra wikipedia , lookup

Proofs of Fermat's little theorem wikipedia , lookup

Transcript
Answers to some typical exercises
—Any suggestion or modification is welcomed.
P51.12 Write each of the following in terms of p, q, r and logical connectives.
(a) Today is Monday and the dish did not run away with the spoon.
(b) Either the grass is wet or today is Monday.
(c) Today is not Monday and the grass is dry.
(d) The dish ran away with the spoon, but the grass is wet.
Solution: Let p: Today is Monday; q: The grass is wet; r: The dish ran away with the spoon. Then:
(a). p  ~ r ; (b). p  q ; (c). ~ p  ~ q ; (d). r  q
P57 In exercises 6 and 7, let p, q, and r be the following statements: p:
I will study discrete
structure; q: I will go to a movie; r: I am in a good mood.
7. Write English sentences corresponding to the following statements.
(a). ((~ p )  q )  r ; (b). r  ( p  q ) ; (c). (~ r )  ((~ q)  p) ; (d). (q  (~ p ))  r
Solution: (a) If I go to a movie and don’t study discrete structure, then I am in a good mood.
(b) If I am in a good mood, then I will study discrete structure or go to a movie.
(c) If I am not in a good mood, then I won’t go to a movie or I will study discrete structure.
(d) I will go to a movie and won’t study discrete structure if and only if I am in a good mood.
P57.14
If p  q is false, can you determine the truth value of (~ p )  ( p  q ) ? Explain
your answer.
Solution: Since p  q is false, then p is T and q is F. This implies that ~p is F and ( p  q )
is F. Hence, (~ p )  ( p  q ) is F.
P57.18. Write the negation of each of the following in good English
(b) If Coral is not sick, then if she goes to the picnic, she will have a good time.
Solution: Let p, q and r be the following statements: p: Carol is sick, q: Carol goes to the picnic r:
Carol will have a good time. Then the statement could be represented as: ~ p  (q  r ) . On
the other hand, we notice that ~ p  (q  r ) 
p  (~ q  r )  ( p  r )  (~ q) . Then
the negation of the statement is
~ (( p  r )  (~ q))  ~ ( p  r )  q  (~ p  ~ r )  q .
So in English, the negation of the statement is: Carol is not sick, and she goes to the picnic, but
she won’t have a good time.
P63.29
Prove that if x is a rational number and y is an irrational number, then x + y is an
irrational number.
Proof: Suppose, for sake of contradiction, that x +y is rational. Then there are integers a and b
a
c
. Since x is rational, then x 
(with some integers c and d ). Then we
d
b
a
c
ad  bc
have y = x + y  x 
=
. Noting that ad  bc and bd are integers, y is

bd
b
d
such that x + y 
rational. This is a contradiction. Hence, x + y is irrational.
P78.26.Three
fair six-sided dice are tossed and the numbers showing on the top faces are
recoded as a triple. How many different records are possible?
Solution: We can give the result in the following two different ways.
A) Case 1: The triples have 3 different numbers.
There are
6
C3 different records in this case.
Case 2: The triples have 2 different numbers.
Then there are 2  6 C2 different records in this case.
Case 3: The triples have the same number.
Then there are
6
C1 different records in this case.
Combining the above three cases, the result is
6
C1 + 2  6 C2 + 6 C3 =56.
B) The problem is equivalent to choosing r numbers from n different numbers in which the
repeatition is allowed. Then we can use the formula
P86.19.
n  r 1
Cr to get the result:
6  31
C3 =56.
Prove that any sequence of six numbers must contain a subsequence whose sum is
divisible by six.
Proof: Consider the remainder (divided by six) of the sums c1 , c1  c2 , c1  c2  c3 ,
c1  c2  c3  c4 , c1  c2  c3  c4  c5 and c1  c2  c3  c4  c5  c6 . If one of these has
remainder 0 when divided by 6, then we have done. If none of them have remainder 0, then
there are at most 5 cases (pigeonhole) of the remainder. Thus, at least two of them must have
the same remainder. The positive difference of these two is a subsequence whose sum is
divisible by 6.
P100.8.Let
A= {0, 1}. Give a recurrence relation for the number of strings of length n in
A* that do not contain 111.
Solution: Let cn be the number of strings of length n.
Since 0 and 1 are the only strings of length 1, c1 = 2. Also c2 = 4, c3 = 7. In general, any strings
p of length n -1 that does not contain 111 can be catenated with 0 to form a string 0  p, a string
of length n that does not contain 111. Similarly, the strings q and r of length n-2 and n-3 can be
catenated with 10 and 110 to form a string 10  q and 110  r, respectively. These 3 cases are all
the “good” strings of length n. Hence, cn  cn 1  cn 2  cn 3 with the initial conditions c1 =2,
c2 = 4, c3 = 7.
P100. 17. an  4an1  5an2 , a1  2, a2  6
Solution: The associated equation for this linear homogeneous relation is x  4 x  5  0 . The
2
roots of the equation are -1 and 5. Thus, by the theorem on P98, an  u  (1)  v  5 . Using
n
this formula and the initial conditions: ﹣u+5=2, u +25v = 6, we find that u is 
Then an  
P100.23.
n
2
4
, v is
.
3
15
2
4
(1) n  5n
3
15
Develop a general explicit formula for a nonhomogeneous recurrence relation of the
form an  ran 1  s , where r and s are constants.
Solution: an  ran 1  s  r (ran  2  s )  s  r an  2  rs  s 
2
 r n 1a1  r n  2 s 
s
r n 1  1
( r  1 ).
 r a1  s 
r 1
n 1
If r =1, then an  a1  (n  1) s .
P127. 20. A = the set of all ordered pairs of real numbers; (a, b) R (c, d) if and only if a = c.
Show that R is transitive.
Solution: Since (a, b) R (a, b) for any a, b ∈ A, R is reflexive. If (a, b) R (c, d), then a = c, and
therefore, (c, d) R(a, b) . This implies that R is symmetric. Now suppose (a, b) R (c,
d) and (c, d) R (e, f). Then a = c and c = e and, hence, a = e and (a, b) R (e, f). It follows
that R is transitive
P128. 29. Prove or disprove that if a relation on a set A is transitive and irreflexive, then it is
asymmetric.
Proof: Let R be transitive and irreflexive. We prove that R is asymmetric.
For the sake of contradiction, assume that R is not asymmetric, i.e., a R b and b R a for
some a and b. Then a R a since R is transitive. But this contradicts the fact that R is
irreflexive. Hence R is asymmetric.
P132. 19. A relation R on a set is called circular if a R b and b R c imply c R a.
Show that R is reflexive and circular if and only if it is an equivalence relation.
Proof: Suppose that R is reflexive and circular. If a R b, then b R a (since b R b and R is circular).
Hence R is symmetric.
If a R b and b R c, then c R a. Noting that R is symmetric, a R c , i.e., R is transitive.
Conversely, suppose that R is an equivalence relation.
Then R is reflexive. If a R b and b R c, then a R c (transitivity) and c R a
( symmetricity ).
This implies that R is circular, which completes the proof.
P106. 29. Let A, B, and C be subsets of U. Prove that A  (B C)=(A  B) (A  C).
Proof: If (x, y)  A  (B C), then x  A, y  B C. Hence (x, y)  A  B or (x, y) A  C.
Thus, A  (B
C)  (A  B) (A  C).
Conversely, if (x, y)  (A  B) (A  C), then x  A, y  B or y  C. Hence y  B C
Therefore, (x, y)  A  (B C). This implies that (A  B) (A  C)  A  (B C).
The above discussion shows that A  (B C) = (A  B) (A  C), as desired.
P114. 18. Let R be a relation from A to B. Prove that for all subsets A1 and A2 ,
R (A1
A2) = R (A1)
Proof: Suppose R (A1
R (A1)
R (A2) if and only if R (a)
A2) = R (A1)
R (A2) = R (A1
A2 ) =
R (b) =
R (A2). Put A1 =
  for all distinct a, b in A.
a , A2 = b . Then R (a)
R (b) =
 .
Conversely, assume that R (a)
R (b) =
  for all distinct a, b in A. So for any y∈B,
if y  R (A1) R(A2), i.e., y  R (A1) and y  R(A2), then there is exactly one element x in
both A1 and A2 such that y R x , so y  R (A1 A2). This implies that R (A1) R (A2)  R
(A1 A2). On the other hand, by Part (c) of Theorem 1 we know that R (A1 A2)  R
(A1) R (A2). It follows that R (A1 A2) = R (A1) R (A2).
P115 20. If A has n elements and B has m elements, how many different relations are there from A
to B?
Solution: A  B contains mn elements. A relation R from A to B is a subset of A  B and there are
2mn subsets of A  B. So there are 2mn different relations from A to B
P115 27. Describe how to find the in-degree and the out-degree of each vertex.
Solution: The in-degree of a vertex is the number of ones in the corresponding column of this
vertex. Similarly, the out-degree of a vertex is the number of ones in the corresponding
row of this vertex.
P121 25. By Theorem 1, M R
MR =M
R2
so that M R
M R shows
1
0
where there are paths of length 2 in the digraph of R.. Let MR = 
0

0
What does M R  M R show?
1 1 1
0 1 0 
.
1 0 0

1 1 1
Solution: The ij-entry of M R  M R is the number of paths of length 2 from i to j in the digraph
since it equals the number of k’s satisfying aik = bkj =1.
P148 6. Let A= {2,3,6,12} and let R and S be the following relations on A: x R y if and only if
2| (x-y); x S y if and only if 3| (x-y). Compute (a) R ; (b) R
S; (c) R
1
S (d) S .
Solution: According to the definition of R and S, we have
R={(2,2) (2,6) (2,12) (3,3) (6,2) (6,6) (6,12) (12,2) (12,6) (12,12)}
S={(2,2) (3,3) (3,6) (3,12) (6,3) (6,6) (6,12) (12,3) (12,6) (12,12)}.
On the hand, we know that
A  A={(2,2) (2,3) (2,6) (2,12) (3,2) (3,3) (3,6) (3,12) (6,2) (6,3) (6,6) (6,12) (12,2)
(12,3) (12,6) (12,12)}
So R ={(2,3) (3,2) (3,6) (3,12) (6,3) (12,3)}.
R
R
S={(2,2) (3,3) (6,6) (6,12) (12,6) (12,12)}
S={(2,2) (2,6) (2,12) (3,3) (3,6) (3,12) (6,2) (6,3) (6,6) (6,12) (12,2) (12,3) (12,6)
(12,12)}
S 1 ={(2,2) (3,3) (6,3) (12,3) (3,6) (6,6) (12,6) (3,12) (6,12) (12,12)}
P150 32. Prove Theorem 3: Let R be a relation on a set A. Then
1
(a) R is symmetric if and only if R = R .
R1   .
(b) R is antisymmetric if and only if R
(c) R is asymmetric if and only if R
Proof
R1 =  .
1
1
(a) Suppose R is symmetric. If a R b, then b R a, i.e., a R b. Therefore, R  R .
1
On the other hand, if a R b, then b R a. Since R is symmetric, a R b. So R
Combining R
1
1
 R.
 R with R  R1 , we have R = R1 .
1
1
Conversely, if R = R , then for any a R b, we have a R b, so b R a.
We can conclude that R is symmetric.
(b) Suppose R is antisymmetric. That is, if a R b, then b R a, unless a = b. In other
1
words, if a R b and a R b, i.e., a R
implies that R
R1 b, then a = b and therefore, a  b. This
R1   .
Conversely, suppose R
or equivalently, a R
R1   . Let a R b and b R a, i.e., a R b and a R1 b,
R1 b. On the other hand, we notice that R
R1   . So
a  b, which implies that a = b. Therefore, R is antisymmetric.
(c) Suppose R is asymmetric. That is, if a R b, then b R a. For the sake of
contradiction, assume that R
R1 ≠  and a R
R1 b. Then we have a R b and
a R 1 b, i.e., a R b and b R a. This is a contradiction.
Conversely, suppose R
R1 =  . Then if a R b, we have a R
-1
b. That is, if
a R b, then b R a. It follows that R is asymmetric, which completes our proof.