Docsity

Midterm Exam 1 Solutions | Basic Discrete Mathematics | MATH 213, Exams of Discrete Mathematics

Toggle sidebar
bg1
Math 213 F1 Midterm Exam 1 Solutions Prof. A.J. Hildebrand
•Grading: The exam was worth 100 points. The breakdown per problem is given on the
coversheet. For multipart problems, each part was worth 5 points.
•Exam statistics: Scores ranged from 39 to 100. The average was 71, and the median
score was 73.
•Access to online scores: See the course webpage for a link to the online score system,
an explanation of the score display, and an approximate letter grade correspondence for
your total score.
•Solutions: Solutions, along with some remarks about common errors, follow below. Check
these solutions first before asking questions about the grading.
Exam Solutions
1. Let A={1,2,3},B={3,4}, and C={4}. For the first four parts, write down the
requested set explicitly using proper set-theoretic notation. The final part is a true/false
question, involving the set Aabove. (For this problem, answers are sufficient. Just write
down the sets requested; no justification needed.)
(a) (A−B)∪(B−A) = {1,2,4}
(b) A−(B−C) = {1,2}
(c) B×C={(3,4),(4,4)}
(d) (True/false) With the set A={1,2,3}defined as above, determine which of the
following statements about the power set P(A) are true, and which are false. Mark
those that are true by T , and those that are false by F . If you are unsure, leave
the answer blank. (There will a small penalty for an incorrectly marked answer.)
A. {2,3} ∈ P(A)
B. {2,3} ⊆ P(A)
C. ∅ ∈ P(A)
D. ∅ ⊆ P(A)
Solution: A,C,D are true, B is false. Reason: By definition, P(A) is the
set whose elements are the subsets of {1,2,3}. Since {2,3}and ∅are among
these subsets, they are elements of P(A), so A and C are true. D is true
since any set contains the empty set as a subset. However, B is false, since
{2,3}is an element, not a subset of P(A).
Grading note: 5 points if all 4 answers are correct. 4 points for 3 right and
1 wrong answer, 2 points for 2 right and 2 wrong answers, and 0 points for 3
or more incorrect answers.
2. Let fand gbe functions from Zto Zdefined by
f(n) = n3+ 1, g(n) = bn/2c,
where b. . . cdenotes the floor function.
(a) Is fan onto function from Zto Z? If not, give a specific counterexample. (If yes, no
further justification is needed.)
Solution: NO The number 3 is not of the form n3+ 1 with n∈Z, and
hence not in the range of f. (This is a variation on Problem 2.3:12/13 from
HW 1.)
1
pf3
pf4

Partial preview of the text

Download Midterm Exam 1 Solutions | Basic Discrete Mathematics | MATH 213 and more Exams Discrete Mathematics in PDF only on Docsity!

  • Grading: The exam was worth 100 points. The breakdown per problem is given on the coversheet. For multipart problems, each part was worth 5 points.
  • Exam statistics: Scores ranged from 39 to 100. The average was 71, and the median score was 73.
  • Access to online scores: See the course webpage for a link to the online score system, an explanation of the score display, and an approximate letter grade correspondence for your total score.
  • Solutions: Solutions, along with some remarks about common errors, follow below. Check these solutions first before asking questions about the grading.

Exam Solutions

  1. Let A = { 1 , 2 , 3 }, B = { 3 , 4 }, and C = { 4 }. For the first four parts, write down the requested set explicitly using proper set-theoretic notation. The final part is a true/false question, involving the set A above. (For this problem, answers are sufficient. Just write down the sets requested; no justification needed.)

(a) (A − B) ∪ (B − A) = { 1 , 2 , 4 }

(b) A − (B − C) = { 1 , 2 }

