Q1: 15 points Q2: 20 points Q3: 25 points Q4: 30 points Q5: 30 points Total: 120 points
Question text is in black, solutions in blue.
Two integers are relatively prime if there is no integer greater than one that divides both. An integer is prime if there is no integer greater than one that divides it, other than itself (or its additive inverse, if it is negative).
The union of two sets A and B is the set of all elements that are in either A or B. The intersection is the set of all elements that are in both A and B.
The expected value is a weighted average of the possible values -- it is the sum, over all possible values, of the value times its probability. The most likely value is one whose probability is greater than that of any other value.
A directed graph has edges of the form (u, v), where u and v are nodes and u = v is possible. The edge (u, v) goes from node u to node v. An undirected graph has edges of the form {u, v}, where u and v are nodes and u ≠ v. The edge {u, v} goes between the nodes u and v, without any direction.
The product of two matrices A and B has entries that are the dot product of a row vector of A and a column vector of B (and thus the length of these two types of vectors must be the same for the matrix product to be defined. In integer matrix multiplication this dot product is the integer sum, for all i from 1 through the length of the vectors, of the integer product of the i'th values of the vectors. In boolean matrix multiplication, where the matrix entries are all 0 or 1, the dot product is the OR, for all i from 1 through the length of the vectors, of the AND of the i'th values of the vectors.
twitter.com/dog_rates
. Recently they provided
ratings for a set of five dogs: Ali, Cardie, Duncan, Toby, and
Whistle (the set {a, c, d, t, w}). All of the ratings were
integers in the set {11, 12, 13, 14, 15}. We define r(x) to be
the rating of dog x, and assume that r is a function.
There are five choices for each dog, for 55 = 3125 in all.
We must choose which set of two dogs get the 14's. This will determine the rating of all five dogs because we know that the other three get 12. There are C(5, 2) = 5×4/1×2 = 10 size-two subsets of a five-element set.
Of the 3125 equally likely ratings of the five dogs, there are P(5, 5) = 5! = 120 that give each dog a different rating. So the probability is 120/3125 = 0.0384.
This is a "stars and bars" argument. Such a rating corresponds to a binary string with five 0's (one for each dog) and four 1's (for the barriers between the five ratings). So the rating in the example corresponds to the string 001011001. There are C(9, 4) = 9×8×7×6/1×2×3×4 = 252 such binary strings.
(r(c) = r(d)) → ((r(t) < r(a)) ∧ (r(t) < r(w)))
"If any two dogs have the same rating, then they are the same dog." Or, taking the contrapositive, "If any two dogs are not the same dog, then they have different ratings." Or "The function r is one-to-one."
∃x:∃y:∀z: (r(x) = 14) ∧ ((r(z) > r(x)) ↔ (y = z)). Note that you must say both that the dog with rating higher than 14 exists, and that there are not two such dogs.
Statement (b) says that the function r is one-to-one. We know that when the domain and codomain of a function have the same size, the function is either a bijection (both one-to-one and onto) or it is neither one-to-one or onto. So r must be onto. This guarantees that there is at least one x such that r(x) = 14 and at least one y such that r(y) = 15. Statement (b) directly guarantees that there cannot be two different dogs with rating of 15, which gives us the last part of Statement (c).
FALSE. There are two prime numbers, 11 and 13, in the set of five possible ratings, so the probabilty is 2/5, less than the 3/5 probability of a non-prime rating.
TRUE. The product of any two odd integers is odd, so ab, ac, and bc are all odd. And the sum of any three odd integers is also odd.
FALSE. I have proved ¬(p ∧ q), which by DeMorgan is (¬p) ∨ (¬q), which is not the same as (¬p) ∧ (¬q).
TRUE. If r were true, the second premise would force one of p and q to be false, but the first premise says that both p and q are true. Since the assumption of "r" together with the premises derives a contradiction, r must be false if both premises are true.
FALSE. Any one-to-one function from a domain to a codomain of the same size must also be onto.
TRUE. There are 52 25 choices of the two ratings, and P(5, 2) = 20 of them have Duncan's rating different from Cardie's (since for each choice of Cardie's rating, there are four choices of Duncan's that are different from it).
FALSE. The sum of the degrees of all the vertices in an undirected graph must be even, since it is twice the number of edges. Such a graph as described would have a sum of 3×3 + 2×4 = 17, which is odd.
TRUE. The expected value of each rating is (11+12+13+14+15)/5 = 13, and the expected value of the sum is the sum of the five individual expected values.
FALSE. Consider a graph with six nodes {a, b, c, d, x, y} and edges (x, a), (a, b), (b, x), (y, c), (c, d), (d, y). This meets the given conditions but has no path from x to y. There is no assumption that a directed graph must be connected.
TRUE. The way to win this game is to leave a pile of stones of a size divisible by four. Once you do that, your opponent must leave you a number whose remainder modulo 4 is 1, 2, or 3, and you can do it again. Thus you will eventually be able to make the number 0 and win the game.
We will define M to be the Markov process for this game, with state set {0, 1, 2}, and Z to be the transition matrix of M, with Zij being the probability of going from state i to state j in one step. We also define A to be the matrix such that Aij is the number of outcomes (out of four) that take state i to state j in one step. Note that for any i and j, Zij = Aij/4. We can also consider A to be the adjacency matrix of a directed multigraph G, which has node set {0, 1, 2} and has Aij directed edges from node i to node j.
4 0 0 1 0 0
A = 1 1 2 Z = 1/4 1/4 1/2
0 1 3 0 1/4 3/4
16 0 0 1 0 0
A^2 = 5 3 8 Z^2 = 5/16 3/16 1/2
1 4 11 1/16 1/4 11/16
The meaning of this fact is that if the process starts in state 0,
there is zero probability that after any positive number of steps, it
will be in state 1 or 2.
Our statement P(n) is "(Zn)01 =
(Zn)02 = 0".
Our base case is to prove P(1), which says that Z01 =
Z02 = 0. This is true by the definition of Z, as shown in
part (a).
Our inductive hypothesis is that (Zn-1)01 =
(Zn-1)02 = 0.
Our inductive goal is to show that (Zn)01 =
(Zn)02 = 0.
The matrix Zn is equal to Z times Zn-1.
The entry (Zn)01 is thus the dot product of the
first row of Z, (1 0 0), and the second column of Zn-1.
The
first entry of that second column starts with
(Zn-1)01, which by the IH is 0. The dot product
is therefore 0, since the product of each pair of entries is 0. The
argument for (Zn)02 is identical.
64 0 0 1 0 0
A^3 = 23 11 30 Z^3 = 23/64 11/64 15/32
8 15 41 1/8 15/64 41/64
We need the dot product of the second row of Z2 and the last column of Z3 (or vice versa). This is (5/16 3/16 1/2) dot producted with (0 15/32 41/64), which is (1/1024)(5×0 + 3 ×30 + 8×41) = 418/1024 = 209/512.
Last modified 14 January 2018