You are on page 1of 4

ICS 141 Section 2 Exam 3 Thursday, November 18, 2004

Name: Student ID:

Instructions. Write your name and your student id number in the spaces provided above. Each
problem is worth 12 points. Write your answers in the spaces provided on this exam. Do not use
your own paper. If you need scratch paper, use the back pages of the exam. You must justify your
answers to receive full credit. You may use a calculator. This exam is closed book and closed notes.

1. Use the Principle of Mathematical Induction to prove that


P (n) : 1 + 4 + 7 + 10 + + (3n 2) = n(3n 1)/2, for all integers n 1.

Basis Step: The proposition P (1) says that 1 = 1(3 1 1)/2, and this is true.
Induction Step: Let n be a fixed, but arbitrary, positive integer integer for which
P (n) : 1 + 4 + 7 + 10 + + (3n 2) = n(3n 1)/2
is true. Adding 3(n + 1) 2 to both sides of this equation we find
   
1 + 4 + + (3n 2) + 3(n + 1) 2 = n(3n 1)/2 + 3(n + 1) 2
 
= n(3n 1) + 6(n + 1) 4 /2
= 3n2 + 5n + 2 /2


= (n + 1)(3n + 2)/2
 
= (n + 1) 3(n + 1) 1 /2,
   
so P (n + 1) : 1 + 4 + + (3n 2) + 3(n + 1) 2 = (n + 1) 3(n + 1) 1 /2 is true whenever
P (n) is true.
By the Principle of Mathematical Induction 1 + 4 + 7 + 10 + + (3n 2) = n(3n 1)/2 for
every positive integer n 1.
2. Use the Principle of Mathematical Induction to prove that 2 divides n2 + 3n for all positive
integers n.
We are to prove P (n) : 2 | (n2 + 3n) for every integer n 1.
Basis Step: When n = 1, n2 + 3n = 12 + 3 1 = 4, so the proposition P (1) says 2 | 4, which is
true.
Induction Step: Let n be a fixed, but arbitrary, positive integer for which 2 | (n2 + 3n) is true.
Then (n + 1)2 + 3(n + 1) = n2 + 2n + 1 + 3n + 3 = (n2 + 3n) + 2(n + 2), and since 2 | (n2 + 3n)
and 2 | [2(n + 2)] we see that 2 | [(n + 1)2 + 3(n + 1)]. Thus 2 | [(n + 1)2 + 3(n + 1)] whenever
2 | (n2 + 3n).
By the Principle of Mathematical Induction, 2 | (n2 + 3n) for every integer n 1.
2

3. (a) What is the difference between an r-combination and an r-permutation of a set with n
elements?
An r-combination is an unordered selection of r distinct objects, whereas an r-permutation
is an ordered selection of r distinct objects.
(b) Derive an equation that relates the number of r-combinations and the number ofr-permutation
of a set with n elements.
n! n!
C(n, r) = r!(nr)! and P (n, r) = (nr)! , so
P (n, r) = r!C(n, r).

4. A computer randomly prints three-digit codes, with no repeated digits in any code (for example,
387, 072, 760). What is the minimum number of codes that must be printed in order to guarantee
that at least six of the codes are identical? (Hint: use the generalized pigeon hole principle.)
There are P (10, 3) = (10)(9)(8) = 720 distinct code values (pigeon holes). The minimum
number of printed codes (pigeons) needed is 5 P (10, 3) + 1 = 3601.
5. Find the number of bit strings of length 12
(a) that begin with 110
There are 2123 = 29 = 512 such bit strings.
(b) that begin with 11 and end with 10
There are 2124 = 28 = 256 such bit strings.
(c) that begin with 11 or end with 10
Using the inclusion-exclusion rule, there are 210 + 210 28 = 1792 such bit strings.
(d) that have exactly four 1s.
We are counting the number of distinguishable permutations of a bit string with four 1s
and eight 0s:
12!
C(12, 4) = = 495.
4! 8!

