CMPSCI 190DM: A Mathematical Foundation for Informatics
Practice for Final Exam
David Mix Barrington
10 December 2015
Directions:
- Answer the problems on the exam pages.
- There are six problems
for 125 total points.
Scale will be determined after the exam but a good guess is A = 105,
C = 70.
- If you need extra space use the back of a page.
- No books, notes, calculators, or collaboration.
Q1: 15 points
Q2: 15 points
Q3: 25 points
Q4: 30 points
Q5: 15 points
Q6: 25 points
Total: 100 points
Question 1 (15):
Briefly explain the difference between the terms or concepts in each
of the following pairs (3 points each):
- (a) the inclusive or and exclusive or operations
- (b) a counterexample and a contradiction
- (c) a one-to-one function and an onto function
- (d) the Product Rule and the Sum Rule for
counting
- (e) a directed graph and an undirected graph
Question 2 (15):
Determine whether each of these five statements is true or false. No
explanation
is needed or wanted, and there is no penalty for guessing (3
points each).
- (a) If p and q are any propositions, and q and (p →
¬q) are both true, then p must be false.
- (b) If I prove P(1), and I prove that P(n) implies
P(n+2)
for any n, then P(n) must be true for all n.
- (c) There are exactly 23 = 8 ordered lists of
length 2 from the set {a, b, c}.
- (d) If I roll two six-sided dice, the probability that
the sum of the numbers is in the set {7, 11} is exactly 2/11.
- (e) If G is a directed graph with ten nodes and five
edges,
there must exist nodes x and y in G such that there is no path
in G from x to y.
Question 3 (25): Vandals have sabotaged the traffic
light in my neighborhood so that it now behaves randomly
according
to a Markov process. During every ten-second interval it is
either red, yellow, or green. After an interval in which it is
red, it is red in the following interval 90% of the time and
green 10% of the time. After it is yellow, it is red 50% of the
time and green 50% of the time. After it is green, it is green
90% of the time and yellow 10% of the time.
- (a, 5) Write down the 3 by 3 matrix T of transition
probabilities for this Markov process. Use the row order
red-yellow-green.
- (b, 5) Compute the matrix T2.
- (c, 5) If the light is now yellow, what is the
probability that it is green 20 seconds (two time steps)
later?
Remember that you do not have to evaluate an arithmetic expression.
- (d, 10) If the light is now red, what is the expected
number of time steps that it will remain red before changing?
Question 4 (30):
Let G be a directed graph with node set {A, B, C} and edge set
{(A, B), (A, C), (B, A), (C, A)}.
- (a, 5) Write down the adjacency matrix M for G, using the
row
order A-B-C.
- (b, 5) Compute the matrices M2 and
M4.
- (c, 5) How many four-step paths are there in G from
node B to node C?
- (d, 15) Prove, by induction on all positive numbers
n, that there are exactly 2n paths of length 2n
in G from node A to itself.
Question 5 (15): You are dealt three cards from a
standard
52-card deck.
- (a, 5) How many different possible three-card hands
are there?
- (b, 5) How many of these hands have three cards of
the same suit?
- (c, 5) How many of these hands have three cards of
three different ranks?
Question 6 (25): Let c be the proposition "Cardie is
hungry", d be the proposition "Duncan is asleep", and q be
the proposition "both dogs are quiet".
- (a, 5) Translate the statement "If both dogs are
quiet, then Duncan must be asleep and Cardie is not hungry"
into logical symbols.
- (b, 5) Translate the statement "¬(¬q ∧ ¬c
∧ d)"
into English.
- (c, 15) With a truth table or otherwise, show that
the statements of parts (a) and (b) together are
equivalent to the statement "q ↔ ¬(d → c)".
This said "q ↔ ¬(c →
d)", which is wrong, until 13 December 2015.
Last modified 13 December 2015