Q1: 15 points Q2: 15 points Q3: 25 points Q4: 30 points Q5: 15 points Q6: 25 points Total: 100 points
Question text is in black, solutions in blue.
Both are binary operators on propositions. Both are true if one argument is true and the other false, but the inclusive or is also true if both are true.
A counterexample is a value of x making some statement P(x) false -- its existence proves that the statement ∀x:P(x) is false. A contradiction is a statement that is false for all values of its variables -- we often prove a statement to be false by showing that it implies a contradiction.
A one-to-one-function maps each input to a separate output. An onto function is one where every possible output value is mapped to by some input.
Suppose A and B are finite sets with a and b elements respectively. The Product Rule says that the size of A × B is ab, that is, that there are exactly ab pairs (x, y) such that x is in A and y is in B. The Sum Rule says that if A and B are disjoint, the size of their union is a + b. (The Sum Rule With Overlap says that the size of the union is a + b - c, where c is the size of the intersection.
Both have nodes and edges. An edge in an undirected graph is between two nodes, with no direction specified. An edge in a directed graph goes from some node to some node (possibly the same node).
TRUE. The contrapositive of "p → ¬q" is "q → ¬p", and this together with q implies ¬p by Modus Ponens.
FALSE. These premises prove P(n) only for odd n. If P(n) were "n is odd", we could prove the two premises but P(n) would still be false for all even n.
FALSE. The correct number is 32 = 9.
FALSE. Six of the possible 36 throws of 2D6 yield a sum of 7 and two yield a sum of 11, and thus the probability is 8/36 = 2/9. There are 11 possible sums from 2D6, but they are not all equally likely and thus that 11 cannot be used as the denominator in the probability formula.
TRUE. A connected graph with ten nodes must have at least nine edges.
0.9 0.0 0.1
0.5 0.0 0.5
0.0 0.1 0.9
0.81+0.00+0.00 0.00+0.00+0.01 0.09+0.00+0.09
0.45+0.00+0.00 0.00+0.00+0.05 0.05+0.00+0.45
0.00+0.05+0.00 0.00+0.00+0.09 0.05+0.05+0.81
which evaluates to
0.81 0.01 0.18
0.45 0.05 0.50
0.05 0.09 0.86
This is the Y-G entry of the matrix T2, which is 0.50. There is an 0.05 probability of its going Y-R-G and an 0.45 probability of its going Y-G-G.
There is a 0.9 chance that it will remain red each turn. If X is the desired expected value, we can compute X in terms of itself by looking at the two possible events. If it remains red on the first turn, the expected number of red turns is 1 + X. If it changes on the first term, the number of red turns is 0. So we have that X = (0.9)(1 + X) + (0.1)(0). This solves to X = 0.9 + 0.9X, 0.1X = 0.9, and thus X = 9.
0 1 1
1 0 0
1 0 0
0+1+1 0+0+0 0+0+0 2 0 0
M^2 = 0+0+0 1+0+0 1+0+0 = 0 1 1
0+0+0 1+0+0 1+0+0 0 1 1
4+0+0 0+0+0 0+0+0 4 0 0
M^4 = 0+0+0 0+1+1 0+1+1 = 0 2 2
0+0+0 0+1+1 0+1+1 0 2 2
There are two, as we can read off of the B-C entry of the matrix M4. The paths are B-A-B-A-C and B-A-C-A-C.
Our base case is n = 1. From the A-A entry of the matrix
M2 above, or by inspection, we can see that there
are two two-step paths from A to A, namely A-B-A and A-C-A.
This equals 21 and so the n = 1 case is proved.
Now for the inductive hypothesis assume that there are
exactly
2n paths of length 2n from A to A. Our inductive
goal is to prove that there are 2n+1 paths of
length 2(n+1) from A to A. Let's look at any such path,
starting from A.
Its
first 2n edges form a path of length 2n. In fact this path
must go to A, but even if we don't know that we don't have
to consider paths that end at B or C after 2n steps, since
they could not reach A in two more steps. We know that
there
are 2n paths of length 2n from A to A. Each can
be extended to a path of length 2n+2 in exactly two ways, by
going A-B-A or A-C-A with the last two steps. So the number
of paths of length 2n+2 is 2 times 2n which is 2n+1.
C(52, 3) = 52*51*50/1*2*3 = 26*17*50 = 17*1300 = 22100.
There are four choices of suit and C(13, 3) = 13*12*11/1*2*3 = 13*2*11 = 286 choices of which three cards of that suit. The total number of such hands is thus 4*286 = 1144.
We choose the three ranks in C(13, 3) = 286 ways. Then we pick the suit of each of the three cards independently. The total number of choices is 286*43 = 18304.
q → (d ∧ ¬c)
It is not the case that one of the dogs is not quiet, Cardie is not hungry, and Duncan is asleep.
Symbolically, we could use the DeMorgan rule to change (b)'s
¬(¬q ∧ ¬c ∧d) to (q ∨ c ∨
¬d), then use the Definition of Implication rule to
change this phrase to (¬c ∧ d) → q. Since
this is the converse of the statement of (a), the
desired "if
and only if" statement follows.
Let's look at the truth table for (a) and (b):
Then we look at the truth table for the new statement,
making sure that we use the same order q-d-c for the
variables.
Since the two principal columns are the same (the central "and" in the
first truth table and the "<-->" in the second), the two statements
are logically equivalent.
[[(q -> (d and not c)] and [not(not q and not c and d)]]
0 1 0 0 1 0 1 1 1 0 1 1 0 0 0
0 1 0 0 0 1 1 1 1 0 0 0 1 0 0
0 1 1 1 1 0 0 0 1 0 1 1 0 1 1
0 1 1 0 0 1 1 1 1 0 0 0 1 0 1
1 0 0 0 1 0 0 1 0 1 0 1 0 0 0
1 0 0 0 0 1 0 1 0 1 0 0 1 0 0
1 1 1 1 1 0 1 1 0 1 0 1 0 0 1
1 0 1 0 0 1 0 1 0 1 0 0 1 0 1
q <--> not (d --> c)
0 1 0 0 1 0
0 1 0 0 1 1
0 0 1 1 0 0
0 1 0 1 1 1
1 0 0 0 1 0
1 0 0 0 1 1
1 1 1 1 0 0
1 0 0 1 1 1
Last modified 13 December 2015