0% found this document useful (0 votes)
20 views

Midterm review problems

Uploaded by

Agrim joshi
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

Midterm review problems

Uploaded by

Agrim joshi
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

MACM 201 Midterm 1 Practice Problems

1. List all strings of length 2 over the alphabet {X, Y, Z}.

2. Find all permutations over {P, Q, R}

3. Find all strings over the alphabet {a, b, c, d} with length 2 and no repeated letter.

4. Find all strings over the alphabet {A, B, C} with length 3 and no AB, BC, or CA substring.

5. Find all strings over the alphabet {0, 1, 2} of length 4 that have 22 as a substring

6. Draw the graph G = (V, E) given by

V = {1, 2, 3, 4, 5, 6} and E = {{1, 3}, {1, 5}, {2, 6}, {3, 4}, {3, 5}, {5, 6}}.

7. Find all graphs with vertex set {1, 2, 3, 4} that have {1, 2} and {3, 4} as edges, and have exactly two
more edges in addition to these.

8. A restaurant has a special deal on a 3-course dinner consisting of an appetizer, an entree, and a dessert.
If there are 3 possible appetizers, 4 entrees, and 2 desserts, how many ways can you choose a different
dinner?

9. Consider the word TUMULTUOUS.

(a) How many ways are there to arrange these letters?


(b) How many arrangements have the substring SUM?
(c) How many arrangements have the substring TOT?
(d) How many have both SUM and TOT?

10. Determine the coefficient of x10 y 40 the expansion of (2x − 3y)50 .

11. Consider the expression f = (x + y − 3z)5 .

(a) Find the coefficient of x2 yz 2 in the expression of f .


(b) How many terms are there in the expansion of f ?
(c) What is the sum of all the coefficients in the expansion of f .

12. Consider the word HOMEOMORPHISM.

(a) How many ways can you arrange these letters?


(b) If we omit all three copies of M, leaving HOEOORPHIS, how many ways are there to arrange
these remaining letters?
(c) How many ways can you arrange the letters so that no two M’s are consecutive?
Hint: start by arranging the letters other than M using your answer to part (12b), then choose the
positions in which to insert the three M’s.

13. There are n balls labelled 1, . . . , n and k bins labelled 1, . . . , k.

(a) How many ways are there to put the balls into the bins?
(b) How many are there if each bin must receive at most one ball?

14. How many strings over the alphabet {A, B, C, D} of length 2n have the property that D does not appear
in any odd position?

1
MACM 201 Midterm 1 Practice Problems

15. (a) How many permutations over {A, B, C, D, E, F, G, H} start with A and do not end with H?
(b) How many permutations over this alphabet start with a letter other than A and end with a letter
other than H?

16. A club with 16 people must select a leadership committee with a president, secretary, and treasurer.
Assuming no person can have more than one such position, how many ways are there to select this
committee?

17. At a summer camp, the campers are divided into 10 cabins with 8 campers in each cabin. How many
ways are there to choose a set of 13 campers S with the property that 2 cabins have exactly 3 campers
in S, 3 cabins have exactly 2 campers in S, and 1 cabin has exactly 1 camper in S?

18. How many ways are there to put 9 indistinguishable balls into four (distinguishable) containers num-
bered 1, 2, 3, 4 with the following added constraint:

(a) Every container has at least one ball.


(b) Container 1 has an odd number of balls.
(c) Exactly two containers have 0 balls.

19. A bookcase has four shelves and we wish to put 30 (distinguishable) books on these four shelves.
For this problem we consider two arrangements of the books to be the same only when they have
exactly the same books on each shelf in exactly the same order. Under these assumptions, how many
arrangements of the books are possible?

20. A binary string has k runs if it can be divided into k (but not more) substrings so that each substring
either has all entries 0 or all entries 1. For instance, the string 0011110100010111 has 8 runs since it
divides into the substrings
00 1111 0 1 000 1 0 111
How many binary strings of length n have exactly k runs?

21. How many binary strings of length n have exactly one occurrence of the substring 10?

22. Consider the following equation where x1 , . . . , x5 are integer variables

x1 + x2 + x3 + x4 + x5 = 30.

For each part below, determine how many solutions there are to the above equation satisfying the
additional constraint.

(a) xi ≥ 0 for all 1 ≤ i ≤ 5


(b) xi ≥ −2 for all 1 ≤ i ≤ 5
(c) xi ≥ i for 1 ≤ i ≤ 5

23. Consider the graph in the figure below.

(a) Find all subgraphs that are cycles.


(b) Find the subgraph induced by the vertices {1, 3, 4, 6}.
(c) Find all spanning subgraphs that are paths.
(d) Is G bipartite? If yes, draw a bipartition of G otherwise explain.

2
MACM 201 Midterm 1 Practice Problems

24. How many subgraphs of Kn are isomorphic to the graph ?

25. How many subgraphs of Kn are isomorphic to Ka,b ?

26. Up to isomorphism, find all graphs meeting each description.

(a) 5 vertices and 3 edges


(b) 5 vertices and 6 edges containing a cycle of length 4.
(c) 6 vertices and 8 edges containing a cycle of length 6.

27. Draw two non-isomorphic graphs with 6 vertices where each vertex has degree 2.

28. Let n ≥ 3 and let Pn be a graph with vertex set {x1 , . . . , xn } ∪ {y1 , . . . , yn } and the following edges:

