100% found this document useful (1 vote)
359 views10 pages

Discrete Exam2

This document contains a test for a discrete mathematics course covering chapters 4 and 5. The test has 32 questions ranging from counting problems to proofs involving binomial coefficients and inclusion-exclusion. It provides context for the types of problems assessed, such as counting arrangements, permutations, and combinations. Students are instructed to show their work and approach harder problems in steps.

Uploaded by

Benson Wang
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
359 views10 pages

Discrete Exam2

This document contains a test for a discrete mathematics course covering chapters 4 and 5. The test has 32 questions ranging from counting problems to proofs involving binomial coefficients and inclusion-exclusion. It provides context for the types of problems assessed, such as counting arrangements, permutations, and combinations. Students are instructed to show their work and approach harder problems in steps.

Uploaded by

Benson Wang
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Test 2 Chapters 4 & 5

Directions:

Math 220 Discrete Math


Section 1
Time: Due: T Apr 14
Calculator: OK
Notes: ???

Form AC 1 of 10

For multiple choice (A, B, C, etc.), circle the letters of all correct choices. For TRUE/FALSE, circle the
word TRUE or the word FALSE. Otherwise follow the directions given.
I would prefer answers be left as an unevaluated formula than a giant number of any accuracy. Im not
testing your ability to type into the calculator and copy the answer back off, after all, but rather your
ability to use the correct formula(s) for the situation and fill in the main variables to get it started.

Work easier problems first. Write out your plan for harder problems before beginning them.
Note that the last two pages are bonus!
1) You are given a choice of six algorithms to solve a particular problem. The algorithms performances
are measured in terms as log2 pnq, n, n log2 pnq, n2 , n3 , and 2n . If you have 30 seconds available to
run your program on a machine that requires a microsecond per instruction, what size data set could
be processed with each algorithm?

Knowing now all this mathematical information, what further factors (from the list below) will influence
your choice of algorithm in the application?
A) average IQ of the user

D) ease of algorithm implementation

B) color of the company logo

E) size of a typical data set

C) ease of algorithm adjustment


2) Use the big- theorems (not bounding with big-O and big-!) to find good reference functions for each
of the following:
i) 3n2 ` 5np2n ` 7q

ii)

npn ` 1q
2

iii) 3n ` 3n6 ` 5 log2 pnq

iv)

npn 1q 2
p6n ` log2 pnqq
4

Start Date: F Apr 3

Math 220 Discrete Math


Section 1
Time: Due: T Apr 14
Calculator: OK
Test 2 Chapters 4 & 5
Form AC 2 of 10
Notes: ???
3) Count exactly the number of critical operations in the following pseudocode fragments. Then find good
big- reference functions for the number of critical operations.
i) The critical operation is the multiplication. For the big- part, assume p m n.

for i = 1 to n
for j = 1 to m
cij = 0
for k = 1 to p
cij = cij + aik * bkj

ii) The critical operations are the additions to total and sum. For the big- part, assume w y.

for i = 0 to w
for j = 0 to i
total = total + purchase{ij}
for k = 1 to y
sum = sum + (total / k)

4) Assuming that there will never be more than 500 million people in the United States before the year
2050 A.D., how many digits are necessary to provide every person with a personal zip code? (Notice
that businesses and institutions are being neglected in this count.)

5) An individual won a raffle and can choose a prize from one of four lists. The first list contains 19
possible prizes while the second, third, and fourth lists include 14, 21, and 18 items, respectively. How
many prizes does the raffle winner have to choose from?

6) A local pizza store offers a choice of seven toppings. How many distinct three-topping pizzas do they
offer if no topping can be repeated?

7) Suppose you are taking a bus trip from your home in Florida to California. There are seven different bus
services offering trips from Florida to Arizona, four offering trips from Florida to Texas, eight offering
trips from Arizona to California, and seven offering trips from Texas to California. How many possibilities
are there for a bus ride from Florida to California, via either Arizona or Texas?

