Q1: 10 points Q2: 10 points Q3: 10 points Q4: 10 points Q5: 10 points Q6: 30 points Q7: 20 points Total: 100 points
TRUE. With the given condition on |A∩B∩C|, we can use
Inclusion-Exclusion to get this result easily because then |A∪B∪C| =
|A| + |B| + |C| - |A∩B| - |A∩C| - |B∩C|, and the last three terms
subtract non-negative things.
Even without that condition, the conclusion is still true. If we count the
elements of A, then those of B, and then those of C, we count every element of
A∪B∪C at least once, so the number of items in the union can be no
bigger than the number of times we count.
FALSE. In fact any function that is O(n2), such as 0, 1, n, or
n2 itself, is also O(n3) because we know that big-O
relations among polynomials depend only on the degree of the leading term,
where f = O(g) if and only if f's leading term has no greater degree than g's.
As we see in question 7 below, I accidently copied my first
draft for this test instead of the later one -- I planned to change this
question to "no function can be both O(n3) and
Ω(n2)" which is still false.
TRUE. These sums are the sums of all entries on the n'th row and n+1'st
row, respectively of Pascal's Triangle, and are equal to 2n and
2n+1. It was enough to quote this fact, but there are several ways
to justify it:
FALSE. We can count the strings with two or more, (4 choose 2) times
22 = 24 with exactly two, (4 choose 1) times 2 = 8 with exactly three,
and (4 choose 4) = 1 with four for a total of 33 strings with two or more,
fewer than half of the 34 = 81 total strings. We could also have
counted the 24 = 16 with no c's and the (4 choose 1) times
23 = 32 with one c, and seen that the 48 of these are a
majority of the 81 total.
Several of you argued that because the number of strings with two or more
a's and the number with two or more b's must equal the number with two or more
c's, this common number cannot be a majority. This was a nice observation about
the symmetry but it doesn't immediately give you a contradiction. Let the
number with two or more c's be t. There are then t with two or more a's and
t with two or more b's. If we call these three sets A, B, and C, we are
actually in the situation of Question 1, because no string can be in A, B,
and C. But the total size of the set, is 3t minus the sizes
of A∩B, A∩C, and B∩C. To argue that t can't be bigger than 81/2,
we'd have to say that these three intersections have some size s such that
3t - 3s can only be ≤81 if t≤81/2. To do this we'd have to calculate
s, which none of you did. (The size of A∩B is 6, so this argument would
have worked if you found this number because 3t - 3(6) ≤ 81 forces t ≤
33.
FALSE. The total number of strings is 43 = 64 (first counting problem) and the total with no repeats is 43 = 24 (second counting problems. But 24 is not a majority of 64.
Second counting problem, 85 = 8*7*6*5*4 = 6720.
Third counting problem, (8 choose 5) = 85/5! = 6720/120 = 56.
First counting problem, 85 = 215 = 32768.
Fourth counting problem, counting binary strings with 5 zeros and 8-1=7 ones, (12 choose 5) = 12*11*10*9*8/1*2*3*4*5 = 11*9*8 = 792.
We must pick four topics for Monday, Tuesday, Thursday, and Friday with no repeats from the set {A,C,D,E,F,H}. This is the second counting problem, 64 = 6*5*4*3 = 360.
Now we choose four topics with repeats possible from seven possibilities (we are no longer barred from using B on other days). This is the first counting problem, 74 = 2401.
(Hint: Use ordinary induction on all n with n ≥ n0 to show that for those n, f(n) is between two linear functions.)
I was fairly generous with partial credit, but I gave no one full credit
because you should really have noticed the mistake in the course of trying to
prove that f = θ(n) in the case that g = θ(n), in which case it is
false. Either that, or you could have used the d < g(n) < c statement
to prove f = θ(n) as I intended. I do apologize for the mistake, which
I should have caught before or during the test.
Here's the intended proof. Let n0 be the number after which the
bounds on g(n) hold. Then f(n0) is some number a, which we don't
know much about because we don't know much about the g(i)'s that were summed
to get it. But for n ≥ n0, f(n) is equal to a plus the sum,
for i from n0+1 to n-1, of g(i). [We can prove this assertion by
ordinary induction starting at n0: the base case of n = n0
reduces to a = a, and given the n case we can prove the n+1 case easily --
f(n+1) = f(n) + g(n) = (sum from n0+1 to n-1 of g(i)) + g(n) =
(sum from n0+1 to n of g(i)).] Then because each of these g(i)'s
is at least d, f(n) ≥ a + d(n-n0), and because each g(i) is at
most c, f(n) ≤ a + c(n-n0).
We've now trapped f(n) between two linear functions, which is enough to show
that it is θ(n) as suggested in the hint. If we want to work directly
from the definition, we could say that f(n) = Ω(n) because it dominates
dn/2 eventually, and f(n) = O(n) because it is dominated by 2cn eventually.
Where this domination starts depends on the relative values of a, c, and d, but
it must happen eventually.
Last modified 25 February 2007