• {x1 , x2 }, {x2 , x3 }, . . . , {xn−1 , xn }, {xn , x1 },


• {y1 , y2 }, {y2 , y3 }, . . . , {yn−1 , yn }, {yn , y1 }, and
• {x1 , y1 }, {x2 , y2 }, . . . , {xn , yn }

(a) Draw the graph P3


(b) How many edges are in Pn ?
(c) How many paths of length 2 are in the graph Pn ?
(d) For n ≥ 5 how many cycles of length 4 are in the graph Pn ?

29. Let n ≥ 4 and let Rn be a graph with vertex set {x1 , . . . , xn } ∪ {y, y 0 } and the following edges:

• {x1 , x2 }, {x2 , x3 }, . . . , {xn−1 , xn }, {xn , x1 }, and


• {xi , y} and {xi , y 0 } for every 1 ≤ i ≤ n

(a) Draw the graph R4 .


(b) How many edges are in Rn ?
(c) How many subgraphs of Rn are isomorphic to K4− ?
(d) How many paths of length 3 are there in Rn ?

30. Let G be a graph with m edges and the property that every vertex is adjacent to d other vertices. If G
has no cycle of length 3, how many 4 vertex paths does G have? Hint: try choosing the middle edge.

31. For positive integers a, b we let Ga,b be a graph with vertex set consisting of all ordered pairs of integers
(x, y) with 1 ≤ x ≤ a and 1 ≤ y ≤ b, and edge set consisting of the following:

• {(i, j), (i, j + 1)} for 1 ≤ i ≤ a and 1 ≤ j < b.

3
MACM 201 Midterm 1 Practice Problems

• {(i, j), (i + 1, j)} for 1 ≤ i < a and 1 ≤ j ≤ b.

Draw the graph G3,4 . Determine for all a, b how many cycles of length 6 there are in Ga,b .

32. Let 2 ≤ b ≤ a ≤ n. Define Ka−b to be a graph obtained from Ka by choosing b vertices and deleting all
edges between chosen vertices. How many subgraphs of Kn are isomorphic to Ka−b ?

33. If two integers are selected, at random and without replacement, from {1, 2, 3, . . . , 100}, what is the
probability their sum is even?

34. If two binary strings, x and y, of length n are selected, at random and without replacement, what is
the probability that the total number of ones in x and y combined is even?

35. What is the minimum number of times we must toss a fair coin so that the probability of getting two
or more heads is at least 0.8?

36. Using the axioms of probability (and any theorems we proved in class from these axioms if needed),
prove that P r(∅) = 0.

37. There are two boxes. The first contains two green balls and seven red balls; the second contains four
green balls and three red balls. Alice selects a ball by first choosing one of the two boxes at random.
She then selects one of the balls in this box at random. If Alice has selected a red ball, what is the
probability that she selected a ball from the first box?

38. There are two bags. The first contains two green balls and seven red balls; the second contains four
green balls and three red balls. Bob reaches in and selects one ball from the first bag and places it in
the second bag. Then Alice selects one ball from the second bag.

(a) What is the probability Alice selected a red ball?


(b) If Alice’s ball is red, what is the probability Bob had selected a red ball?

39. In class we considered the following application of Baye’s theorem:


Suppose 10% of Olympic cyclists use steroid Z and the IOC develops a test for Z with the following
properties.

(a) If a cyclist is taking Z the probability that they test positive is 0.99.
(b) If they are not taking Z the probability that they test positive is 0.05.

Question: If a randomly chosen cyclist tests positive for Z, what is the probability they are taking
steroid Z?
We showed in class that the probability is 0.6875 which is very low. This is because the probability 0.05
in property 2 is high. A person who satisfies property 2 is called a false positive. Redo the calculation
using 0.01 instead of 0.05 for property 2.

40. Jar A has 800 red candies and jar B has 600 green candies. If we do the following...

1. Move one cup of red candies from jar A to jar B and mix.
2. Move one cup of mixed candies from jar B to jar A and mix.
3. Move one cup of candies from each of jar A and jar B to the bowl and mix.
4. Randomly select one candy from the bowl.

4
MACM 201 Midterm 1 Practice Problems

Is the candy we select more likely to be red of green?

41. Suppose that m (distinguishable) balls are thrown in n (distinguishable) bins. What is the expected
number of bins with exactly 1 ball?

42. Suppose we roll a biased six sided dice. Rolling a 1, 2, 3, 4 or 5 are equally likely, and rolling a 6 is twice
as likely as each of the other values. If we roll the dice 49 times, let X be the random variable for the
number of 6’s that appear.

(a) What is P r(X = k)?


(b) What is E(X)?
(c) How many times should we expect to roll the dice until the first 6 appears?

43. A program is designed to generate binary strings of any length such that in any position a 1 is three
times as likely to appear than a 0. What is the probability that a string of length 10 contains at least
eight 0’s. (Reduce your answer to a fraction: a/b.)

44. How many times would we expect to roll a 4-sided (fair) die (also called a tetrahedral die) to get all 4
outcomes to appear.

45. A bin contains five balls numbered 1,2,3,4, and 5. When two balls are drawn (without replacement)
from the bin, the random variable X records the higher value. Find E(X).

46. A carnival game costs $3 to play. The player selects one card from a standard deck of 52 cards. If the
player selects an ace or king the player wins $8. If the player selects a four or seven the players wins
$4. Otherwise the player loses their $3. What is the expected amount the player will win?

You might also like