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 text is in black, solutions in blue.
A function from A to B is a rule that assigns one element of B to each element of A. Equivalently, it is a relation R ⊆ A × B that satisfies the condition that for each a ∈ A, there is exactly one b ∈ B such that (a, b) ∈ R.
If we are trying to prove a statement P(x) for all integers x where x ≥ c (for any integer c we use as a starting point), our inductive hypothesis is the statement P(x). The inductive step is to assume P(x) and use it to prove the inductive goal P(x+1).
The size of A ∪ B is the size of A plus the size of B minus the size of A ∩ B, since we must correct for elements that are counted twice.
A connected component is an equivalence class of the equivalence relation P(x, y) meaning "there is a path from x to y". The connected component of a node x is the set of nodes {y: y has a path to x}.
The identity matrix I of size n is an n by n matrix that has 1's on its main diagonal (the i-i entry for any i from 1 to n) and 0's elsewhere (any i-j entry where i ≠ j). It has the property that IA = AI = A for any n by n matrix A.
We make a truth table, with only four rows for the four cases from which
we choose:
Three of the four cases make it true, so the probability is 3/4.
p or (q or (not r))
only p true 1 1 0 1 1 0
only q true 0 1 1 1 1 0
only r true 0 0 0 0 0 1
only s true 0 1 0 1 1 0
We make a similar truth table:
Two of the four cases make it true, so the probability is 1/2.
(q or r) --> not (p --> (r or s))
only p true 0 0 0 1 1 1 0 0 0 0
only q true 1 1 0 0 0 0 1 0 0 0
only r true 0 1 1 0 0 0 1 1 1 0
only s true 0 0 0 1 0 0 1 0 1 1
Prove by induction on n, starting with either n = 3, that g(n) = 2n-2.
Base: g(3) = 2 as noted above, and 23-2 = 21 = 2.
Assume: g(n) = 2n-2/
Goal of Inductive Step: g(n+1) = 2n+1-2 = 2n-1.
Proof: It is important that we consider the strings. How do the
strings of length n+1 that start 000 or 111 relate to the strings of length
n that start 000 or 111, assuming that n is at least 3? Any such string of
length n may be extended to such a string of length n+1 in exactly two ways,
by appending either a 1 or a 0. So g(n+1) = 2g(n), and applying the
inductive hypothesis we get that g(n+1) = 2 times 2n-2 =
2n-1, as desired.
By the rule for counting sequences, this is 63 = 6 times 6 times 6 = 216.
We may choose the first number arbitrarily and then the second and third numbers are determined. So there are 6 choices.
By the rule for counting permutations (no-repeat sequences), this is P(6, 3) = 6 times 5 times 4 = 120.
We need to compute the number of sequences that have two occurrences of
one number and one occurrence of another. This is not so hard -- for any
two distinct numbers x and y in {1, 2, 3, 4, 5, 6} we have a sequence of
the form xxy, one of the form xyx, and one of the form yxx. This is three
sequences for every pair, and there are P(6, 2) = 6 times 5 = 30 pairs, so
there are 90 such sequences. The probability is thus 90/216 = 5/12.
Perhaps easier is to note that these particular sequences are what is left
of the 216 sequences when you remove the 6 from part (b) and the 120 from
part (c), so there are 216 - 6 - 120 = 90 of them.
You can also look at it through a decision tree for the three throws
in sequence. The first throw is arbitrary. If the second is different from
the first (5/6 chance), the third must be equal to one of the first two (1/3
chance) so there is a (5/6)(1/3) = 5/18 chance of getting one of the desired
sequences this way. If the second is the same as the first (1/6 chance) the
third must be anything else (5/6 chance) so there is a 5/36 chance this way.
Adding 5/18 and 5/36, we get the same answer of 5/12.
So we know that f(n+1) = (1/2)f(n) + 1/2n+1. Using this fact, prove by induction on all positive integers n that f(n) = n/2n. (Use a base case of n = 1.)
Base: We said above that f(1) = 1/2, as there is a 1/2 chance that the
single toss is heads. And 1/21 = 1/2.
Assume: f(n) = n/2n.
Goal of Inductive Step: f(n+1) = (n+1)/2n+1.
Proof: We are given that f(n+1) = (1/2)f(n) + 1/2n+1.
By the inductive hypothesis, then, we can substitute for f(n) to get
f(n+1) = (1/2)(n/2n) + 1/2n+1. This is n/2n+1
+ 1/2n+1 = (n+1)/2n+1 as desired.
1 2
2 0
The multigraph has two nodes, x and y. There is a single loop on x. There are two arcs from x to y, and two from y to x.
5 2
2 4
We want the x-x entry of B3, which we can get by computing the dot product of the x row of B and the x column of B2, which is (1*5) + (2*2) or 9. There are four paths that take the loop first, then go to y and back. There are four that first go to y and back, then take the loop. And there is one that takes the loop three times.
0 0.1 0 0.9
0.9 0 0.1 0
0 0.9 0 0.1
0.1 0 0.9 0
0.18 0 0.82 0
0 0.18 0 0.82
0.82 0 0.18 0
0 0.82 0 0.18
The north-south entry of T2, which is 0.82. There is an 0.81 probability that she turns correctly twice and an 0.01 probability that she turns incorrectly twice.
We can calculate the north-north entry of T4 by computing the dot product of the north row of T2 and the north column of T2. This is (0.18)2 + (0.82)2 = 0.7048.
Last modified 13 December 2013