Start Date: F Apr 3

Math 220 Discrete Math


Section 1
Time: Due: T Apr 14
Calculator: OK
Test 2 Chapters 4 & 5
Notes: ???
8) A recording artist plans to place six songs on her new CD.

Form AC 3 of 10

i) In how many ways can she order these songs?


ii) In how many ways can she order these songs if she has already chosen the first and last selections?

9) A piano has 88 keys. A pianist plays a chord by striking multiple distinct keys simultaneously.
i) Assuming that your fingers are made of rubber and it was therefore possible to reach any 10-key
chord, how many such chords are there?

ii) A standard octave contains 12 keys. Triad chords require three keys to be struck simultaneously.
Ignoring how agreeable the sound will be, in how many ways can a triad be played within a single
octave?
10) In 1992, the Mattel toy company introduced a talking Teen Barbie doll. The company had compiled a
collection of 270 possible expressions for Barbie to speak. To make the dolls appear more individually
distinct, Mattel randomly chose four of the 270 possibilities for any particular doll.
i) How many distinct dolls could they manufacture?

ii) Suppose one of the 270 statements is considered to be undesirable1. How many distinct dolls
contain the undesirable statement among their four exclamations?

11) A fletcher is making some arrows. Each arrow has three feathers on the tail end spaced at 120
intervals around the shaft. The feathers come in four colors: red, blue, yellow, and green. How many
visually distinct patterns are there if a color can be used in more than one position on an arrow?
Assume that rotating the arrow in any direction (including end-to-end) does not result in a different
pattern, but changing colors does.

Perhaps a disgruntled employee slipped in a substitute statement before being carried off the premises and no one noticed it
amongst the 269 others during a routine scan or any of their testing.

Start Date: F Apr 3

Math 220 Discrete Math


Section 1
Time: Due: T Apr 14
Calculator: OK
Test 2 Chapters 4 & 5
Form AC 4 of 10
Notes: ???
12) How many different eight-card hands are there that contain exactly two suits, with four cards from each
suit?

13) Mrs. Candy has a large box of lollipops, chocolate bars, and caramels. She wants to give each of the
nine children in her neighborhood three pieces of candy. Taking into account that each type of candy
is available in a quantity greater than 30, in how many ways can Mrs. Candy distribute the candy?

Why did the author feel it necessary for Mrs. Candy to have a quantity greater than 30 of each type of
candy for this to go well?

14) Explain (intuitively) why Ppn, rq Ppr, rq Cpn, rq.

15) James and a friend played 14 games of tic-tac-toe one night. In how many ways can James end the
night with eight wins, two ties, and four losses?

16) Suppose that you must choose a password at your work that is five to seven characters long. How
many possible passwords are there if:
i) each password can be any combination of alphanumeric characters?

ii) each password must contain at least one digit? (The remaining characters are still able to be any
alphanumeric value.)

17) DNA consists of the four nucleotides: A (adenine), C (cytosine), G (guanine), and T (thymine). The
DNA strands AAG and AGA are considered to be distinct. Count the number of distinct DNA strands
that consist of 3A, 2C, 4G, and 2T.

Start Date: F Apr 3

Math 220 Discrete Math


Section 1
Time: Due: T Apr 14
Calculator: OK
Test 2 Chapters 4 & 5
Form AC 5 of 10
Notes: ???
18) Plot the values of Cp8, rq for r between 0 and 8. Why do the points form a symmetric shape?

19) How many different five-card hands are there that contain a straight?2 (A straight occurs when the five
cards have five consecutive fact values. One example of a straight is 8-9-10-jack-queen. Note that the
ace can be used as either the lowest card or the highest card in a straight.)

20) How many different eight-card hands are there with no more than three red cards?

21) What is the difference between versions 1 and 2 of the multinomial counting theorem?

Yes, this will include straight flushes.

Start Date: F Apr 3

Math 220 Discrete Math


