MATH 387
Final Exam Solutions
1. (22 points) Below, a number is any string of digits that does not begin with a zero.
(a) (2 points) How many 6-digit numbers are there?
We may select the rst digit in any of 9 ways (any digit from 19), and the remaining
ve
MATH 387
Exam #2 Solutions
1. (12 points) Answer the following questions.
(a) (6 points) How many arrangements of the word MURMUR are there in which
no two consecutive letters are the same?
Let X consist of all permutations of the letters in MURMUR; let A
MATH 387
Exam #2
For full credit show all of your work (legibly!), unless otherwise specied. This exam is closednotes and calculators may not be used. Answers need not be completely reduced unless otherwise
stated, and may be left in terms of sums, dieren
MATH 387
Exam #1 Solutions
1. (12 points)
(a) (4 points) How many direct paths are there from the lower left corner to the upper right
corner of the following two-dimensional grid?
A path through this grid consists of 6 upwards steps and 4 steps to the ri
MATH 387
Practice Exam #1
1. (12 points)
(a) (3 points)How many even four-digit numbers have at least one 7 appearing as a digit?
(b) (3 points)How many even four-digit numbers have at least one 4 appearing as a digit?
(c) (6 points) How many even four-di
MATH 387
Problem Set #10 solutions
4.1.4. The sequence of Fibonacci numbers Fn is dened as F1 = 1, F2 = 1, and for n > 2,
Fn = Fn1 + Fn2 . Write an algorithm for obtaining F100 .
set F1 to 1;
set F2 to 1;
set i to 3;
while i 100 do
set Fi to Fi1 + Fi2 ;
s
MATH 387
Problem Set #12 solutions
5.3.2. Give an example of a graph G that has a circuit containing vertices u and v, but no cycle containing u and v.
a u b c v
Here u and v are on the shared circuit u a b c v b u, but are on no shared cycle, since any c
MATH 387
Problem Set #11 solutions
5.1.8. Find three nonisomorphic graphs with the same degree sequence (1, 1, 1, 2, 2, 3).
There are several such graphs: three are shown below.
5.1.10. Show that two projections of the Petersen graph are isomorphic.
The i
MATH 387
Problem Set #5 solutions
3.1.2. A leap year is a year that is divisible by 4, but not by 100 unless it is also divisible by 400. How many leap years are there from 1988 through 2400, inclusive? There are 104 years divisible by 4 in that range, of
MATH 387
Problem Set #8 solutions
7.2.12. (a) Find the coecient of z 2k in (1 + z 2 + z 4 + z 6 + )n .
1
This geometric series can be rewritten as (1z2 )n , which has series expansion
n+k1
k=0
n1
(z 2 )k =
n+k1
k=0
n1
z 2k , so the coecient of z 2k is
n+k
MATH 387
Problem Set #9 solutions
8.2.4. (a) Find the specic solution of an = 2an1 + 15an2 with initial conditions a0 = 1
and a1 = 2.
The characteristic polynomial of this recurrence relation is x2 2x15, which has
roots 3 and 5, so the general solution to
MATH 387
Problem Set #6 solutions
3.3.4. A juggler colors 12 identical juggling balls red, white, and blue.
(a) In how many ways can this be done if each color is used at least once?
Let us preemptively color one ball in each color, so that the 9 remainin
MATH 387
Final Exam Solutions
1. (12 points) Computationally, a vector is simply a list of numbers. We may represent an n-dimensional vector a as a list of n coordinates (a1 , a2 , a3 , . . . , an ). (a) (9 points) Write an algorithm to compute the dot pr
MATH 387
Problem Set #7 solutions
7.2.1. (a) Find the coecient of z k in (z 4 + z 5 + z 6 + z 7 + )5 , k 20.
1
We use the known series expansion (1z) = n+ 1 z n below:
n=0
1
(z 4 + z 5 + z 6 + z 7 + )5 = (z 4 )5 (1 + z + z 2 + z 3 + )5
=z
5
1
1z
20
= z 20
MATH 387-01
Exam #2 Practice problem solutions
7.1.2 Construct a generating function for an , the number of distributions of n identical
juggling balls to
1. Six dierent jugglers with at most four balls distributed to each juggler.
We want our exponent on
MATH 387
Problem Set #3 solutions
2.3.4. (a) How many teams of 5 players can be chosen from a group of 10 players? Assuming team members have indistinugishable roles, this is a matter of selecting 5 distinct elements in no order from a set of 10; we can c
MATH 387
Problem Set #2 solutions
2.1.10. On the menu of a Chinese restaurant there are 7 chicken dishes, 6 beef dishes, 6
pork dishes, 8 seafood dishes, and 9 vegetable dishes.
(a) In how many ways can a family order if they choose exactly one dish of ea
MATH 387
Practice Exam #1
1. (12 points)
(a) (3 points) How many even four-digit numbers have at least one 7 appearing as a digit?
It is easier to count the total number of even four digit numbers, and subtract those
which have no 7s in. There are 9 10 10
MATH 387
Practice Exam #2
For full credit show all of your work (legibly!), unless otherwise specied. This exam is closednotes and calculators may not be used. Answers need not be completely reduced unless otherwise
stated, and may be left in terms of sum
MATH 387-01
Problem Set #1 Solutions
Learning to Count
1. (10 points) A rooted binary tree is a structure consisting of nodes hierarchically
arranged so that each node is be connected to either, both, or neither of a left child
and right child. Determine
MATH 387-01
Problem Set #2 solutions
Injections, Surjections, and the Pigeonhole Principle
1. (10 points) Here we will come up with a sloppy bound on the number of parenthesisnestings.
(a) (5 points) Describe an injection from the set of possible ways to
MATH 387-01
Problem Set #3
Inclusion-Exclusion
1. (15 points+5 point bonus) We shall below be discussing anagrams of the word MISSISSIPPI. Note that this word contains 4 instances of the letter S, 4 of I, 2 P, and one
M.
(a) (5 points) How many anagrams a
MATH 387-01
Problem Set #4 Solutions
1. (20 points) Let an represent the number of ways to distribute n unlableled balls among 3
distinguishable boxes such that each box contains at least 2 and no more than 7 balls.
n
(a) (5 points) Without explicitly cal
MATH 387-01
Problem Set #5 Solutions
1. (15 points) A string of numbers is called pleasant if it consists of some (possibly zero)
number of 0s and 1s (in any order) followed by some (possibly zero) number of 22s,
33s, 44s, 5s, and 6s (in any order). Let a
MATH 387-01
Problem Set #7 Solutions
1. (10 points) Demonstrate that, with suciently poorly-chosen ow-augmentations, the following graph might take as many as 100 iterations of the Ford-Fulkerson algorithm to nd a maximum ow. Also show that, with well-cho
MATH 387-01
Exam #1 Solutions
1. (15 points) You nd that you need to buy 22 hats. The hat shop has as many hats as you
might desire in four dierent varieties: stetsons, berets, stovepipes, and pillboxes. Hats within
a single variety are identical.
(a) (10
MATH 387-01
Exam #1
Name:
1. (15 points) Computationally, a vector is simply a list of numbers. We may represent an
n-dimensional vector a as a list of n coordinates (a1 , a2 , a3 , . . . , an ).
(a) (10 points) Write an algorithm, using only simple compu
MATH 387
Practice Final Exam Solutions
1. (12 points) For the following problem, the alphabet used is the standard 26-letter English
alphabet, and vowels refers only to the letters A, E, I, O, and U.
(a) (3 points) How many strings of ve letters contain a
MATH 387
Practice Final Exam
For full credit show all of your work (legibly!), unless otherwise specied. This exam is closednotes and calculators may not be used. Answers need not be completely reduced unless otherwise
stated, and may be left in terms of
MATH 387-01
Exam #1
Name:
For full credit show all of your work (legibly!), unless otherwise specied. Answers need not
(and probably should not) be completely reduced unless otherwise stated, and may be left in terms
of sums, dierences, products, quotient