6. Find the number of distinguishable permutations of the letters in the word NONSENSE.
There are 3 Ns, 2 Ss, 2 Es and 1 O, so the number of distinguishable permutations
is given by the multinomial
8!
= 1680.
3! 2! 2! 1!
3

7. You have 50 pennies and 3 jars, labeled A, B, and C. In how many ways can you:
(a) put the pennies in the jars, assuming that the pennies are distinguishable? (Hint: view this
as an ordered sample with repetition.)
Each penny can select one of the three jars. Since the pennies are distinguishable, order
matters. Therefore, we are counting the number of ordered samples, with repetition, of size
r = 50 made from a set of size n = 3. The number of such samples is
350 .

(b) put the pennies in the jars, assuming that the pennies are identical? (Hint: view this as an
unordered sample with repetition.)
Again, each penny can select one of the three jars. Since the pennies are identical, order
does not matter. Therefore we are taking an unordered sample, with repetition, of size
r = 50 from a set with n = 3 elements. The number of samples is therefore
52 51
C(3 + 50 1, 50) = C(52, 50) = C(52, 2) = = 1326.
2

8. A game consisting of flipping a coin ends when the player gets two heads in a row, two tails in
a row, or flips the coin four times.
(a) Draw a tree diagram to show the ways in which the game can end.
u u
H HH H HTHH
u u
   

X  
XXX H   X XXX
XXXu  XXXu
T  T
H
X XXX
XXXu
HTHT
T
HTT

u
@
@
@ u
@
T
H THH
u u
  
@ 
@ H  X XXX H THTH
u u
  X  

@X T 
XXX
XXX XXX
T
XXXu T
XXXu
TT THTT
(b) In how many ways can the game end?
There are 8 ways to end the game.
9. (a) Use the binomial theorem to expand (x + y)5 .

           
5 5 5 5 4 5 3 2 5 2 3 5 4 5 5
(x + y) = x + x y+ x y + x y + xy + y
0 1 2 3 4 1
(x + y)5 = x5 + 5x4 y + 10x3 y 2 + 10x2 y 3 + 5xy 4 + y 5
4

(b) Find the coefficient of x7 y 5 in the expansion of (3x y)12 .


C(12, 5)(3x)7 (y)5 = C(12, 5)(37 )(1)5 x7 y 5 , so the coefficient is 37 C(12, 5).
10. (a) How many non-negative integer solutions are there to the equation x1 +x2 +x3 +x4 +x5 = 21?
C(25, 21) = C(25, 4) = 12650.
(b) How many solutions have x1 1?
We let y1 = x1 1, y2 = x2 , y3 = x3 , y4 = x4 , y5 = x5 and we count the number of non-
negative integer solutions for y1 + y2 + y3 + y4 + y5 = 20. The number of solutions is
C(24, 20) = C(24, 4) = 10626.
(c) How many solutions have xi 2, (i = 1, 2, 3, 4, 5)?
We let y1 = x1 2, y2 = x2 2, y3 = x3 2, y4 = x4 2, y5 = x5 2 and we count the
number of non-negative integer solutions for y1 + y2 + y3 + y4 + y5 = 11. The number of
solutions is C(15, 11) = C(15, 4) = 1365.
(d) How many solutions have x1 10?
Using the Sum Rule, the number of solutions with 0 x1 10 added to the number of
solutions with x1 11 gives all the non-negative integer solutions. Thus the number of
solutions with x1 10 is C(25, 21) C(14, 10) = 12650 1001 = 11649.
(e) How many non-negative integer solutions are there to the equation x1 +x2 +x3 +x4 +x5 < 21?
Introduce x6 1 so that x1 + x2 + x3 + x4 + x5 + x6 = 21, then we count the number of
solutions for the equation y1 + y2 + y3 + y4 + y5 + y6 = 20 (this is similar to part (b)). The
number of solutions is C(25, 20) = C(25, 5) = 53130.

You might also like