Section 1
Time: Due: T Apr 14
Calculator: OK
Test 2 Chapters 4 & 5
Form AC 6 of 10
Notes: ???
22) How many distinct solutions are there to the equation w ` x ` y ` z 16, where w, x, y, and z are
nonnegative integers? (Hint: Think of distributing 16 identical objects to four people.)

23) Let n, r P N. Prove:

k0

n`1
r`1

(Hint: Prove the assertion directly for n r and then use mathematical induction on n to prove the
assertion when 0 r n.)

24) Let n and r be integers with 0 r n. Prove that


nr

n`1
r`k

r`1
r
k0
(Hint: Maybe Corollary 5.18 the backward hockey-stick theorem can be of help?)

25) How many people need to be gathered to guarantee that at least two have birthdays in the same
month? Please explain your reasoning.

Start Date: F Apr 3

Math 220 Discrete Math


Section 1
Time: Due: T Apr 14
Calculator: OK
Test 2 Chapters 4 & 5
Form AC 7 of 10
Notes: ???
26) Prove that in any set of three (not necessarily distinct) integers, there will always be two whose sum is
even.

27) A group of twelve people have gathered for dinner. There are nine U.S. citizens, seven adults, and four
who read science fiction. There are five U.S. citizens who are adults and three U.S. citizens who read
science fiction. Only three of the adults read science fiction and only two of these adult science fiction
readers are U.S. citizens. How many of the children are neither U.S. citizens nor readers of science
fiction?

28) Use inclusion-exclusion to calculate the number of bit strings of length 9 that either begin with two 0s,
have eight consecutive 0s, or end with a 1 bit.

Bonus Problems:
29) You notice these two problems in the book: 5.2.3.1 and 5.2.3.20. Explain how they are really the same
problem. (Tip: The hint on #20 is misleading and unnecessary.)

Start Date: F Apr 3

Math 220 Discrete Math


Section 1
Time: Due: T Apr 14
Calculator: OK
Test 2 Chapters 4 & 5
Form AC 8 of 10
Notes: ???
30) A group of n 1 people gathered for a party. Everyone shook hands with 0 or more other people.
Prove there were at least two people who shook the same number of hands.

31) Let n be a nonnegative integer. Prove that


n

n k
2 3n
k
k0

32) The Halting problem

A) says that we can never tell if a particular program stops given a specific input
B) says that we can never tell if an arbitrary program stops given a specific input
C) says that we can never tell if a particular program stops given any input
D) says that we can never tell if an arbitrary program stops given any input
E) is about the appropriate breaking distance of a moving vehicle
Start Date: F Apr 3

Math 220 Discrete Math


Section 1
Time: Due: T Apr 14
Calculator: OK
Test 2 Chapters 4 & 5
Form AC 9 of 10
Notes: ???
33) Search for the pattern ZXYX in the text ZWXZXYZXZWYXYXW. Create a table like those used in
the book and count hits and misses. Use the specified algorithm in each part:
i) Use the obvious algorithm.

ii) Use the full Boyer-Moore algorithm. Show j LrT i` j1 s. Indicate which table determines each
shift.

Start Date: F Apr 3

Math 220 Discrete Math


Section 1
Time: Due: T Apr 14
Calculator: OK
Test 2 Chapters 4 & 5
Form AC 10 of 10
Notes: ???
34) Write an algorithm that takes a series of ordered pairs representing points in the real plane and determines whether or not all of the points are collinear. (Recall that two points are collinear if they lie on
the same line.)
Your algorithm should return true if the points are collinear and false if they are not. For example, if the
input is the ordered pairs for four points and only two of the points lie on the same line, the algorithm
will return false.
You may assume that at least two ordered pairs will be used in the algorithm.
(Hint: Think about the standard formula for slope. You may further assume that there will be no undefined slopes (representing points that are vertically aligned) when using the slope formula.)

Start Date: F Apr 3

You might also like