CMPSCI 190DM: A Mathematical Foundation for Informatics
Practice for Final Exam
David Mix Barrington
2 December 2013
Directions:
- Answer the problems on the exam pages.
- There are seven problems
for 125 total points.
Scale will be determined after the exam but a good guess is A = 105,
C = 75.
- If you need extra space use the back of a page.
- No books, notes, calculators, or collaboration.
Q1: 20 points
Q2: 15 points
Q3: 15 points
Q4: 20 points
Q5: 15 points
Q6: 20 points
Q7: 20 points
Total: 125 points
- Question 1 (20):
Briefly identify the following terms or concepts (4 points each):
- (a) a proof by contradiction
- (b) the intersection of two sets A and B
- (c) a bijection between two sets A and B
- (d) a permutation from a set A
- (e) the expected value of a random variable
- Question 2 (15):
In this question p, q, and r are three boolean variables. We are
going to pick the truth values of each variable by tossing a fair
coin. The three tosses are assumed to be independent.
- (a, 5) What is the probability that the compound statement
"p → q" will be true, given the randomly chosen values of
p,
q, and r?
- (b, 10) What is the probability that the compound
statement
"(p → q) ∧ (q → r)" will be true, given the
randomly
chosen values of p, q, and r?
- Question 3 (15):
Let X be a set of n elements and let Y be a set of 3 elements.
Prove
by induction on n, starting with either n = 0 or n = 1 as
you
choose, that there are exactly 3n functions from X to Y.
- Question 4 (20):
Suppose we choose a set of three cards randomly from a standard
52-card deck, with every three-card set being equally likely.
- (a, 5) How many possible three-card subsets are there? (Remember
that you need not evaluate an arithmetic expression.)
- (b, 5) How many of these subsets have three cards of the
same rank (for example, three fours or three kings)?
- (c, 10) What is the probability that the three cards in
the set all come from the same suit (for example, three hearts or
three spades)?
- Question 5 (15):
Suppose I throw a fair six-sided die n times, with each throw
being
independent of the others. Let p(n) by
the probability that I ever get the same number twice in a row
during these throws. Prove by
induction
on n, starting with n = 1, that p(n) = 1 - (5/6)n-1.
(Hint: You may find it easier to work with 1 - p(n).)
Problem corrected on 5 December.
- Question 6 (20): Let A be the following matrix:
0 1 1
1 1 0
0 2 0
- (a, 5) Draw the directed multigraph whose matrix is A.
Name
the vertices x, y, and z, where the rows and columns correspond
to the three vertices in that order.
- (b, 5) Compute the matrix A2.
- (c, 10) In the directed graph of part (a), how many
four-step paths are there from vertex y to itself? Explain your
answer. (Hint: It is
possible to count these paths by inspection of the graph, but
that
is not the easiest way to do it.)
- Question 7 (20): A prankster has modified a traffic light so
that it behaves randomly instead of following its normal cycle.
After a minute of being green, it becomes either yellow or red,
with
50% probability of each color. After a minute of being yellow,
it
either becomes green or stays yellow with equal probability. After a
minute
of being red, it always becomes yellow.
- (a, 5) Write down the transition matrix T for the Markov
process that the light is following. (Order the rows and
columns
green-yellow-red.)
- (b, 5) Compute the matrix T2.
- (c, 5) If the light is now red, what is the
probability that it will also be red two minutes from now?
- (d, 5) If the light is now red, what is the
probability that it will also be red three minutes
from now? Explain your answer.
Last modified 12 December 2013