(c) B × C = {(3, 4), (4, 4)} (d) (True/false) With the set A = { 1 , 2 , 3 } defined as above, determine which of the following statements about the power set P (A) are true, and which are false. Mark those that are true by T , and those that are false by F. If you are unsure, leave the answer blank. (There will a small penalty for an incorrectly marked answer.) A. { 2 , 3 } ∈ P (A) B. { 2 , 3 } ⊆ P (A) C. ∅ ∈ P (A) D. ∅ ⊆ P (A) Solution: A,C,D are true, B is false. Reason: By definition, P (A) is the set whose elements are the subsets of { 1 , 2 , 3 }. Since { 2 , 3 } and ∅ are among these subsets, they are elements of P (A), so A and C are true. D is true since any set contains the empty set as a subset. However, B is false, since { 2 , 3 } is an element, not a subset of P (A). Grading note: 5 points if all 4 answers are correct. 4 points for 3 right and 1 wrong answer, 2 points for 2 right and 2 wrong answers, and 0 points for 3 or more incorrect answers.

  1. Let f and g be functions from Z to Z defined by

f (n) = n^3 + 1, g(n) = bn/ 2 c,

where b... c denotes the floor function.

(a) Is f an onto function from Z to Z? If not, give a specific counterexample. (If yes, no further justification is needed.) Solution: NO The number 3 is not of the form n^3 + 1 with n ∈ Z, and hence not in the range of f. (This is a variation on Problem 2.3:12/13 from HW 1.)

(b) Is f a one-to-one function from Z to Z? If not, give a specific counterexample. (If yes, no further justification is needed.)

Solution: YES (See Problem 2.3:12 from HW 1.) (c) Is g a one-to-one function from Z to Z? If not, give a specific counterexample. (If yes, no further justification is needed.)

Solution: NO Since b 1 / 2 c = 0 and b 0 / 2 c = 0, g(1) and g(0) are both 0. (d) Is there a set A ⊆ Z such that g becomes a bijection from A to Z. If yes, specify the set A. (If no, no further justification is needed.) Solution: YES Take A to be the set of even integers.

  1. Evaluate the following sums and products. (Here n denotes a (general) positive integer. In the last part, p is a real number with 0 < p < 1.)

(a)

∏^ n

i=

(−2) (−2)n+

(b)

∏^ n

i=

in^1 n 2 n^... nn^ = n!n

(c)

∑^ n

i=

∑^ i

j=

∑n i=1 i^ =^

n(n+1) 2

(d)

∑^ n

i=

pi(1 − p)n−i

Solution: This sum is of the same type as 9(h) from HW 2 (with p and 1 − p in place of x and y). To evaluate it, factor out (1 − p)n^ and convert the sum to a geometric series with ratio r = p/(1 − p):

(1 − p)n

∑n

i=

p 1 − p

)i = (1 − p)n

p 1 −p

)n+ − 1 p 1 −p −^1

  1. State the official (formal) mathematical definitions for the given terms, using proper math- ematical language and notation.

(a) The graph of a function f : A → B is defined as the set ... {(a, b) | a ∈ A, b = f (a)} (p. 142 in the text) (b) Two sets A and B are said to have the same cardinality if ... there exists a bijection from A to B (Def. 4, p. 158) Remark: Saying that A and B have the same cardinality if “they have the same number of elements” would not make sense for infinite sets. The only proper way to define cardinality is via bijections. (c) A set A is called countable if ... there exists a bijection from Z+ to A (Def. 5, p. 158) Equivalently, A is countable if it has the same cardinality as Z+.

  1. (Multiple choice. Circle the correct answer.) Suppose we want to prove a statement P (n) by induction.

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 ∈ Z+.

Remarks: Except for a shift in indexing (n → n + 1, which turns the sequence an into the Fibonacci sequence), this problem was worked out in class.

Here are some common errors:

(1) The induction must start with n = 1 in the base step, not n = 3. This is because we need to prove the asserted inequality for all n ∈ Z+. With n = 3 as base case, the inequality would only be proved for n ≥ 3. (2) The base step must include a proof for the first two cases, n = 1 and n = 2 (and not just n = 1). This is because the induction step requires the inequality to hold for the two preceding cases (n = k and n = k − 1). With only n = 1 as base case, the induction step would break down for k = 1 since in that case k − 1 = 0, which is out of our range Z+. (3) The most crucial part of the argument is the place where the induction hypothesis is being used (second line above) and the subsequent algebraic calculations (between the second and fifth line). These steps have to be present in full detail, they have to be correct (in terms of the algebra performed), and they must include appropriate justifications (“by induction hypothesis”, etc.).