Q stringlengths 4 3.96k | A stringlengths 1 3k | Result stringclasses 4
values |
|---|---|---|
Theorem 4.1.2. [Distributive Law for Sets] Let \( A, B \), and \( C \) be sets. Then:\n\n\[ A \cap \left( {B \cup C}\right) = \left( {A \cap B}\right) \cup \left( {A \cap C}\right) \] | Proof. The equality (4.1) is equivalent to the assertion that\n\n\[ z \in A \cap \left( {B \cup C}\right) \text{ iff }z \in \left( {A \cap B}\right) \cup \left( {A \cap C}\right) \]\n\n(4.2)\n\nfor all \( z \) . Now we’ll prove (4.2) by a chain of iff’s.\n\nNow we have\n\n\[ z \in A \cap \left( {B \cup C}\right) \]\n\n... | Yes |
Lemma 4.5.3. For finite sets \( A, B \) :\n\n1. If \( A \) surj \( B \), then \( \left| A\right| \geq \left| B\right| \).\n\n2. If \( A \) inj \( B \), then \( \left| A\right| \leq \left| B\right| \).\n\n3. If \( A \) bij \( B \), then \( \left| A\right| = \left| B\right| \). | Proof. We've already given an \ | No |
Theorem 4.5.5. There are \( {2}^{n} \) subsets of an \( n \) -element set. That is,\n\n\[ \n\\left| A\\right| = n\\;\\text{ implies }\\;\\left| {\\operatorname{pow}\\left( A\\right) }\\right| = {2}^{n}.\n\] | Theorem 4.5.5 follows from the fact that there is a simple bijection from subsets of \( A \) to \( \{ 0,1{\} }^{n} \), the \( n \) -bit sequences. Namely, let \( {a}_{1},{a}_{2},\ldots ,{a}_{n} \) be the elements of \( A \) . The bijection maps each subset of \( S \subseteq A \) to the bit sequence \( \\left( {{b}_{1},... | Yes |
Prove De Morgan's Law for set equality\n\n\[ \overline{A \cap B} = \bar{A} \cup \bar{B} \] | by showing with a chain of IFF’s that \( x \in \) the left hand side of (4.9) iff \( x \in \) the right hand side. You may assume the propositional version (3.11) of De Morgan's Law. | No |
Union distributes over the intersection of two sets:\n\n\[ A \cup \left( {B \cap C}\right) = \left( {A \cup B}\right) \cap \left( {A \cup C}\right) \] | (4.11)\n\n(see Problem 4.4). | No |
Give a simple example where the following result fails, and briefly explain why:\n\nFalse Theorem. For sets \( A, B, C \), and \( D \), let\n\n\[ L : \mathrel{\text{:=}} \left( {A \cup B}\right) \times \left( {C \cup D}\right) ,\]\n\n\[ R : \mathrel{\text{:=}} \left( {A \times C}\right) \cup \left( {B \times D}\right) ... | (b) Identify the mistake in the following proof of the False Theorem.\n\nBogus proof. Since \( L \) and \( R \) are both sets of pairs, it’s sufficient to prove that \( \left( {x, y}\right) \in L \leftrightarrow \left( {x, y}\right) \in R \) for all \( x, y. \)\n\nThe proof will be a chain of iff implications:\n\n\( \l... | Yes |
The inverse, \( {R}^{-1} \), of a binary relation, \( R \), from \( A \) to \( B \), is the relation from \( B \) to \( A \) defined by:\n\n\[ b{R}^{-1}a\text{ iff }{aRb}. \] | In other words, you get the diagram for \( {R}^{-1} \) from \( R \) by \ | No |
Theorem 5.1.1. For all \( n \in \mathbb{N} \) ,\n\n\[ 1 + 2 + 3 + \cdots + n = \frac{n\left( {n + 1}\right) }{2} \] | To prove the theorem by induction, define predicate \( P\left( n\right) \) to be the equation (5.1). Now the theorem can be restated as the claim that \( P\left( n\right) \) is true for all \( n \in \mathbb{N} \) . This is great, because the Induction Principle lets us reach precisely that conclusion, provided we estab... | Yes |
Theorem 5.1.2. For all \( n \geq 0 \) there exists a tiling of a \( {2}^{n} \times {2}^{n} \) courtyard with Bill in a central square. | Proof (successful attempt). The proof is by induction. Let \( P\left( n\right) \) be the proposition that for every location of Bill in a \( {2}^{n} \times {2}^{n} \) courtyard, there exists a tiling of the remainder.\n\nBase case: \( P\left( 0\right) \) is true because Bill fills the whole courtyard.\n\nInductive step... | Yes |
Theorem 5.2.1. Every way of unstacking \( n \) blocks gives a score of \( n\left( {n - 1}\right) /2 \) points. | Proof. The proof is by strong induction. Let \( P\left( n\right) \) be the proposition that every way of unstacking \( n \) blocks gives a score of \( n\left( {n - 1}\right) /2 \) .\n\nBase case: If \( n = 1 \), then there is only one block. No moves are possible, and so the total score for the game is \( 1\left( {1 - ... | Yes |
Lemma 5.4.1. For any transition, \( q \rightarrow r \), of the diagonally-moving robot, if Even-sum(q), then Even-sum(r). | This lemma follows immediately from the definition of the robot's transitions: \( \left( {m, n}\right) \rightarrow \left( {m \pm 1, n \pm 1}\right) \) . After a transition, the sum of coordinates changes by \( \left( {\pm 1}\right) + \left( {\pm 1}\right) \), that is, by 0,2, or -2 . Of course, adding 0,2 or -2 to an e... | Yes |
Theorem 5.4.2. The sum of the coordinates of any state reachable by the diagonally-moving robot is even. | Proof. The proof is induction on the number of transitions the robot has made. The induction hypothesis is\n\n\[ P\\left( n\\right) : \\mathrel{\\text{:=}} \\text{if}q\\text{is a state reachable in}n\\text{transitions, then Even-sum}\\left( q\\right) \\text{.}\]\n\nBase case: \( P\\left( 0\\right) \) is true since the ... | Yes |
Corollary 5.4.3. The robot can never reach position \( \left( {1,0}\right) \) . | Proof. By Theorem 5.4.2, we know the robot can only reach positions with coordinates that sum to an even number, and thus it cannot reach position \( \left( {1,0}\right) \) . | Yes |
Theorem 5.4.7. If \( f \) is a strictly decreasing \( \mathbb{N} \) -valued derived variable of a state machine, then the length of any execution starting at state \( q \) is at most \( f\left( q\right) \) . | Of course, we could prove Theorem 5.4.7 by induction on the value of \( f\left( q\right) \), but think about what it says: \ | No |
Theorem 5.4.8. If there exists a strictly decreasing derived variable whose range is a well ordered set, then every execution terminates. | Theorem 5.4.8 follows immediately from the observation that a set of numbers is well ordered iff it has no infinite decreasing sequences (Problem 2.17). | No |
False Theorem. For all \( n \geq 0 \) ,\n\n\[ 2 + 3 + 4 + \cdots + n = \frac{n\left( {n + 1}\right) }{2} \] | Proof. We use induction. Let \( P\left( n\right) \) be the proposition that \( 2 + 3 + 4 + \cdots + n = \) \( n\left( {n + 1}\right) /2 \) .\n\nBase case: \( P\left( 0\right) \) is true, since both sides of the equation are equal to zero. (Recall that a sum with no terms is zero.)\n\nInductive step: Now we must show th... | No |
Prove by induction on \( n \) that an \( n + 1 \) -bit ripple-carry circuit really is an \( n + 1 \) - bit adder, that is, its outputs satisfy (5.10). | Hint: You may assume that, by definition of binary representation of integers,\n\n\[ \operatorname{num}\left( {\alpha }_{n + 1}\right) = {a}_{n + 1}{2}^{n + 1} + \operatorname{num}\left( {\alpha }_{n}\right) . \]\n\n(5.14) | No |
Prove by induction:\n\n\\[ \n\\mathop{\\sum }\\limits_{{i = 0}}^{n}{i}^{3} = {\\left( \\frac{n\\left( {n + 1}\\right) }{2}\\right) }^{2},\\forall n \\geq 0.\n\\]\n\n(5.17)\n\nusing the equation itself as the induction hypothesis, \\( P\\left( n\\right) \\) . | (a) Prove the\nbase case \\( \\left( {n = 0}\\right) \\) .\n\n(b) Now prove the\ninductive step. | No |
The Fibonacci numbers \( {F}_{0},{F}_{1},{F}_{2},\ldots \) are defined as follows:\n\n\[ \n{F}_{n} : \mathrel{\text{:=}} \left\{ \begin{array}{ll} 0 & \text{ if }n = 0, \\ 1 & \text{ if }n = 1, \\ {F}_{n - 1} + {F}_{n - 2} & \text{ if }n > 1. \end{array}\right.\n\]\n\nThese numbers satisfy many unexpected identities, s... | (a) Prove the\nbase case \( \left( {n = 0}\right) \).\n\n(b) Now prove the\ninductive step. | No |
Problem 5.42.\n\nThere is a bucket containing more blue balls than red balls. As long as there are more blues than reds, any one of the following rules may be applied to add and/or remove balls from the bucket:\n\n(i) Add a red ball.\n\n(ii) Remove a blue ball.\n\n(iii) Add two reds and one blue.\n\n(iv) Remove two blu... | Let \( b \) be the number of blue balls and \( r \) be the number of red balls in the bucket at any given time.\n\n(b) Prove that \( b - r \geq 0 \) is a preserved invariant of the process of adding and removing balls according to rules (i)-(iv). | No |
Theorem 6.1.4. For all \( s, t \in {A}^{ * } \) , \[ \left| {s \cdot t}\right| = \left| s\right| + \left| t\right| \] | Proof. By structural induction on the definition of \( s \in {A}^{ * } \) . The induction hypothesis is \[ P\left( s\right) : \mathrel{\text{:=}} \forall t \in {A}^{ * } \cdot \left| {s \cdot t}\right| = \left| s\right| + \left| t\right| . \] Base case \( \left( {s = \lambda }\right) \) : \[ \left| {s \cdot t}\right| =... | Yes |
Lemma 6.1.6.\n\n\\[ \n{\\# }_{c}\left( {s \cdot t}\right) = {\\# }_{c}\left( s\right) + {\\# }_{c}\left( t\right) \n\\] | The easy proof by structural induction is an exercise (Problem 6.7). | No |
What is \( F\\left( 4\\right) \) ? | Well, \( F\\left( 2\\right) = F\\left( 1\\right) + F\\left( 0\\right) = 1, F\\left( 3\\right) = F\\left( 2\\right) + F\\left( 1\\right) = 2 \), so \( F\\left( 4\\right) = 3 \) . | Yes |
Theorem 6.4.4. For all expressions \( e, f \in \) Aexp and \( n \in \mathbb{Z} \) ,\n\n\[ \operatorname{eval}\left( {\operatorname{subst}\left( {f, e}\right), n}\right) = \operatorname{eval}\left( {e,\operatorname{eval}\left( {f, n}\right) }\right) . \] | Proof. The proof is by structural induction on \( e.{}^{1} \)\n\nBase cases:\n\n- Case \( \left\lbrack x\right\rbrack \)\n\nThe left hand side of equation (6.21) equals \( \operatorname{eval}\left( {f, n}\right) \) by this base case in Definition 6.4.3 of the substitution function, and the right hand side also equals \... | Yes |
Corollary 7.1.2. For finite sets \( A, B \) , \[ A\text{strict}B\text{iff}\left| A\right| < \left| B\right| \text{.} \] | Proof. \( A \) strict \( B \) iff \( \operatorname{NOT}\left( {A\text{surj }B}\right) \) (Def 7.1.1) iff \( \;\operatorname{NOT}\left( {\left| A\right| \geq \left| B\right| }\right) \; \) (Theorem 4.5.4.(4.5)) iff \( \left| A\right| < \left| B\right| \) . | Yes |
Lemma 7.1.3. For any sets, \( A, B, C \) , 1. \( A \) surj \( B \) iff \( B \) inj \( A \) . | Part 1. follows from the fact that \( R \) has the \( \left\lbrack { \leq 1\text{out,} \geq 1\text{in}}\right\rbrack \) surjective function property iff \( {R}^{-1} \) has the \( \left\lbrack { \geq 1\text{out,} \leq 1\text{in}}\right\rbrack \) total, injective property. | Yes |
Lemma 7.1.6.\n\n\[ A\\text{strict}B\\text{AND}B\\text{strict}C \]\n\nimplies\n\n\( A \) strict \( C \)\n\nfor all sets \( A, B, C \) . | Proof. (of Lemma 7.1.6)\n\nSuppose 7.1 holds, and assume for the sake of contradiction that \( \\operatorname{NOT}(A \) strict \( C) \), which means that \( A \) surj \( C \) . Now since \( B \) strict \( C \), Theorem 7.1.5 lets us conclude that \( C \) surj \( B \) . So we have\n\n\[ A\\text{surj}C\\text{AND}C\\text{... | Yes |
Lemma 7.1.7. Let \( A \) be a set and \( b \notin A \) . Then \( A \) is infinite iff \( A \) bij \( A \cup \{ b\} \) . | Proof. Since \( A \) is not the same size as \( A \cup \{ b\} \) when \( A \) is finite, we only have to show that \( A \cup \{ b\} \) is the same size as \( A \) when \( A \) is infinite.\n\nThat is, we have to find a bijection between \( A \cup \{ b\} \) and \( A \) when \( A \) is infinite. Here’s how: since \( A \)... | Yes |
Lemma 7.1.9. A set, \( C \), is countable iff \( \mathbb{N} \) surj \( C \) . In fact, a nonempty set \( C \) is countable iff there is a total surjective function \( g : \mathbb{N} \rightarrow C \) . | The proof is left to Problem 7.12. | No |
Corollary 7.1.10. The following sets are countably infinite:\n\n\[ \n{\mathbb{Z}}^{ + },\mathbb{Z},\mathbb{N} \times \mathbb{N},{\mathbb{Q}}^{ + },\mathbb{Z} \times \mathbb{Z},\mathbb{Q}.\n\] | A small modification of the proof of Lemma 7.1.7 shows that countably infinite sets are the \ | No |
Theorem 7.1.11. [Cantor] For any set, A,\n\n\[ A\text{strict pow}\left( A\right) \text{.} \] | Proof. To show that \( A \) is strictly smaller than pow \( \left( A\right) \), we have to show that if \( g \) is a function from \( A \) to pow \( \left( A\right) \), then \( g \) is not a surjection. To do this, we’ll simply find a subset, \( {A}_{g} \subseteq A \) that is not in the range of \( g \) . The idea is, ... | Yes |
Corollary 7.1.12. pow( \( \mathbb{N} \) ) is uncountable. | The bijection between subsets of an \( n \) -element set and the length \( n \) bit-strings, \( \{ 0,1{\} }^{n} \), used to prove Theorem 4.5.5, carries over to a bijection between subsets of a countably infinite set and the infinite bit-strings, \( \{ 0,1{\} }^{\omega } \) . That is,\n\n\[\n\operatorname{pow}\left( \m... | No |
Corollary 7.1.15. The set \( \mathbb{R} \) of real numbers is uncountable. | To prove this, think about the infinite decimal expansion of a real number:\n\n\[ \sqrt{2} = {1.4142}\ldots \]\n\n\[ 5 = {5.000}\ldots \]\n\n\[ 1/{10} = {0.1000}\ldots \text{,} \]\n\n\[ 1/3 = {0.333}\text{.} \]\n\n\[ 1/9 = {0.111}\ldots \]\n\n\[ 4\frac{1}{99} = {4.010101}\ldots \]\n\nLet’s map any real number \( r \) t... | Yes |
Corollary 7.1.16. The set \( {\left( {\mathbb{Z}}^{ + }\right) }^{ * } \) of all finite sequences of positive integers is countable. | To prove this, think about the prime factorization of a nonnegative integer:\n\n\[ \n{20} = {2}^{2} \cdot {3}^{0} \cdot {5}^{1} \cdot {7}^{0} \cdot {11}^{0} \cdot {13}^{0}\cdots , \n\]\n\n\[ \n{6615} = {2}^{0} \cdot {3}^{3} \cdot {5}^{1} \cdot {7}^{2} \cdot {11}^{0} \cdot {13}^{0}\cdots . \n\]\n\nLet’s map any nonnegat... | Yes |
Theorem 7.2.2. No-halt is not recognizable. | We'll use an argument just like Cantor's in the proof of Theorem 7.1.11.\n\nProof. For any string \( s \in {\mathrm{{ASCII}}}^{ * } \), let \( f\left( s\right) \) be the set of strings recognized by \( {P}_{s} \) :\n\n\[ f\left( s\right) : \mathrel{\text{:=}} \left\{ {t \in {\operatorname{ASCII}}^{ * } \mid {P}_{s}\tex... | Yes |
Prove that this set of sequences is uncountable. | ## Problem 7.23.\n\nThere are lots of different sizes of infinite sets. For example, starting with the infinite set, \( \mathbb{N} \), of nonnegative integers, we can build the infinite sequence of sets\n\n\( \mathbb{N} \) strict pow \( \left( \mathbb{N}\right) \) strict pow \( \left( {\operatorname{pow}\left( \mathbb{... | No |
Forming a pair \( \left( {a, b}\right) \) of items \( a \) and \( b \) is a mathematical operation that we can safely take for granted. But when we're trying to show how all of mathematics can be reduced to set theory, we need a way to represent the pair \( \left( {a, b}\right) \) as a set. | Define\n\n\[\n\operatorname{pair}\left( {a, b}\right) : \mathrel{\text{:=}} \{ a,\{ a, b\} \} .\n\]\n\nExplain why representing \( \left( {a, b}\right) \) as \( \operatorname{pair}\left( {a, b}\right) \) uniquely determines \( a \) and \( b \) . Hint: Sets can’t be indirect members of themselves: \( a \in a \) never ho... | No |
Problem 7.31. (a) Explain how to write a formula Members \( \left( {p, a, b}\right) \) of set theory \( {}^{9} \) that means \( p = \{ a, b\} \) . | Hint: Say that everything in \( p \) is either \( a \) or \( b \) . It’s OK to use subformulas of the form \ | No |
Lemma 8.1.5 (Water Jugs). In the Die Hard state machine of Section 5.4.4 with jugs of sizes \( a \) and \( b \), the amount of water in each jug is always a linear combination of \( a \) and \( b \) . | Proof. The induction hypothesis, \( P\left( n\right) \), is the proposition that after \( n \) transitions, the amount of water in each jug is a linear combination of \( a \) and \( b \) .\n\nBase case \( \left( {n = 0}\right) : P\left( 0\right) \) is true, because both jugs are initially empty, and \( 0 \cdot a + \) \... | Yes |
Lemma 8.2.1. For \( b \neq 0 \) ,\n\n\[ \gcd \left( {a, b}\right) = \gcd \left( {b,\operatorname{rem}\left( {a, b}\right) }\right) . \] | Proof. By the Division Theorem 8.1.4,\n\n\[ a = {qb} + r \] \n\n(8.2)\n\nwhere \( r = \operatorname{rem}\left( {a, b}\right) \) . So \( a \) is a linear combination of \( b \) and \( r \), which implies that any divisor of \( b \) and \( r \) is a divisor of \( a \) by Lemma 8.1.2.2. Likewise, \( r \) is a linear combi... | Yes |
Theorem 8.2.2. The greatest common divisor of \( a \) and \( b \) is a linear combination of \( a \) and \( b \) . That is,\n\n\[ \gcd \left( {a, b}\right) = {sa} + {tb}, \]\n\nfor some integers \( s \) and \( t \) . | We already know from Lemma 8.1.2.2 that every linear combination of \( a \) and \( b \) is divisible by any common factor of \( a \) and \( b \), so it is certainly divisible by the greatest\n\nof these common divisors. Since any constant multiple of a linear combination is also a linear combination, Theorem 8.2.2 impl... | No |
Corollary 8.2.4. Suppose that we have water jugs with capacities \( a \) and \( b \) . Then the amount of water in each jug is always a multiple of \( \gcd \left( {a, b}\right) \) . | For example, there is no way to form 4 gallons using 3- and 6-gallon jugs, because 4 is not a multiple of \( \gcd \left( {3,6}\right) = 3 \) . | No |
Theorem 8.4.1. [Fundamental Theorem of Arithmetic] Every positive integer is a product of a unique weakly decreasing sequence of primes. | ## 8.4.1 Proving Unique Factorization\n\nThe Fundamental Theorem is not hard to prove, but we'll need a couple of preliminary facts.\n\nLemma 8.4.2. If \( p \) | No |
Lemma 8.4.2. If \( p \) is a prime and \( p \mid {ab} \), then \( p \mid a \) or \( p \mid b \) . | Proof. One case is if \( \gcd \left( {a, p}\right) = p \) . Then the claim holds, because \( a \) is a multiple of \( p \) .\n\nOtherwise, \( \gcd \left( {a, p}\right) \neq p \) . In this case \( \gcd \left( {a, p}\right) \) must be 1, since 1 and \( p \) are the only positive divisors of \( p \) . Now \( \gcd \left( {... | Yes |
Lemma 8.6.1 (Remainder).\n\n\[ a \equiv b\;\left( {\;\operatorname{mod}\;n}\right) \;\text{ iff }\;\operatorname{rem}\left( {a, n}\right) = \operatorname{rem}\left( {b, n}\right) . \] | Proof. By the Division Theorem 8.1.4, there exist unique pairs of integers \( {q}_{1},{r}_{1} \) and \( {q}_{2},{r}_{2} \) such that:\n\n\[ a = {q}_{1}n + {r}_{1} \]\n\n\[ b = {q}_{2}n + {r}_{2} \]\n\nwhere \( {r}_{1},{r}_{2} \in \lbrack 0..n) \) . Subtracting the second equation from the first gives:\n\n\[ a - b = \le... | Yes |
Lemma 8.6.4 (Congruence). If \( a \equiv b\\left( {\\;\\operatorname{mod}\\,n}\\right) \) and \( c \equiv d\\left( {\\;\\operatorname{mod}\\,n}\\right) \), then\n\n\\[ \na + c \equiv b + d\\;\\left( {\\;\\operatorname{mod}\\,n}\\right) \n\\]\n\n(8.7)\n\n\\[ \n{ac} \equiv {bd}\\;\\left( {\\;\\operatorname{mod}\\,n}\\rig... | Proof. Let’s start with 8.7. Since \( a \equiv b\\left( {\\;\\operatorname{mod}\\,n}\\right) \), we have by definition that \( n \\mid \\left( {b - a}\\right) = \\left( {b + c}\\right) - \\left( {a + c}\\right) \), so\n\n\\[ \na + c \equiv b + c\\;\\left( {\\;\\operatorname{mod}\\,n}\\right) .\n\\]\n\nSince \( c \equiv... | Yes |
\[ \operatorname{rem}\left( {i + j, n}\right) = \operatorname{rem}\left( {i, n}\right) + {}_{n}\operatorname{rem}\left( {j, n}\right) \] | Proof. By Corollary 8.6.3, \( i \equiv \operatorname{rem}\left( {i, n}\right) \) and \( j \equiv \operatorname{rem}\left( {j, n}\right) \), so by the Congruence Lemma 8.6.4 \[ i + j \equiv \operatorname{rem}\left( {i, n}\right) + \operatorname{rem}\left( {j, n}\right) \;\left( {\;\operatorname{mod}\;n}\right) . \] By C... | Yes |
Lemma 8.9.1. If \( k \in \lbrack 0..n) \) is relatively prime to \( n \), then \( k \) has an inverse in \( {\mathbb{Z}}_{n} \) . | Proof. If \( k \) is relatively prime to \( n \), then \( \gcd \left( {n, k}\right) = 1 \) by definition of gcd. This means we can use the Pulverizer from section 8.2.2 to find a linear combination of \( n \) and \( k \) equal to 1 :\n\n\[ \n{sn} + {tk} = 1\text{.}\n\]\n\nSo applying the General Principle of Remainder ... | Yes |
Lemma 8.9.2. If \( i \) and \( j \) are both inverses of \( k \) in \( {\mathbb{Z}}_{n} \), then \( i = j \) . | \[ i = i \cdot 1 = i \cdot \left( {k \cdot j}\right) = \left( {i \cdot k}\right) \cdot j = 1 \cdot j = j\left( {\mathbb{Z}}_{n}\right) . \] | Yes |
Lemma 8.10.4. If \( j, k \in {\mathbb{Z}}_{n}^{ * } \), then \( j{ \cdot }_{n}k \in {\mathbb{Z}}_{n}^{ * } \) . | There are lots of easy ways to prove this (see Problem 8.67). | No |
Lemma 8.10.6. If \( k \in {\mathbb{Z}}_{n}^{ * } \) and \( S \subseteq {\mathbb{Z}}_{n} \), then\n\n\[ \left| {kS}\right| = \left| S\right| \text{.} \] | Proof. Since \( k \in {\mathbb{Z}}_{n}^{ * } \), by Theorem 8.9.5 it is cancellable. Therefore,\n\n\[ \left\lbrack {{ks} = {kt}\left( {\mathbb{Z}}_{n}\right) }\right\rbrack \text{ implies }s = t. \]\n\nSo mulitplying by \( k \) in \( {\mathbb{Z}}_{n} \) maps all the elements of \( S \) to distinct elements of \( {kS} \... | Yes |
Corollary 8.10.7. If \( k \in {\mathbb{Z}}_{n}^{ * } \)\n\n\[ k{\mathbb{Z}}_{n}^{ * } = {\mathbb{Z}}_{n}^{ * } \] | Proof. A product of elements in \( {\mathbb{Z}}_{n}^{ * } \) remains in \( {\mathbb{Z}}_{n}^{ * } \) by Lemma 8.10.4. So if \( k \in {\mathbb{Z}}_{n}^{ * } \) , then \( k{\mathbb{Z}}_{n}^{ * } \subseteq {\mathbb{Z}}_{n}^{ * } \) . But by Lemma 8.10.6, \( k{\mathbb{Z}}_{n}^{ * } \) and \( {\mathbb{Z}}_{n}^{ * } \) are t... | Yes |
Lemma 8.10.9.\n\n\\[ \n\\phi \\left( {pq}\\right) = \\left( {p - 1}\\right) \\left( {q - 1}\\right) \n\\]\n\nfor primes \\( p \\neq q \\) . | Proof. Since \\( p \\) and \\( q \\) are prime, any number that is not relatively prime to \\( {pq} \\) must be a multiple of \\( p \\) or a multiple of \\( q \\) . Among the \\( {pq} \\) numbers in \\( \\lbrack 0..{pq}) \\), there are precisely \\( q \\) multiples of \\( p \\) and \\( p \\) multiples of \\( q \\) . Si... | Yes |
(a) If \( p \) is a prime, then \( \phi \left( {p}^{k}\right) = {p}^{k} - {p}^{k - 1} \) for \( k \geq 1 \) . | To prove Theorem 8.10.10.(a), notice that every \( p \) th number among the \( {p}^{k} \) numbers in \( \left\lbrack {0..{p}^{k}}\right) \) is divisible by \( p \), and only these are divisible by \( p \) . So \( 1/p \) of these numbers are divisible by \( p \) and the remaining ones are not. That is,\n\n\[ \phi \left(... | Yes |
For any number \( n \), if \( {p}_{1},{p}_{2},\ldots ,{p}_{j} \) are the (distinct) prime factors of \( n \), then\n\n\[ \phi \left( n\right) = n\left( {1 - \frac{1}{{p}_{1}}}\right) \left( {1 - \frac{1}{{p}_{2}}}\right) \cdots \left( {1 - \frac{1}{{p}_{j}}}\right) . \] | We'll give another proof of Corollary 8.10.11 based on rules for counting in Section 14.9.5. | No |
Problem 8.24. (a) Let \( m = {2}^{9}{5}^{24}{11}^{7}{17}^{12} \) and \( n = {2}^{3}{7}^{22}{11}^{211}{13}^{1}{17}^{9}{19}^{2} \) . What is the \( \gcd \left( {m, n}\right) \) ? What is the least common multiple, \( \operatorname{lcm}\left( {m, n}\right) \), of \( m \) and \( n \) ? Verify that | \[ \gcd \left( {m, n}\right) \cdot \operatorname{lcm}\left( {m, n}\right) = {mn}. \] | No |
Find the remainder of \( {26}^{1818181} \) divided by 297. | Hint: \( {1818181} = \left( {{180} \cdot {10101}}\right) + 1 \) ; use Euler’s theorem. | No |
Let \( {S}_{k} = {1}^{k} + {2}^{k} + \ldots + {\left( p - 1\right) }^{k} \), where \( p \) is an odd prime and \( k \) is a positive multiple of \( p - 1 \) . Use Fermat’s theorem to prove that \( {S}_{k} \equiv - 1\left( {\;\operatorname{mod}\;p}\right) \) . | ## Problem 8.60.\n\n(a) Prove that\n\n\[ \n{k}^{m} = 1\left( {\mathbb{Z}}_{n}\right) \text{ IMPLIES }\operatorname{ord}\left( {k, n}\right) \mid m.\n\]\n\nHint: Take the remainder of \( m \) divided by the order. Reminder: The order of \( k \in {\mathbb{Z}}_{n} \) is the smallest positive \( m \) such that \( {k}^{m} =... | No |
Prove that \( {x}^{2} \equiv {y}^{2}\left( {\;\operatorname{mod}\;p}\right) \) if and only if \( x \equiv y\left( {\;\operatorname{mod}\;p}\right) \) or \( x \equiv - y \) \( \left( {\;\operatorname{mod}\;p}\right) \). | Hint: \( {x}^{2} - {y}^{2} = \left( {x + y}\right) \left( {x - y}\right) \) | No |
Suppose \( a, b \) are relatively prime integers greater than 1 . In this problem you will prove that Euler's function is multiplicative, that is, that\n\n\[ \phi \left( {ab}\right) = \phi \left( a\right) \phi \left( b\right) . \] | The proof is an easy consequence of the Chinese Remainder Theorem (Problem 8.58). (a) Conclude from the Chinese Remainder Theorem that the function \( f : \lbrack 0..{ab}) \rightarrow \) \( \lbrack 0..a) \times \lbrack 0..b) \) defined by\n\n\[ f\left( x\right) : \mathrel{\text{:=}} \left( {\operatorname{rem}\left( {x,... | Yes |
Problem 8.71. (a) Calculate the remainder of \( {35}^{86} \) divided by 29 . | (b) Part (a) implies that the remainder of \( {35}^{86} \) divided by 29 is not equal to 1 . So there there must be a mistake in the following proof, where all the congruences are taken with modulus 29:\n\n\[ \n1 ≢ {35}^{86} \n\] \n\n(8.47) \n\n\[ \n\equiv {6}^{86}\;\left( {\text{since}\;{35} \equiv 6\;\left( {\operato... | No |
Lemma 9.1.2.\n\n\\[ \n\\mathop{\\sum }\\limits_{{v \\in V\\left( G\\right) }}\\operatorname{indeg}\\left( v\\right) = \\mathop{\\sum }\\limits_{{v \\in V\\left( G\\right) }}\\operatorname{outdeg}\\left( v\\right) .\n\\] | Proof. Both sums are equal to \\( \\left| {E\\left( G\\right) }\\right| \\) . | Yes |
Theorem 9.2.3. The shortest walk from one vertex to another is a path. | Proof. If there is a walk from vertex \( u \) to another vertex \( v \neq u \), then by the Well Ordering Principle, there must be a minimum length walk \( \mathbf{w} \) from \( u \) to \( v \) . We claim \( \mathbf{w} \) is a path.\n\nTo prove the claim, suppose to the contrary that \( \mathbf{w} \) is not a path, mea... | Yes |
Lemma 9.2.5. [The Triangle Inequality]\n\n\[ \operatorname{dist}\left( {u, v}\right) \leq \operatorname{dist}\left( {u, x}\right) + \operatorname{dist}\left( {x, v}\right) \]\n\nfor all vertices \( u, v, x \) with equality holding iff \( x \) is on a shortest path from \( u \) to \( v \) . | Proof. To prove the inequality, suppose \( \mathbf{f} \) is a shortest path from \( u \) to \( x \) and \( \mathbf{r} \) is a shortest path from \( x \) to \( v \) . Then by Lemma 9.2.2, \( \mathbf{f}\widehat{x}\mathbf{r} \) is a walk of length dist \( \left( {u, x}\right) + \operatorname{dist}\left( {x, v}\right) \) f... | Yes |
Lemma 9.2.6. The shortest positive length closed walk through a vertex is a cycle through that vertex. | The proof of Lemma 9.2.6 is essentially the same as for Theorem 9.2.3; see Problem 9.7. | No |
Corollary 9.3.3. The length-k counting matrix of a digraph, \( G \), is \( {\left( {A}_{G}\right) }^{k} \), for all \( k \in \mathbb{N} \) . | In other words, you can determine the number of length \( k \) walks between any pair of vertices simply by computing the \( k \) th power of the adjacency matrix! That may seem amazing, but the proof uncovers this simple relationship between matrix multiplication and numbers of walks.\n\nProof of Theorem 9.3.2. Any le... | Yes |
Corollary 9.5.11. In a DAG, \( D \), if the size of the largest chain is \( t \), then \( V\left( D\right) \) can be partitioned into \( t \) antichains. | Proof. Let the antichains be the sets \( {A}_{k} : \mathrel{\text{:=}} \{ a \in V\left( D\right) \mid \operatorname{depth}\left( a\right) = k\} \) . It is an easy exercise to verify that each \( {A}_{k} \) is an antichain (Problem 9.19). | No |
Lemma 9.5.12 (Dilworth). For all \( t > 0 \), every DAG with \( n \) vertices must have either a chain of size greater than \( t \) or an antichain of size at least \( n/t \) . | Proof. Assume that there is no chain of size greater than \( t \) . Let \( \ell \) be the size of the largest antichain. If we make a parallel schedule according to the proof of Corollary 9.5.11, we create a number of antichains equal to the size of the largest chain, which is less than or equal \( t \) . Each element ... | Yes |
Corollary 9.5.13. Every DAG with \( n \) vertices has a chain of size greater than \( \sqrt{n} \) or an antichain of size at least \( \sqrt{n} \) . | Proof. Set \( t = \sqrt{n} \) in Lemma 9.5.12. | No |
Example 9.5.14. When the man in our example is getting dressed, \( n = {10} \) . | Try \( t = 3 \) . There is a chain of size 4 . Try \( t = 4 \) . There is no chain of size 5, but there is an antichain of size \( 4 \geq {10}/4 \) . | No |
Example 9.9.2. Define a relation, \( Y \), on age-height pairs of being younger and shorter. This is the relation on the set of pairs \( \left( {y, h}\right) \) where \( y \) is a nonnegative integer \( \leq {2400} \) that we interpret as an age in months, and \( h \) is a nonnegative integer \( \leq {120} \) describin... | Since both ages and heights are ordered numerically, the age-height relation \( Y \) is a partial order. Now suppose we have a class of 101 students. Then we can apply Dilworth's lemma 9.5.12 to conclude that there is a chain of 11 students-that is, 11 students who get taller as they get older-or an antichain of 11 stu... | No |
Claim. For any finite digraph, \( G \) , \n\n\[ \n\mathop{\sum }\limits_{{v \in V\left( G\right) }}\operatorname{indeg}\left( v\right) = \left| {\operatorname{graph}\left( G\right) }\right| \n\] | But this Claim might not be obvious to everyone. So prove it by induction on the number, \( \left| {\operatorname{graph}\left( G\right) }\right| \), of arrows. | No |
This problem asks for a proof of Lemma 9.7.2 showing that every weak partial order can be represented by (is isomorphic to) a collection of sets partially ordered under set inclusion \( \\left( \\subseteq \\right) \) . Namely,\n\nLemma. Let \( \\preccurlyeq \) be a weak partial order on a set, \( A \) . For any element... | (a) Prove that the function \( \\mathrm{L}\\left( \\right) : A \\rightarrow \\mathcal{L} \) is a bijection.\n\n(b) Complete the proof by showing that\n\n\[ \na \\preccurlyeq b\\;\\text{ iff }\\;\\mathrm{L}\\left( a\\right) \\subseteq \\mathrm{L}\\left( b\\right)\n\]\n\n(9.14)\n\nfor all \( a, b \\in A \) . | No |
Prove Theorem 9.10.4: The equivalence classes of an equivalence relation form a partition of the domain. | Namely, let \( R \) be an equivalence relation on a set, \( A \), and define the equivalence class of an element \( a \in A \) to be\n\n\[ \n{\left\lbrack a\right\rbrack }_{R} : \mathrel{\text{:=}} \{ b \in A \mid {aRb}\} .\n\]\n\nThat is, \( {\left\lbrack a\right\rbrack }_{R} = R\left( a\right) \).\n\n(a) Prove that e... | No |
Theorem 10.7.1. The congestion of an \( N \) -input array is 2. | Proof. First, we show that the congestion is at most 2 . Let \( \pi \) be any permutation. Define a solution, \( P \), for \( \pi \) to be the set of paths, \( {P}_{i} \), where \( {P}_{i} \) goes to the right from input \( i \) to column \( \pi \left( i\right) \) and then goes down to output \( \pi \left( i\right) \) ... | Yes |
Lemma 10.9.2. Prove that if the edges of a graph can be grouped into two sets such that every vertex has at most 1 edge from each set incident to it, then the graph is 2-colorable. | Proof. It is not hard to show that a graph is 2-colorable iff every cycle in it has even length (see Theorem 11.9.3). We'll take this for granted here.\n\nSo all we have to do is show that every cycle has even length. Since the two sets of edges may overlap, let's call an edge that is in both sets a doubled edge.\n\nTh... | Yes |
Lemma 11.2.1. The sum of the degrees of the vertices in a graph equals twice the number of edges. | Proof. Every edge contributes two to the sum of the degrees, one for each of its endpoints. | Yes |
Theorem 11.5.2. A matching for a set \( M \) of men with a set \( W \) of women can be found if and only if the matching condition holds. | Proof. First, let's suppose that a matching exists and show that the matching condition holds. For any subset of men, each man likes at least the woman he is matched with and a woman is matched with at most one man. Therefore, every subset of men likes at least as large a set of women. Thus, the matching condition hold... | Yes |
Theorem 11.5.6. If \( G \) is a degree-constrained bipartite graph, then there is a matching that covers \( L\left( G\right) \) . | Proof. We will show that \( G \) satisfies Hall’s condition, namely, if \( S \) is an arbitrary subset of \( L\left( G\right) \), then\n\n\[ \left| {\mathrm{N}\left( S\right) }\right| \geq \left| S\right| \]\n\n(11.2)\n\nSince \( G \) is degree-constrained, there is a \( d > 0 \) such that \( \deg \left( l\right) \geq ... | Yes |
Theorem 11.5.8. Every regular bipartite graph has a perfect matching. | Proof. Let \( G \) be a regular bipartite graph. Since regular graphs are degree-constrained, we know by Theorem 11.5.6 that there must be a matching in \( G \) that covers \( L\left( G\right) \) . Such a matching is only possible when \( \left| {L\left( G\right) }\right| \leq \left| {R\left( G\right) }\right| \) . But... | Yes |
Lemma 11.6.3. \( P \) is a preserved invariant for The Mating Ritual. | Proof. Woman \( w \) gets crossed off \( m \) ’s list only when \( w \) has a suitor she prefers to \( m \) . Thereafter, her favorite suitor doesn’t change until one she likes better comes along. So if her favorite suitor was preferable to \( m \), then any new favorite suitor will be as well.\n\nNotice that the invar... | Yes |
Theorem 11.6.4. Everyone is married at the end of the Mating Ritual. | Proof. Assume to the contrary that on the last day of the Mating Ritual, some man-call him Bob-is not married. This means Bob can't be serenading anybody, that is, his list must be empty. So every woman must have been crossed off his list and, since \( P \) is true, every woman has a suitor whom she prefers to Bob. In ... | Yes |
Lemma 11.6.8. \( Q \) is a preserved invariant for The Mating Ritual. | Proof. Suppose \( Q \) holds at some point in the Ritual and some woman, Alice, is about to be crossed off some man's, Bob's, list. We claim that Alice must not be feasible for Bob. Therefore \( Q \) will still hold after Alice is crossed off, proving that \( Q \) is invariant.\n\nTo verify the claim, notice that when ... | Yes |
Theorem 11.6.10. The Mating Ritual marries every man to his optimal spouse and every woman to her pessimal spouse. | Proof. If Bob is married to Alice on the final day of the Ritual, then everyone above Alice on Bob’s preference list was crossed off, and by property \( Q \), all these crossed off women were infeasible for Bob. So Alice is Bob's highest ranked feasible spouse, that is, his optimal spouse.\n\nFurther, since Bob likes A... | Yes |
Theorem 11.7.3. A graph with maximum degree at most \( k \) is \( \left( {k + 1}\right) \) -colorable. | Proof of Theorem 11.7.3. We use induction on the number of vertices in the graph, which we denote by \( n \) . Let \( P\left( n\right) \) be the proposition that an \( n \) -vertex graph with maximum degree at most \( k \) is \( \left( {k + 1}\right) \) -colorable.\n\nBase case \( \left( {n = 1}\right) \) : A 1-vertex ... | Yes |
Theorem 11.9.3. The following graph properties are equivalent:\n\n1. The graph contains an odd length cycle.\n\n2. The graph is not 2-colorable.\n\n3. The graph contains an odd length closed walk.\n\nIn other words, if a graph has any one of the three properties above, then it has all of the properties. | We will show the following implications among these properties:\n\n1. IMPLIES 2. IMPLIES 3. IMPLIES 1.\n\nSo each of these properties implies the other two, which means they all are equivalent.\n\n1 IMPLIES 2 Proof. This follows from equation 11.3.\n\n2 IMPLIES 3 If we prove this implication for connected graphs, then ... | Yes |
Theorem 11.9.7. Every graph, \( G \), has at least \( \left| {V\left( G\right) }\right| - \left| {E\left( G\right) }\right| \) connected components. | Proof. We use induction on the number, \( k \), of edges. Let \( P\left( k\right) \) be the proposition that\nevery graph, \( G \), with \( k \) edges has at least \( \left| {V\left( G\right) }\right| - k \) connected components.\n\nBase case \( \left( {k = 0}\right) \) : In a graph with 0 edges, each vertex is itself ... | Yes |
Lemma 11.10.4. A graph \( G \) is a tree iff \( G \) is a forest and \( \left| {V\left( G\right) }\right| = \left| {E\left( G\right) }\right| + 1 \) . | The proof is an easy consequence of Theorem 11.9.7.6 (Problem 11.55). | No |
Corollary 11.10.12. If all edges in a weighted graph have distinct weights, then the graph has a unique MST. | The proof of Corollary 11.10.12 is left to Problem 11.70. | No |
Problem 11.7. (a) For any vertex, \( v \), in a graph, let \( \mathrm{N}\left( v\right) \) be the set of neighbors of \( v \), namely, the vertices adjacent to \( v \) :\n\n\[ \mathrm{N}\left( v\right) : \mathrel{\text{:=}} \{ u \mid \langle u - v\rangle \text{ is an edge of the graph }\} .\n\]\n\nSuppose \( f \) is an... | Hint: Prove by a chain of iff's that\n\n\[ h \in \mathrm{N}\left( {f\left( v\right) }\right) \;\text{ iff }\;h \in f\left( {\mathrm{\;N}\left( v\right) }\right) \]\n\nfor every \( h \in {V}_{H} \) . Use the fact that \( h = f\left( u\right) \) for some \( u \in {V}_{G} \) . | No |
Prove that if \( G \) is a balanced graph, then the edges of \( G \) can be partitioned into blocks such that each block is a perfect matching. | For example, if \( G \) is a balanced graph with \( {2k} \) vertices each of degree \( j \), then the edges of \( G \) can be partitioned into \( j \) blocks, where each block consists of \( k \) edges, each of which is a perfect matching. That is, two edges in the same block are never incident to the same vertex. | No |
Prove that in a stable set of marriages, every man is the pessimal husband of his optimal wife. | Hint: Follows directly from the definition of \ | No |
Suppose there are two stable sets of marriages. So each man has a first wife and a second wife , and likewise each woman has a first husband and a second husband.\n\nSomeone in a given marriage is a winner when they prefer their current spouse to their other spouse, and they are a loser when they prefer their other spo... | (a) The left to right direction of (11.6) is equivalent to the assertion that married partners cannot both be winners. Explain why this follows directly from the definition of rogue couple.\n\nThe right to left direction of (11.6) is equivalent to the assertion that a married couple cannot both be losers. This will fol... | No |
A simple graph \( G \) is 2-removable iff it contains two vertices \( v \neq w \) such that \( G - v \) is connected, and \( G - w \) is also connected. Prove that every connected graph with at least two vertices is 2-removable. | Hint: Consider a maximum length path. | No |
Two recitations can not be held in the same 90-minute time slot if some staff member is assigned to both recitations. The problem is to determine the minimum number of time slots required to complete all the recitations. | (a) Recast this problem as a question about coloring the vertices of a particular graph. Draw the graph and explain what the vertices, edges, and colors represent.\n\n(b) Show a coloring of this graph using the fewest possible colors. What schedule of recitations does this imply? | No |
False Claim. Let \( G \) be a graph whose vertex degrees are all \( \leq k \) . If \( G \) has a vertex of degree strictly less than \( k \), then \( G \) is \( k \) -colorable. | Bogus proof. Proof by induction on the number \( n \) of vertices:\n\nThe induction hypothesis, \( P\left( n\right) \) is:\n\nLet \( G \) be an \( n \) -vertex graph whose vertex degrees are all \( \leq k \) . If \( G \) also has a vertex of degree strictly less than \( k \), then \( G \) is \( k \) -colorable.\n\nBase... | Yes |
Problem 11.47. (a) Prove that \( {K}_{n} \) is \( \left( {n - 1}\right) \) -edge connected for \( n > 1 \) . | Let \( {M}_{n} \) be a graph defined as follows: begin by taking \( n \) graphs with nonoverlapping sets of vertices, where each of the \( n \) graphs is \( \left( {n - 1}\right) \) -edge connected (they could be disjoint copies of \( {K}_{n} \), for example). These will be subgraphs of \( {M}_{n} \) . Then pick \( n \... | No |
False Claim. If every vertex in a graph has positive degree, then the graph is connected. | (a) Prove that this Claim is indeed false by providing a counterexample.\n\n(b) Since the Claim is false, there must be a logical mistake in the following bogus proof. Pinpoint the first logical mistake (unjustified step) in the proof.\n\nBogus proof. We prove the Claim above by induction. Let \( P\left( n\right) \) be... | Yes |
In the cycle \( {C}_{2n} \) of length \( {2n} \), we’ll call two vertices opposite if they are on opposite sides of the cycle, that is that are distance \( n \) apart in \( {C}_{n} \) . Let \( G \) be the graph formed from \( {C}_{2n} \) by adding an edge, which we’ll call a crossing edge, between each pair of opposite... | Hint: Argue that a shortest path between two vertices in \( G \) uses at most one crossing edge. | No |
A simple graph, \( G \), is said to have width 1 iff there is a way to list all its vertices so that each vertex is adjacent to at most one vertex that appears earlier in the list. All the graphs mentioned below are assumed to be finite.\n\n(a) Prove that every graph with width one is a forest. | Hint: By induction, removing the last vertex. | No |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.