Last Year`s hw and solutions 16-20

advertisement
COMP SCI 241 Discrete Mathematics I
HW #16
Due: Tuesday 14 April
NAME
Spring 2009
F. Baulieu
Let the domain of discourse be the set of all books on reserve at the Cofrin Library on April 1,
2009.
Let
M(x): x is a mathematics book
P(x): x is a physics book
H(x,y): x weighs more than y
C(x,y): x costs more than y
D(x,y): x and y are different books.
Translate into quantified symbolic form:
a)
Some of the books on reserve at the Cofrin Library on April 1, 2009 were mathematics
books.
b)
The heaviest book on reserve at the Cofrin Library on April 1, 2009 was not the
expensive.
c)
One of the mathematics books on reserve at the Cofrin Library on April 1, 2009
weighed more than every one of the physics books.
d)
There is a most expensive book among those on reserve at the Cofrin Library on April 1,
2009.
e)
Of all the books on reserve at the Cofrin Library on April 1, 2009, no two had the same
price.
most
COMP SCI 241 Discrete Mathematics I
HW # 17
Due: Thursday 16 April
NAME
Give a formal proof that the square of an odd integer is always an odd integer.
Use a two-column format, number your statements, and justify each step.
Spring 2009
F. Baulieu
COMP SCI 241 Discrete Mathematics I
HW # 18
Due: Tuesday 21 April
NAME
Use mathematical induction to prove:
For every positive integer, n,
j
n
n
3
3
 5   20  15 
4
j 0  4 
Spring 2009
F. Baulieu
COMP SCI 241 Discrete Mathematics I
Homework # 19
Due: Thursday 23 April
NAME
Use mathematical induction to prove:
5
3
If n is a positive integer, then 120 divides n  5n  4n .
Spring 2009
F. Baulieu
COMP SCI 241 Discrete Mathematics I
HW #20
Due: Tuesday 28 April
NAME
Spring 2009
F. Baulieu
100  3  j
1) Compute precisely:   
j 0  2 
n
2) Use mathematical induction to prove:
 j( j!)  (n  1)!1
j1
3) In how many ways can we arrange the letters in the word SIGMA in a row if the S must
come at one end or the other?
COMP SCI 241 Discrete Mathematics I
HW #16
Solutions.
Spring 2009
F. Baulieu
Let the domain of discourse be the set of all books on reserve at the Cofrin Library on April 1,
2009.
Let
M(x): x is a mathematics book
P(x): x is a physics book
H(x,y): x weighs more than y
C(x,y): x costs more than y
D(x,y): x and y are different books.
Translate into quantified symbolic form:
a)
Some of the books on reserve at the Cofrin Library on April 1, 2009 were mathematics
books.
x M(x)
b)
The heaviest book on reserve at the Cofrin Library on April 1, 2009 was not the
expensive.
most
x y(z)(D(x, z)  H(x, z))  C(y, x)
c)
One of the mathematics books on reserve at the Cofrin Library on April 1, 2009
weighed more than every one of the physics books.
x M(x)  yP(y)  H(x, y)
d)
There is a most expensive book among those on reserve at the Cofrin Library on April 1,
2009.
x yD(x, y)  C(x, y)
e)
Of all the books on reserve at the Cofrin Library on April 1, 2009, no two had the same
price.
x yD(x, y)  C(x, y)  C(y, x)
COMP SCI 241 Discrete Mathematics I
HW # 17
Solutions.
Spring 2009
F. Baulieu
Give a formal proof that the square of an odd integer is always an odd integer.
Use a two-column format, number your statements, and justify each step.
1) Let x be an odd integer
2) Let n be an integer such that
x = 2n + 1.
2
2
3) x  (2n  1)
2
2
4) x  4n  4n  1
2
5) x  2(2n  2)  1
6) 2n +2 is an integer
7) x2 is odd.
1) Arbitrary selection
2) (1), definition of “odd”
3) (2)
4) (3), algebra
5) (4), algebra
6) (2), closure of the integers under addition and
multiplication.
7) (5),(6), definition of “odd”
COMP SCI 241 Discrete Mathematics I
HW # 18
Solutions.
Spring 2009
F. Baulieu
Use mathematical induction to prove:
For every positive integer, n,
j
n
n
3
3
 5   20  15 
4
j 0  4 
Base case: n = 1. Then
j
n
1
j
0
1
15 35
3
3
3
3
 5    5   5   5   5  
4
4
4
4
j 0  4 
j 0  4 
Meanwhile
n
1
 3
 3  80 45 35
20  15   20  15   

4
4
4
 4
 4
Q.E.D. (base case) by transitivity of equality.
Inductive case: Assume
j
k
3
3
 5   20  15 
4
j 0  4 
k
Then
 k  3  j   3  k 1
 5     5    5 
 j 0  4    4 
j 0  4 
k
k 1

 3    3 
 20  15    5 
 4    4 

k 1  3  j
3
 20  15 
4
k 1
3
 20  20 
4
Q.E.D.( inductive case.)
4 3
   5 
3 4
k 1
3
 5 
4
k 1
k 1
3
 20  15 
4
k 1
COMP SCI 241 Discrete Mathematics I
Homework # 19
Solutions.
Spring 2009
F. Baulieu
Use mathematical induction to prove:
5
3
If n is a positive integer, then 120 divides n  5n  4n .
Base case: When n = 1,
5
3
n  5n  4n  1  5  4  0 which is divisible by 120. Q.E.D.(base case)
5
3
Inductive case: Assume (k )  5k  4k is divisible by 120.
5
3
Then there is an integer, s, such that (k )  5k  4k  120s .
5
3
Consider (k  1)  5(k  1)  4(k  1) .
5
3
(k  1)  5(k  1)  4(k  1)

 

 k 5  5k 4  10 k 3  10 k 2  5k  1  5 k 3  3k 2  3k  1  4k  1
 k 5  5k 4  10 k 3  10 k 2  5k  1  5k 3  15k 2  15k  5  4k  4

 k 5  5k 3  4k  5k 4  10 k 3  10 k 2  5k  1  15k 2  15k  5  4

 120s  5k 4  10 k 3  5k 2  10 k




 120s  5 k 4  2k 3  k 2  2k  120s  5k k 3  2k 2  k  2




 120s  5k k 3  2k 2  k  2  120s  5k (k  1)( k  1)( k  2)
But k (k  1)(k  1)(k  2) is the product of four consecutive integers. One must be a multiple
of 3, and there must be two even factors, and one of those must be a multiple of 4. Thus we can
factor out a 2, 3, and 4 from this expression.
k (k  1)(k  1)(k  2)  (2)(3)(4)t where t is an integer.
5
3
Thus (k  1)  5(k  1)  4(k  1)  120s  5(2)(3)(4) t  120(s  t )
And since s and t are both integers, so is s+t.
Q.E.D. (inductive case).
Alternatively, instead of factoring and following the “But…” line of reasoning above, we can try
3
2
to prove that k k  2k  k  2 is a multiple of 24 by induction! Then we’ll call that result
Lemma 1 and use it in our proof instead of the “But…” argument.




3
2
Lemma 1: For any positive integer, n, n n  2n  n  2 is a multiple of 24.
Proof: (by induction on n).
3
2
Base case: n = 1. Then n n  2n  n  2  1(1  2  1  1)  0 which is a multiple of 24.
Q.E.D. (base case).




3
2
Inductive case: Suppose k k  2k  k  2 is a multiple of 24. Then there is an integer w
3
2
for which k k  2k  k  2  24w .
3
2
Consider (k  1) (k  1)  2(k  1)  (k  1)  2




(k  1) (k  1) 3  2(k  1) 2  (k  1)  2



 (k  1) k 3  3k 2  3k  1  2k 2  4k  2  k  1  2

 k k 3  3k 2  3k  1  2k 2  4k  2  k  1  2




 k 3  3k 2  3k  1  2k 2  4k  2  k  3

 k k 3  2k 2  k  2  3k 2  7 k  2


 k 3  2k 2  k  3k 2  7 k

 


 k k 3  2k 2  k  2  k 3k 2  7 k  1


 k 3  2k 2  k  2  3k 2  7k
 

 24 w  k 3k 2  7k  2  k 3  2k 2  k  2  3k 2  7 k

 24 w  4k 3  12 k 2  8k

 24 w  4 k 3  3k 2  2k



3
2
We’d be done if we knew k  3k  2k were a multiple of 6….
We could factor it to see that it is the product of three consecutive integers, and since one of
those must be a multiple of 3 and one must be even, their product must be a multiple of 6, or we
could postpone the final step of this proof while we prove…


3
2
Lemma 2. For any positive integer, n, n  3n  2n is a multiple of 6.
Proof: (by induction on n).
3
2
Base case: n = 1. Then n  3n  2n  1  3  2  6 which is a multiple of 6.
Q.E.D. (base case).




3
2
Inductive case: Suppose k  3k  2k is a multiple of 6. So there is an integer z such that
3
2
k

 3k  2k  6z

3
2
Consider (k  1)  3(k  1)  2(k  1)
3
2
3
(k  1)


 3(k  1)  2(k  1)  k  3k 2  3k  1  3k 2  6k  3  2k  2
 k 3  3k 2  2k  3k 2  6k  3k  6
 6z  3k 2  6k  3k  6


 6z  3 k 2  3k  2


2
Well, we’d be done if we knew k  3k  2 were even. Just for variety, we’ll prove this by
2
cases: If k is even, then so are k , 3k , and 2 so the sum of these three is even.
2
2
2
If k is odd, then so are k and 3k , so that k  3k is even, so k  3k  2 is even.
2
2
Thus, for every integer, k, k  3k  2 is even, so 3 k  3k  2 is a multiple of 6, so
6z  3 k 2  3k  2 is a multiple of 6, Q.E.D. (Lemma 2 inductive case.)







We can use Lemma 2 now to finish the proof of Lemma 1.
We can then use Lemma 1 to finish the proof of the homework problem.
Wasn’t the idea of factoring a better idea?

COMP SCI 241 Discrete Mathematics I
HW #20
Solutions.
Spring 2009
F. Baulieu
100  3  j
1) Compute precisely:   
j 0  2 
100
3
This is a geometric series with first term 1, last term  
2
and ratio
3
so the sum is
2
100
 3  3 
1    
 2  2 
3
1  
2
101
3
 2  2 
2

1546132562196033990574082188840405015112916155251
1267650600228229401496703205376
n
2) Use mathematical induction to prove:
 j( j!)  (n  1)!1
j1
n
1
Base case: if n=1,  j( j!)   j( j!)  1(1!)  1.
j1
j1
Meanwhile, (n  1)!1  (1  1)!1  2!1  2  1  1. Q.E.D. (base case)
k
Inductive step: Assume  j( j!)  ( k  1)!1.
j1
Then
k 1
k
j1
j1
 j( j!)   j( j!)  (k  1)(( k  1)!)
 (k  1)!1  (k  1)(( k  1)!)
 (k  1)!(k  1)(( k  1)!)  1
 (k  1)!(1  (k  1))  1
 (k  1)!(k  2)  1
 (k  2)!1
Q.E.D.
3) In how many ways can we arrange the letters in the word SIGMA in a row if the S must
come at one end or the other?
Place the S, then arrange the remaining 4 letters in the remaining positions
2  4! 48
Download