diff --git a/chapter_1/1_5/additional_exercises.md b/chapter_1/1_5/additional_exercises.md new file mode 100644 index 0000000..fda45b8 --- /dev/null +++ b/chapter_1/1_5/additional_exercises.md @@ -0,0 +1,131 @@ +# 1.5.8 Additional Exercises + +1. + +Q: Prove that for any two sets $A$ and $B$, $A \subseteq B$ if and only if +$A \cup B = B$. + +A: + +2. + +Q: The **intersection** of sets $A$ and $B$, denoted $A \cap B$, is the set of +all elements that are in both $A$ and $B$. + +Prove that for any two sets $A$ and $B$, $A \subseteq B$ if and only if +$A \cap B = A$. + +A: + +3. + +Q: Prove that for any sets $A$, $B$, and $C$, if $A \cup B \subseteq C$, then +$A \subseteq C$ and $B \subseteq C$. + +A: + +4. + +Q: Prove that for any sets $A$, $B$, and $C$, if $A \subseteq C$ and +$B \subseteq C$, then $A \cup B \subseteq C$. + +A: + +5. + +Q: The **difference** of sets $A$ and $B$, written $A$ \ $B$, is the set of all +elements that are in $A$ but not in $B$. + +The **empty set**, written $\emptyset$, is the set that contains no elements. + +Prove that if $A$ \ $B = A$ then $A \cap B = \emptyset$. + +A: + +6. + +Q: Prove that if $A$ \ $B = B$ \ $A$ then $A = B$. + +A: + +7. + +Q: Let $f:X \to Y$ be a function, and let $A$ and $B$ be subsets of $X$. + +(a) Prove that $f(A \cap B) \subseteq f(A) \cap f(B)$. + +(b) Find an example of a function and two sets $A$ and $B$ such that +$f(A \cap B) \neq f(A) \cap f(B)$. + +A: + +8. + +Q: Let $f: X \to Y$ be a function, and let $A$ and $B$ be subsets of $X$. + +(a) Prove that $f(A \cup B) \subseteq f(A) \cup f(B)$. + +(b) Prove that $f(A) \cup (B) \subseteq f(A \cup B)$ + +\(c\) What can you conclude from the two proofs above? + +A: + +9. + +Q: Given a function $f: X \to Y$ and a set $B \subseteq Y$, we define the +**inverse image** of $B$ under $f$ as the set +$f^{-1}(B) = \{x \in X: f(x) \in B\}$. That is, it is all the elements in the +domain that are mapped to elements in $B$. + +(A) For $f: \mathbb{N} \to \mathbb{N}$ defined by $f(n) = n^2$, what are each of +the following sets? + +(a) $f^{-1}(\{1, 4, 9\})$ + +(b) $f^{-1}(\{2, 3, 5, 7\})$ + +\(c\) $f^{-1}(\{1, 2, \dots, 10\})$ + +(B) Prove that for any set $C \subseteq X, C \subseteq f^{-1}(f(C))$. + +\(C\) Give an example of a function $f$ and a set $C$ such that +$C \neq f^{-1}*(f(C))$. + +(D) Prove that for any set $D \subseteq Y, f(f^{-1}(D)) \subseteq D$. + +(E) Give an example of a function $f$ and a set $D$ such that +$f(f^{-1}(D)) \neq D$. + +A: + +10. + +Q: Let $f: X \to Y$ be a function, and let $A$ and $B$ be subsets of $Y$. Prove +that $f^{-1}(A \cap B) = f^{-1}(A) \cap f^{-1}(B)$. + +A: + +11. + +Q: Let $f: X \to Y$ be a function, and let $A$ and $B$ be subsets of $Y$. Prove +that $f^{-1}(A \cup B) = f^{-1}(A) \cup f^{-1}(B)$. + +A: + +12. + +Q: For each relation below, determine whether it is transitive. If it is, prove +it. If it is not, give a counterexample. + +(a) The relation "$|$" (divides) on $\mathbb{Z}$ defined by $a|b$ provided $b$ +is a multiple of $a$. + +(b) The relation "$\leq$" (less than or equal to) on $\mathbb{R}$. + +\(c\) The relation "$\perp$" (is perpendicular to) on the set of lines in the +plane. + +(d) The relation "$\sim$" (is similar to) on the set of triangles in the plane +(two triangles are similar if they have the same angles, bu are not necessarily +the same size). diff --git a/chapter_1/1_5/definition_1_5_1.md b/chapter_1/1_5/definition_1_5_1.md new file mode 100644 index 0000000..54da4cf --- /dev/null +++ b/chapter_1/1_5/definition_1_5_1.md @@ -0,0 +1,21 @@ +# Definition 1.5.1 + +A set $A$ is a **subset** of a set $B$, written $A \subseteq B$, provided every +element of $A$ is also an element of $B$. + +The set $B$ is sometimes called a **superset** of $A$. + +We say $A$ is a **proper subset** of $B$, written $A \subset B$, provided +$A \subseteq B$ and $A \neq B$. In other words, if every element in $a$ is an +element in $B$, and there is at least one element in $B$ that is _not_ in $A$. + +## Example 1.5.2 + +Let $A = \{x \in \mathbb{N}: x < 5\}$ and $B = \{x \in \mathbb{N}: x^2 < 10\}$. +Is $B \subseteq A$? Is $B$ a _proper_ subset of $A$? + +**Solution** We are asking whether every natural number less than $5$ is also a +natural number whose square is less than $10$. Okay, we could just write out the +elements of the sets: $A = \{0, 1, 2, 3, 4\}$ and $B = \{0, 1, 2, 3\}$ (since +$3^2 = 9$ and $4^2 = 16$) . So $B \subseteq A$. But $B \neq A$, so in fact +$B \subset A$. diff --git a/chapter_1/1_5/definition_1_5_12.md b/chapter_1/1_5/definition_1_5_12.md new file mode 100644 index 0000000..b024d64 --- /dev/null +++ b/chapter_1/1_5/definition_1_5_12.md @@ -0,0 +1,17 @@ +# Definition 1.5.12 + +A relation $R$ on a set $A$ is **transitive** provided for all $x$, $y$, +$z \in A$, if $xRy$ and $yRz$, then $xRz$. + +## Example 1.5.13 + +Consider the relation $~$ on the set of students in your Discrete Math course +that holds of two students, provided they have some other class together. Is +this relation transitive? + +**Solution** No, not necessarily (although for some sets of students it could +be). For example, suppose Alice has another class with Bruce, say Introduction +to Programming. Carlos is not in Intro to Programming, but he and Bruce are both +in Organic Chemistry. So then Alice $~$ Bruce and Bruce $~$ Carlos, but it might +nobe the case that Alice $~$ Carlos (since Alice need not be in Organic +Chemistry with Carlos). diff --git a/chapter_1/1_5/definition_1_5_15.md b/chapter_1/1_5/definition_1_5_15.md new file mode 100644 index 0000000..c6a08fe --- /dev/null +++ b/chapter_1/1_5/definition_1_5_15.md @@ -0,0 +1,5 @@ +# Definition 1.5.15 + +Let $v$ be a vertex in a graph $G$. The **degree** of $v$, written $d(v)$, is +the number of edges that contain $v$, i.e., the number of edges **incident** to +$v$. diff --git a/chapter_1/1_5/definition_1_5_5.md b/chapter_1/1_5/definition_1_5_5.md new file mode 100644 index 0000000..2c9fc66 --- /dev/null +++ b/chapter_1/1_5/definition_1_5_5.md @@ -0,0 +1,5 @@ +# Definition 1.5.5 + +A function $f : A \to B$ is **injective** (or **one-to-one**) provided every +element in$ B$ is the image of at most one element in $A$. In other words, no +element in $B$ is the _output_ for more than one _input_ from $A$. diff --git a/chapter_1/1_5/definition_1_5_9.md b/chapter_1/1_5/definition_1_5_9.md new file mode 100644 index 0000000..2d312d5 --- /dev/null +++ b/chapter_1/1_5/definition_1_5_9.md @@ -0,0 +1,16 @@ +# Definition 1.5.9 + +Given a function $f : X \to Y$ and a set $A \subseteq X$, we define the **image +of** $A$ **under** $f$ to be the set $f(A) = \{f(a) \in Y: a \in A\}$. That is, +$f(A)$ is the set of all outputs of the function for inputs in $A$. + +## Example 1.5.10 + +Let $f: \mathbb{N} \to \mathbb{N}$ be defined by $f(n) = 2n$. Let +$A = \{1, 2, 3\}$. Find $f(A)$. + +**Solution**. Evaluate each element of $A$ by $f$. + +$$ f(1) = 2; \quad f(2) = 4; f(3) = 6. $$ + +We want the set of these outputs. So $f(A) = \{2, 4, 6}$. diff --git a/chapter_1/1_5/practice_problems.md b/chapter_1/1_5/practice_problems.md new file mode 100644 index 0000000..e5668d9 --- /dev/null +++ b/chapter_1/1_5/practice_problems.md @@ -0,0 +1,123 @@ +# 1.5.7 Practice Problems + +1. + +Q: Given sets $A$ and $B$, the **intersection** of $A$ and $B$, written +$A \cap B$, is the set of all elements that are in both $A$ and $B$. + +Suppose you wanted to prove that if $A \cap B = B$ then $B \subseteq A$. + +Which would be a good start to this proof if you used a direct proof? + +A. Let $a$ be an element of $A \cap B$. + +B. Let $b$ be an element of $B$. + +C. Let $a$ be an element of $A$. + +D. Suppose there is an element $b$ in $B$ that is not in $A$. + +A: + +2. + +Q: Suppose you wanted to prove that for all sets $A$ and $B$ that +$A \cap B \subseteq A$. Which of the following would be a good start to a proof +by contradiction? + +A. Suppose there is an element $a$ in $A$ that is not in $A \cap B$. + +B. Suppose there is an element $a$ in $A \cap B$ that is not in $A$. + +C. Let $a$ be an element of $A$. + +D. Let $a$ be an element of $A \cap B$. + +A: + +3. + +Q: Arrange some of the statements below to form a correct proof of the following +statement: "For any sets $A$ and $B$, if $B \subseteq A \cap B$" then +$B \subseteq A$". + +- Therefore $B \subseteq A \cap B$ + +- Since $A \cap B$ contains all the elements that are in both $A$ and $B$, $b$ + is an element of $A$. + +- Then $b$ is an element of $A \cap B$ since $B \subseteq A \cap B$. + +- Let $b$ be an element of $A \cap B$. + +- Suppose $B \subseteq A$. + +- Suppose $B \subseteq A \cap B$, then let $b$ be an element of $B$. + +- Then $b$ is an element of $B$ since $B \subseteq A \cap B$. + +- Therefore $B \subseteq A$. + +- Suppose $A \subseteq B$. + +A: + +4. + +Q: Prove that for any sets $A$ and $B$, $(A \cap B) \cup A$ = A$. Arrange the +statements below to form a correct proof. + +- So in particular, $x$ is an element of $A$. + +- Second, we will prove that $A \subseteq (A \cap B) \cup A$. + +- Let $x$ be an element of $(A \cap B) \cup A$. + +- Therefore $A \subseteq (A \cap B) \cup A$. + +- First we will prove that $(A \cap B) \cup A \subseteq A$. + +- Therefore $(A \cap B) \cup A \subseteq A$. + +- Since $(A \cap B) \cup A \subseteq A$ and $A \subseteq (A \cap B) \cup A$, we + have $(A \cap B) \cup A = A$. + +- Then $x$ is an element of $(A \cap B) \cup A$, since $x$ is in $A$ or in the + other set. + +- Then $x$ is an element of $A \cap B$, or $x$ is an element of $A$. + +- Let $x$ be an element of $A$. + +A: + +5. + +Q: Let $f: X \to Y$ be a function and let $B \subseteq Y$ be a subset of the +codomain. Define the **inverse image** of $B$ under $f$ to be the set +$f^{-1}(B) = \{x \in X: f(x) \in B\}$. That is, it is all the elements in the +domain that are mapped to elements in $B$. + +Prove that if $B_1 \subseteq B_2$ are subsets of the codomain, then +$f^{-1}(B_1) \subseteq f^{-1}(B_2)$. Arrange some of the statements below to +form a correct proof. + +- Thus $B_1 \subseteq B_2$ . + +- This means that $f(a)$ is an element of $B_1$. + +- Therefore $b$ is an element of $B_2$. + +- Therefore $f^{-1}(B_1) \subseteq f^{-1}(B_2)$. + +- Suppose $B_1 \subseteq B_2$. + +- Since $B_1 \subseteq B_2$, $f(a)$ is an element of $B_2$. + +- This then means that $a$ is an element of $f^{-1}(B_2)$. + +- Let $b$ be an element of $B_1$. + +- Let $a$ be an element of $f^{-1}(B_1)$. + +A: diff --git a/chapter_1/1_5/preview_activity.md b/chapter_1/1_5/preview_activity.md index a220fb7..19e6dae 100644 --- a/chapter_1/1_5/preview_activity.md +++ b/chapter_1/1_5/preview_activity.md @@ -14,31 +14,80 @@ in $A$ is also an element of $B$. b. Given sets $A$ and $B$, the union of $A$ and $B$, written $A \cup B$, is the set containing every element that is in $A$ and $B$ or both. -(a) Let $B = \{1, 3, 5, 7, 9\}$. Give an example of a set $A$ containing 3 +(a) + +Q: Let$B = \{1, 3, 5, 7, 9\}$. Give an example of a set $A$ containing 3 elements that is a subset of $B$. What is $A \cup B$ for a set $A$ you gave as an example? -(b) Give an example of two distinct sets $A$ and $B$ such that $A \cup B = B$. +A: + +$$ A = \{1, 3, 5\} $$ + +$$ A \cup B = \{1, 3, 5, 7, 9\} $$ + +(b) + +Q: Give an example of two distinct sets $A$ and $B$ such that $A \cup B = B$. For the example you gave, is $A \subseteq B$? -\(c\) Find examples, if they exist, of sets $A$ and $B$ such that +A: + +$$ A = \{1, 2\}, \quad B = \{1, 2, 3\} $$ + +Yes, for this example, $A \subseteq B$. + +\(c\) + +Q: Find examples, if they exist, of sets $A$ and $B$ such that $A \cup B \neq B$. For the example you gave, is $A \subseteq B$? +A: + +$$ A = \{1, 2, 3\} \quad B = \{1, 2\} $$ + +$$ A \cup B = \{1, 2, 3\} $$ + +In this case $A$ is not a subset of $B$. + 2. Which of the following are always true? -A. For any sets $A$ and $B$, $A \cup B \subseteq B$. +A. -B. For any sets $A$ and $B$, $B \subseteq A \cup B$. +Q: For any sets $A$ and $B$, $A \cup B \subseteq B$. -C. For any sets $A$ and $B$, if $A \subseteq B$, then $A \cup B \subseteq B$. +A: No, we just demonstrated that this was not true in 1a by showing example sets +this is not the case. -D. For any sets $A$ and $B$, if $A \cup B = B$, then $A \subseteq B$. +B. + +Q: For any sets $A$ and $B$, $B \subseteq A \cup B$. + +A: Yes this is always true. Since $A \cup B$ will always contain elements from +both $A$ and $B$, this means that every element of $B$ is automatically in +$A \cup B$. + +C. + +Q: For any sets $A$ and $B$, if $A \subseteq B$, then $A \cup B \subseteq B$. + +A: Yes this is always true. $A \subseteq B$ means that set $B$ contains all +elements of $A$, and so therefore the union of $A \cup $B$ will always be a +subset of $B$. + +D. + +Q: For any sets $A$ and $B$, if $A \cup B = B$, then $A \subseteq B$. + +A: Yes, this is always true. If $A \cup B = B$, this means that any element in +$A$ must also be in $B$, but $A$ must also not contain any elements not in $B$. +This makes $A$ a subset of $B$. 3. @@ -50,10 +99,45 @@ $f(A) = \{f(x) : x \in A\}$. For the following tasks, let's explore the function $f : \mathbb{N} \to \mathbb{N}$ defined by $f(x) = x^2 - 3x + 8$. -(a) Let $A = \{1, 2, 3\}$ and $B = \{2, 4, 6\}$. Find $f(A)$ ad $f(B)$. Then -find $f(A) \cup f(B)$. +(a) + +Q: Let $A = \{1, 2, 3\}$ and $B = \{2, 4, 6\}$. Find $f(A)$ ad $f(B)$. Then find +$f(A) \cup f(B)$. + +A: + +$$ f(A) = \{6, 8 \} $$ + +$$ f(B) = \{12, 26\} $$ + +$$ f(A) \cup f(B) = \{6, 8, 12, 26\} $$ (b) Now find $A \cup B$ and $f(A \cup B)$. -\(c\) Give an example, if one exists, of two distinct sets $A$ and $B$ such that +$$ A \cup B = \{1, 2, 3, 4, 6\} $$ + +$$ f(A \cup B) = \{6, 8, 12, 26\} $$ + +\(c\) + +Q: Give an example, if one exists, of two distinct sets $A$ and $B$ such that $A \subseteq B$ and $f(A) \subseteq f(B)$. + +A: + +$$ A = \{1, 2\} \quad B = \{1, 2, 3\} $$ + +$$ A \subseteq B $$ + +$$ f(A) = \{6\} $$ + +$$ f(B) = \{6, 8\} $$ + +$$ f(A) \subseteq f(B) $$ + +Q: Give an example, if one exists, of two distinct sets $A$ and $B$ such that +$A \subseteq B$ but $f(A) \nsubseteq f(B)$. + +A: + +The requested example cannot exist. diff --git a/chapter_1/1_5/proposition_1_5_11.md b/chapter_1/1_5/proposition_1_5_11.md new file mode 100644 index 0000000..d32e51d --- /dev/null +++ b/chapter_1/1_5/proposition_1_5_11.md @@ -0,0 +1,4 @@ +# Proposition 1.5.11 + +Let $f: X \to Y$ be a function, and let $A$ and $B$ be subsets of $X$. If +$A \subseteq B$, then $f(A) \subseteq f(B)$. diff --git a/chapter_1/1_5/proposition_1_5_17.md b/chapter_1/1_5/proposition_1_5_17.md new file mode 100644 index 0000000..ba42c59 --- /dev/null +++ b/chapter_1/1_5/proposition_1_5_17.md @@ -0,0 +1,3 @@ +# Proposition 1.5.17 + +In any graph, the number of vertices with odd degree must be even. diff --git a/chapter_1/1_5/proposition_1_5_3.md b/chapter_1/1_5/proposition_1_5_3.md new file mode 100644 index 0000000..59346db --- /dev/null +++ b/chapter_1/1_5/proposition_1_5_3.md @@ -0,0 +1,4 @@ +# Proposition 1.5.3 + +For any sets $A$, $B$, and $C$, if $A \subseteq B$ and $B \subseteq C$, then +$A \subseteq C$. diff --git a/chapter_1/1_5/proposition_1_5_7.md b/chapter_1/1_5/proposition_1_5_7.md new file mode 100644 index 0000000..4b357b7 --- /dev/null +++ b/chapter_1/1_5/proposition_1_5_7.md @@ -0,0 +1,4 @@ +# Proposition 1.5.7 + +Suppose $f : A \to B$ is a function with $A$ and $B$ both finite sets. If +$|A| > |B|$, then $f$ is not injective. diff --git a/chapter_1/1_5/reading_questions.md b/chapter_1/1_5/reading_questions.md new file mode 100644 index 0000000..77b0130 --- /dev/null +++ b/chapter_1/1_5/reading_questions.md @@ -0,0 +1,30 @@ +# 1.5.6 Reading Questions + +1. + +Q: Which of the following is the definition of a function $f: A \to B$ being +injective? + +A. Every element of $B$ is the image of at most one element of $A$. + +B. The domain $A$ is a larger set than the codomain $B$. + +C. Every element of $A$ is sent to at most one element of $B$. + +D. The codomain $B$ is no smaller than the domain $A$. + +A: + +2. + +Q: When would you most likely use element chasing as part of a proof? + +A. When proving that one set is a subset of another. + +B. When proving that a function is injective. + +C. When proving that a relation is transitive. + +D. When proving that a graph has an odd number of edges. + +A: