Question text is in black, solutions in blue.
Q1: 15 points Q2: 30 points Q3: 30 points Q4: 25 points Total: 100 points
The power set P(S) of a set S is the set of all subsets of S, that is, {T: T ⊆ S}. If S has n elements, then P(S) has 2n elements.
A partial order R is a total order if ∀x: ∀y: R(x, y) ∨ R(y, x), or equivalently, if there are no incomparable elements, that is, if ¬∃x: ¬R(x, y) ∧ ¬R(y, x).
The identity function i from A to A is the function that has i(a) = a for every element a of A.
Definition 1: R ⊆ A × A is an equivalence relation if there
exists a partition of A such that for every two elements x and y
of A, R(x, y) is true if and only if x and y are in the same set
of the partition.
Definition 2: R ⊆ A × A is an equivalence relation
if and only if it is reflexive (∀x: R(x, x)), symmetric
(∀x:∀y: R(x, y) → R(y, x)) and transitive
(∀x:∀y:∀z: (R(x, y) ∧ R(y, z)) →
R(x, z)).
In symbols, |A ∪ B| = |A| + |B| - |A ∩ B|. In words, the size of the union is the sum of the sizes of the sets, minus the size of the intersection. (You count both sets and then subtract the number of elements that are counted twice.)
Six choices for who gets a, five for who gets b, and four for who gets o, for P(6, 3) = 120 total choices.
We want a subset of size three taken from a six-element set. There are C(6, 3) = 6×5×4 / 1×2×3 = 20 such subsets.
Six choices for a, six for b, and six for o, for 63 = 216 total choices.
By the "stars and bars" argument, we are looking for arrangements of the three prizes and the five "barriers" between the six dogs. These can be represented by binary strings with three 0's and five 1's, of which there are C(8, 3) = C(8, 5) = 8×7×6 / 1×2×3 = 56.
Such a partition assigns exactly one distinct dog in F' to each dog in F, so it defines a bijection from F to F'. There are 3! = 6 of these.
One we pick one set, the other is determined. To pick such a set, we must decide which two of the four dogs in N to include (C(4, 2) = 6 choices) and which one of the two dogs in N' to include (C(2, 1) = 2). But this counts each partition exactly twice, so we must divide by two to get the final answer of six. Equivalently, we know that Scout is in one of the sets and Toby is in the other, so we can just decide which two of the four dogs in N go with Scout, in C(4, 2) = 6 ways.
FALSE. Since U has strictly more elements than F, an injection is impossible.
TRUE. For example, there is a function that takes all six elements of U to Cardie, and this function is not onto since no element is mapped to Duncan.
FALSE. It is the number of bijections, not the number of all functions.
FALSE. As we saw above, it is the number fo binary strings with three 0's and five 1's.
FALSE. To represent a three-element subset of a six-element set by a binary string, we use three 0's and three 1's. Ana again, C(8, 3) ≠ C(6, 3).
TRUE. The rule for antisymmetry is true trivially because its conclusion is "x = y", which must be true because both x and y have to be equal to a. The rule for transitivity reduces to (R(a, a) ∧ R(a, a)) → R(a, a), which is a tautology.
TRUE. Reflexivity means that R(a, a) is true, and this is the only bit needed to define the relation. Part (f) proves that the resulting relation is a partial order. The only other property needed is symmetry, which also reduces to (R(a, a) ∧ R(a, a)) → R(a, a) which is a tautology.
TRUE. This is an application of the Sum Rule With Overlap to the two sets X and Y ∪ Z.
fruiTbat
) is equal to the number of possible
passwords with eight lower-case letters (such as fruitbat
).
FALSE. In each case we choose eight times from a set of 26 letters, but in the first case we also choose which one of the eight letters is upper-case. So the number in the first case is 8× 268 and the number in the second case is just 268.
TRUE. We simply apply the Product Rule and the laws of exponents to multiply together four copies of 211, getting 244.
We need to show ∀a: [a ∈ X ∪ (Y ∩ Z')] → [a
∈ Y ∪ Z ∪ (X ∩ Z')]. This translates to saying
that the compound proposition
[(a ∈ X) ∨ ((a ∈ y) ∧ (a ∉ Z)] → [(a
∈ Y) ∨ (a ∈ Z) ∨ ((a ∈ X) ∧ (a ∉
Z))]
is a tautology. We can prove this by a truth table:
Alternatively, we observe that any element a must either (1)
be in X or Y, making membership in the rght-hand set clear and
making the implication true trivially, or (2) be in Y' ∩ Z',
which makes the implication reduce to "(a ∈ X) → 0 ∨ 0
∨ ((a ∈ X) ∧ 1)", which is also a tautology.
x or (y and not z) --> y or z or (x and not z)
0 0 0 0 1 0 1 0 0 0 0 0 0 1 0
0 0 0 0 0 1 1 0 1 1 1 0 0 0 1
0 1 1 1 1 0 1 1 1 0 1 0 0 1 0
0 0 1 0 0 1 1 1 1 1 1 0 0 0 1
1 1 0 0 1 0 1 0 0 0 1 1 1 1 0
1 1 0 0 0 1 1 0 1 1 1 1 0 0 1
1 1 1 1 1 0 1 1 1 1 1 1 1 1 0
1 1 1 0 0 1 1 1 1 1 1 1 0 0 1
This function f is its own inverse. By the Division Theorem, any
natural n may be written as 10q + r, with 0 ≤ r < 10.
We can compute that f(n) = 10q + (9 - r), making f(f(n) equal
10q + (9 - (9 - r)) = 10q + r = n.
To prove the onto and one-to-one properties directly, we can note
that 10q + r is the image under f of the natural 10q + (9 - r), making
f onto, and that if f(n) = f(n'), we must have 10q + (9 - r) = 10q' +
(9 - r'), from which we can derive q = q' and r = r'. This forces n =
n' and proves that f is one-to-one.
Last modified 25 November 2017