Download Midterm Exam 2 Solutions, Comments, and Feedback

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Truth-bearer wikipedia , lookup

Peano axioms wikipedia , lookup

Axiom of reducibility wikipedia , lookup

Mathematical proof wikipedia , lookup

Halting problem wikipedia , lookup

Computable function wikipedia , lookup

History of the function concept wikipedia , lookup

Principia Mathematica wikipedia , lookup

Transcript
Math 347 F1, Spring 2010
Midterm Exam 2 —Solutions
Prof. A.J. Hildebrand
Midterm Exam 2 Solutions, Comments, and Feedback
• Grading: Each problem was worth 20 points, for a total of 100 points. The breakdown for multipart
problems was as follows: Problem 1: 4 points per part. Problem 2: 10 points (3+3+4) for each part.
Problem 5: 15 points for the proof (part (a)) and 5 for the counterexample (part (b)). For exam
statistics and a letter grade correspondence see the course webpage.
• Solutions: Solutions, along with some remarks about common errors, are attached. Check the
solutions first before asking questions about the grading.
• Wrong/missing quantifiers: Quantifiers play a key role in logical statements and definitions,
and it is crucial to get these right. Using the wrong quantifier (e.g., “for all” instead of “there
exists”) or leaving out an essential quantifier (e.g., “there exist”) completely changes the meaning of
a statement. For example, the correct definition of “f : R → R is not injective” (i.e., the negation
of “f is injective”) is: “there exist x, y ∈ R such that x 6= y and f (x) = f (y).” With a universal
quantifier “for all x, y ∈ R” instead of the above existential quantifier, the statement would have a
completely different meaning. Without the quantifier “there exist” the definition would not make
sense.
• Order of quantifiers: Equally crucial is the order of the quantifiers in definitions. Interchanging
the order of the “for all” and “there exist” portions of a statement completely turns around its
meaning, as is illustrated by the examples of “botched” − δ definitions in Honors HW 2 and on the
Logic Worksheet. For example, the correct definition of an unbounded function is: “For all M ∈ R
there exists x ∈ R such that |f (x)| > M .” Swapping the order of the quantifiers would give: “There
exists x ∈ R such that for all M ∈ R, |f (x)| > M .” In the latter form, M appears after x, so M can
be chosen as a function of x, and choosing M = |f (x)| + 1 one obtains a contraction. Thus, there is
no function that satisfies the latter statement.
• Counterexamples: A counterexample to a statement must satisfy all of the hypotheses in the
statement, but fail the conclusion. For instance, consider the (false) statement: “Any function from
R to R that is increasing is surjective.” A counterexample f to this statement must satisfy the
following three conditions: (i) f is a function from R to R; (ii) f is increasing; and (iii) f is not
√
surjective. The function f (x) = x is not a counterexample, since it is not defined for x < 0 and
hence not a function from R to R. The function f (x) = x2 is not a counterexample since it is not
increasing (as a function from R to R).
• Specifying counterexamples: A counterexample most be completely specified. For a function this
requires specifying the domain A and target B of the function, and describing in an unambiguous
manner how the function assigns to each element of A an element of B (e.g., by a rule or formula, or
by an explicit listing of values f (1) = 1, f (2) = 3, etc.). For example, to show that the implication
“g ◦ f injective implies f injective and g injective” is false, one needs to specify sets A, B, C and
functions f : A → B and g : B → C for which the premise holds, but the conclusion fails. Simply
listing sets A, B, C does not constitute a counterexample.
• Bijections: By definition, a bijection is a function with the property that it is both surjective and
injective. Saying that a set is a bijection, or is bijective, makes no sense. Similarly, saying that two
sets A and B “are bijective”, is nonsensical; the correct wording is “there exists a bijection between
A and B”.
1
Math 347 F1, Spring 2010
Midterm Exam 2 —Solutions
Prof. A.J. Hildebrand
1. Definitions: For the following questions an answer is sufficient: Just state the requested definition.
Be sure to use correct notation, include any necessary quantifiers in the appropriate order, and
connecting words (e.g., “such that”) if necessary. Definitions should be stated in English, i.e., not
using logical symbols (∀, ∃, ¬, =⇒ , etc.).
(a) A function f from R to R is decreasing if . . .
Solution: [cf. Logic worksheet, Variant] “(∀x, y ∈ R)[x < y ⇒ f (x) > f (y)]”
“For all x, y ∈ R, if x < y, then f (x) > f (y).”
Shorter and more elegant: “f (x) < f (y) holds whenever x < y”
(b) A function f : A → B is not injective if ...
Solution:
“there exist x, y ∈ A such that x 6= y and f (x) = f (y).”
(c) A function f : A → B is called surjective if ...
Solution:
“for all b ∈ B, there exists an a ∈ A such that f (a) = b.”
(d) Two sets A and B are said to have the same cardinality if ...
Solution:
“there exists a bijection from A to B.”
(e) A set A is called countable if ...
Solution:
“there exists a bijection from N to A.”
2. Quickies.
(a) Evaluate the following expressions, or simplify to the extent possible. No proofs are required,
and you can use any formulas covered in class, the homework, or the worksheets. (Below n is
an arbitrary positive integer, and the ai are arbitrary real numbers.)
Pn
(i)
i=1 (n − i) n(n − 1)/2
Qn
n+1
(ii) i=0 n n
| · n{z· · · n} = n
n+1
(iii)
Pn
i=0 (ai+1
− ai )
Solution:
[cf. Appendix to the Induction Worksheet.]
n
n
n
n+1
n
X
X
X
X
X
(ai+1 − ai ) =
ai+1 −
ai =
aj −
ai = an+1 − a0
i=0
i=0
i=0
j=1
i=0
(b) For the following questions, either give an example with the requested properties, or explain (in
one or two sentences) why no such example exists. (In the first case, just specify the example;
no proofs required.)
(i) A function from R to R that is increasing, but not surjective.
Solution: f (x) = ex .
(ii) A bijection between Z (the set of all integers) and Zodd (the set of odd integers).
Solution: f (n) = 2n − 1.
(iii) A function from R to R that has an inverse, but is not injective.
Solution: No such function exists, since if f has an inverse, then f is a bijection
and hence injective.
2
Math 347 F1, Spring 2010
Midterm Exam 2 —Solutions
Prof. A.J. Hildebrand
3. Let the sequence hai be defined by a1 = 1, a2 = 2, and an = an−1 + an−2 for n ≥ 3. Prove that for
all n ∈ N,
n−1
3
.
an ≥
2
Your write-up must include all steps, in the correct logical order, and with appropriate justifications
for each step (e.g., “by ind. hyp. applied to ...”, “by AGM”, “by equation (1)”).
Solution: [cf. Strong Induction Worksheet, Sample Proof] We use strong induction to
prove that, for all n ∈ N,
an ≥ (3/2)n−1 .
(∗)
Base step: Our base consists of the first two cases, n = 1 and n = 2. When n = 1, the
left side of (∗) is a1 = 1, and the right side is (3/2)0 = 1, so (∗) holds for n = 1. When
n = 2, the left side of (∗) is a2 = 2, and the right side is (3/2)1 = 3/2, so the inequality
(∗) holds also for n = 2.
Induction step: Let k ≥ 2 be given and suppose (∗) is true for all n = 1, 2, . . . , k. Then
ak+1 = ak + ak−1
(by recurrence for an )
≥ (3/2)k−1 + (3/2)k−2
(by strong induction hypothesis with n = k and n = k − 1)
(by algebra)
= (3/2) (3/2) + (3/2)−2
2 4
= (3/2)k
+
3 9
10
= (3/2)k
9
k
> (3/2) .
k
−1
Thus, (∗) holds for n = k + 1, and the proof of the induction step is complete.
Conclusion: By the strong induction principle, it follows that (∗) is true for all n ∈ N.
4. Using induction prove that, for any n ∈ N and any real numbers a1 , a2 , . . . , an ,
n
n
X
X
ai ≤
|ai |.
i=1
i=1
Your write-up must include all steps, in the correct logical order, and with appropriate justifications
for each step (e.g., “by ind. hyp. applied to ...”, “by the AGM inequality”, “by equation (1)”).
Solution: We will prove by induction on n the following statement:
P (n): For all real numbers a1 , . . . , an ∈ R we have
n n
X X
ai ≤
|ai |
(1)
i=1
i=1
(Note that the quantifier “for all a1 , . . . , an ” must be part of the induction statement we
seek to prove.)
Base case: For n = 1, the left and right sides are both equal to |a1 |, so P (1) holds in this
case.
3
Math 347 F1, Spring 2010
Midterm Exam 2 —Solutions
Prof. A.J. Hildebrand
Induction step: Let k ≥ 1, and suppose P (k) is true, i.e., suppose that (1) holds for
n = k and any choice of real numbers a1 , . . . , ak . We seek to show that P (k + 1) is true,
i.e., that for any choice of real numbers a1 , . . . , ak+1 the inequality (1) holds. The key to
the argument is the triangle inequality
|x + y| ≤ |x| + |y| (x, y ∈ R).
(2)
Let a1 , . . . , ak+1 be given real numbers. Then
k+1 k
!
X X
ai = ai + ak+1 i=1
i=1
!
k
k
X
X
≤
ai + |ak+1 | (by (2) with x =
ai and y = ak+1 )
≤
i=1
k
X
i=1
|ai | + |ak+1 | (by induction hypothesis)
i=1
=
k+1
X
|ai |.
i=1
Thus, (1) holds for n = k + 1, and since a1 , . . . , ak+1 were arbitrary real numbers, we have
obtained statement P (k + 1). Hence, the proof of the induction step is complete.
Conclusion: By the principle of induction, P (n) is true for all n ∈ N.
5. Let A, B, C be sets, f : A → B, and g : B → C be functions, and let h : A → C be defined by
h(x) = g(f (x)) for x ∈ A.
(a) Give a careful, step-by-step, proof of the following statement:
If h is not injective, then at least one of the functions f and g is not injective.
Your write-up must include all necessary steps, with appropriate justifications (e.g., “by the
def. of ...”), in the correct logical order, use proper notation and terminology, and include any
necessary quantifiers and connecting words (e.g., “therefore”, “since”, “for some ...”).
Solution: [cf. Problem 4.33(a) in HW 6] We prove the statement in its contrapositive
form: (∗) If f and g are injective, then h is injective.
Proof of (∗): Suppose f and g are injective.
Let x, y ∈ A and assume h(x) = h(y).
Since h = g ◦ f , the last equation can written as g(f (x)) = g(f (y)).
Since g is injective, this implies f (x) = f (y).
Since f is injective, it follows that x = y.
Summarizing, we have shown that, for any x, y ∈ A, h(x) = h(y) implies x = y.
Therefore, h is injective, so we have proved (∗).
(b) Show by a counterexample that the following statement is FALSE:
If h is not injective, then both of the functions f and g are not injective.
(A detailed proof is not necessary for this part; a counterexample with a brief explanation (one
or two sentences) is enough.)
Solution:
[cf. Problem 4.34(b) in HW 6] Let A = N, B = {1}, C = {1}, and
let f : A → B and g : B → C be defined by f (x) = 1 for x ∈ N, g(1) = 1. Then
h(x) = g(f (x)) = 1 for x ∈ N. Thus, h is not injective, but g is injective.
4