Skip to content

Commit 25ba462

Browse files
committed
fix typo in In-class 5, 1.5(e)
- Fixes [this](#4)
1 parent c4dcef5 commit 25ba462

File tree

2 files changed

+89
-89
lines changed

2 files changed

+89
-89
lines changed
-23.3 KB
Binary file not shown.
Lines changed: 89 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
\documentclass[14pt]{extarticle}
1+
\documentclass[14pt]{extarticle}
22
\usepackage{amsmath,mathtools,amsfonts,amsthm,amssymb,hyperref}
33
\usepackage{wasysym,geometry,bussproofs,latexsym,parskip,bookmark}
44
\usepackage{mathtools}
@@ -7,7 +7,7 @@
77
\newtheorem{claim}{Claim}
88
\newtheorem{lemma}{Lemma}
99
\hypersetup{colorlinks,allcolors=blue,linktoc=all}
10-
\geometry{a4paper}
10+
\geometry{a4paper}
1111
\geometry{margin=0.5in}
1212
\title{Math for CS 2015/2019 solutions to ``In-Class Problems Week 3, Tue. (Session 5)''}
1313
\author{https://github.com/spamegg1}
@@ -19,45 +19,45 @@ \section{Problem 1}
1919
For each of the logical formulas, indicate whether or not it is true when the domain of discourse is $\mathbb{N}$ (the nonnegative integers $0, 1, 2, \ldots$), $\mathbb{Z}$ (the integers), $\mathbb{Q}$ (the rationals), $\mathbb{R}$ (the real numbers), and $\mathbb{C}$ (the complex numbers). Add a brief explanation to the few cases that merit one.
2020

2121
\subsection{(a)}
22-
$\exists x(x^2 = 2)$
22+
$\exists x(x^2 = 2)$
2323
\begin{proof}
24-
Not true in $\mathbb{N}$, $\mathbb{Z}$ or in $\mathbb{Q}$ because $\sqrt{2}$ is irrational.
24+
Not true in $\mathbb{N}$, $\mathbb{Z}$ or in $\mathbb{Q}$ because $\sqrt{2}$ is irrational.
2525

26-
True in $\mathbb{R}$ and $\mathbb{C}$ because $\sqrt{2} \in \mathbb{R}$ and $\mathbb{R}$ is a subset of $\mathbb{C}$.
26+
True in $\mathbb{R}$ and $\mathbb{C}$ because $\sqrt{2} \in \mathbb{R}$ and $\mathbb{R}$ is a subset of $\mathbb{C}$.
2727
\end{proof}
2828

2929
\subsection{(b)}
3030
$\forall x \exists y (x^2 = y)$
3131
\begin{proof}
32-
True in all 5 domains. Basically it states that ``this domain is closed under the operation of taking the square of a number.'' The square of a nonnegative integer is a nonnegative integer, the square of an integer is an integer, the square of a rational number is a rational number... and so on.
32+
True in all 5 domains. Basically it states that ``this domain is closed under the operation of taking the square of a number.'' The square of a nonnegative integer is a nonnegative integer, the square of an integer is an integer, the square of a rational number is a rational number... and so on.
3333
\end{proof}
3434

3535
\subsection{(c)}
3636
$\forall y \exists x (x^2 = y)$
3737
\begin{proof}
38-
This one states the existence of square roots for all numbers in the domain. Only true in $\mathbb{C}$ and false in the other 4 domains.
38+
This one states the existence of square roots for all numbers in the domain. Only true in $\mathbb{C}$ and false in the other 4 domains.
3939

40-
For $\mathbb{N}$, $\mathbb{Z}$ and $\mathbb{Q}$, let $y = 2$ which is a member of all 3 domains, but $x = \pm \sqrt{2}$ are not members of any of the 3 domains.
40+
For $\mathbb{N}$, $\mathbb{Z}$ and $\mathbb{Q}$, let $y = 2$ which is a member of all 3 domains, but $x = \pm \sqrt{2}$ are not members of any of the 3 domains.
4141

42-
For $\mathbb{R}$, let $y = -1$ which does not have a real square root.
42+
For $\mathbb{R}$, let $y = -1$ which does not have a real square root.
4343
\end{proof}
4444

4545
\subsection{(d)}
4646
$\forall x \neq 0 \,\,\exists y (xy = 1) $
4747
\begin{proof}
48-
This means that every nonzero member of the domain has a multiplicative inverse.
48+
This means that every nonzero member of the domain has a multiplicative inverse.
4949

50-
True in $\mathbb{Q}$, $\mathbb{R}$ and $\mathbb{C}$: for all $x$ in one of these domains, $y = 1/x$ also exists in that domain.
50+
True in $\mathbb{Q}$, $\mathbb{R}$ and $\mathbb{C}$: for all $x$ in one of these domains, $y = 1/x$ also exists in that domain.
5151

52-
But false in $\mathbb{N}$ and $\mathbb{Z}$: let $x = 2$ which is a member of these two domains, but $y = 1/2$ is not in these two domains.
52+
But false in $\mathbb{N}$ and $\mathbb{Z}$: let $x = 2$ which is a member of these two domains, but $y = 1/2$ is not in these two domains.
5353
\end{proof}
5454

5555
\subsection{(e)}
5656
$\exists x \exists y (x + 2y = 2 \text{ AND } 2x + 4y = 5)$
5757
\begin{proof}
58-
False in all 5 domains.
58+
False in all 5 domains.
5959

60-
This is a system of linear equations. If we multiply the second equation by 2 we get $2x + 4y = 4$. So $2x + 4y$ has to be simultaneously equal to 4 and equal to 5, which is impossible. So there exist no such $x, y$ in {\it any domain}.
60+
This is a system of linear equations. If we multiply the first equation by 2 we get $2x + 4y = 4$. So $2x + 4y$ has to be simultaneously equal to 4 and equal to 5, which is impossible. So there exist no such $x, y$ in {\it any domain}.
6161
\end{proof}
6262

6363
\section{Problem 2}
@@ -67,59 +67,59 @@ \section{Problem 2}
6767

6868
Here are some examples of formulas and their English translations. Names for these predicates are listed in the third column so that you can reuse them in your solutions (as we do in the definition of the predicate NO-1s below).
6969
$$
70-
\begin{array}{|l|c|l|}
71-
\text{Meaning} & \text{Formula} & \text{Name}\\
72-
\hline
73-
x \text{ is a prefix of } y & \exists z(xz = y) & \text{PREFIX}(x, y)\\
74-
x \text{ is a substring of } y & \exists u \exists v(uxv = y) & \text{SUBSTRING}(x, y)\\
75-
x \text{ is empty or a string of } 0 \text{s} & \text{NOT(SUBSTRING}(1,x)) & \text{NO-1s}(x)
76-
\end{array}
70+
\begin{array}{|l|c|l|}
71+
\text{Meaning} & \text{Formula} & \text{Name} \\
72+
\hline
73+
x \text{ is a prefix of } y & \exists z(xz = y) & \text{PREFIX}(x, y) \\
74+
x \text{ is a substring of } y & \exists u \exists v(uxv = y) & \text{SUBSTRING}(x, y) \\
75+
x \text{ is empty or a string of } 0 \text{s} & \text{NOT(SUBSTRING}(1,x)) & \text{NO-1s}(x)
76+
\end{array}
7777
$$
7878

7979
\subsection{(a)}
8080
$x$ consists of three copies of some string.
8181
\begin{proof}
82-
$\exists u (uuu = x)$
82+
$\exists u (uuu = x)$
8383
\end{proof}
8484

8585
\subsection{(b)}
8686
$x$ is an even-length string of 0’s.
8787
\begin{proof}
88-
NO-1s$(x)$ AND $\exists y (yy = x)$
88+
NO-1s$(x)$ AND $\exists y (yy = x)$
8989
\end{proof}
9090

9191
\subsection{(c)}
9292
$x$ does not contain both a 0 and a 1.
9393
\begin{proof}
94-
NOT(SUBSTRING$(0,x)$ AND SUBSTRING$(1, x)$)
94+
NOT(SUBSTRING$(0,x)$ AND SUBSTRING$(1, x)$)
9595
\end{proof}
9696

9797
\subsection{(d)}
9898
$x$ is the binary representation of $2^k + 1$ for some integer $k \geq 0$.
9999
\begin{proof}
100-
$x = 10 \text{ OR }\exists y ((1y1 = x)$ AND NO-1s$(y)$)
100+
$x = 10 \text{ OR }\exists y ((1y1 = x)$ AND NO-1s$(y)$)
101101
\end{proof}
102102

103103
\subsection{(e)}
104104
An elegant, slightly trickier way to define NO-1s$(x)$ is:
105105

106106
\begin{center}
107-
PREFIX$(x, 0x)$ (*)
107+
PREFIX$(x, 0x)$ (*)
108108
\end{center}
109109

110110
Explain why (*) is true only when $x$ is a string of 0’s.
111111
\begin{proof}
112-
First we need to argue that when $x$ contains no 1s, then (*) is true. Indeed, assume $x$ is a string consisting of $n$ 0s. Then $0x$ is a string consisting of $n+1$ 0s. So $x$ is a prefix of $0x$.
113-
114-
Now we need to argue that if $x$ contains a 1, then (*) is false. Assume that $x$ contains a 1. Let $n$ be the first digit from the left where a 1 occurs in $x$. In other words, from the left to the right, $x$ starts out with $n - 1$ 0s, followed by a 1, followed by other digits:
115-
$$
116-
x = 00 \ldots 001 \ldots \text{ (the 1 occurs at the $n$th place)}
117-
$$
118-
Now the string $0x$ starts with $n$ 0s, followed by a 1:
119-
$$
120-
0x = 000 \ldots 001 \ldots \text{ (the 1 occurs at the $n+1$st place)}
121-
$$
122-
Therefore $x$ cannot be a prefix of $0x$, otherwise $0x$ would have a 1 in the $n$th place, which it does not.
112+
First we need to argue that when $x$ contains no 1s, then (*) is true. Indeed, assume $x$ is a string consisting of $n$ 0s. Then $0x$ is a string consisting of $n+1$ 0s. So $x$ is a prefix of $0x$.
113+
114+
Now we need to argue that if $x$ contains a 1, then (*) is false. Assume that $x$ contains a 1. Let $n$ be the first digit from the left where a 1 occurs in $x$. In other words, from the left to the right, $x$ starts out with $n - 1$ 0s, followed by a 1, followed by other digits:
115+
$$
116+
x = 00 \ldots 001 \ldots \text{ (the 1 occurs at the $n$th place)}
117+
$$
118+
Now the string $0x$ starts with $n$ 0s, followed by a 1:
119+
$$
120+
0x = 000 \ldots 001 \ldots \text{ (the 1 occurs at the $n+1$st place)}
121+
$$
122+
Therefore $x$ cannot be a prefix of $0x$, otherwise $0x$ would have a 1 in the $n$th place, which it does not.
123123
\end{proof}
124124

125125
\section{Problem 3}
@@ -129,31 +129,31 @@ \section{Problem 3}
129129

130130
The domain of discourse should be the set of students in the class; in addition, the only predicates that you may use are: equality, and $E(x, y)$ meaning that “$x$ has sent e-mail to $y$.”
131131
\begin{proof}
132-
``Besides possibly himself'' means that the student might or might not have emailed himself.
132+
``Besides possibly himself'' means that the student might or might not have emailed himself.
133133

134-
``At most two other'' means that the student might have emailed 0, 1 or 2 other people.
134+
``At most two other'' means that the student might have emailed 0, 1 or 2 other people.
135135

136-
So there are 6 possibilities. Using $\wedge$ for AND, $\vee$ for OR, $\neg$ for NOT, $\leftrightarrow$ for IFF:
136+
So there are 6 possibilities. Using $\wedge$ for AND, $\vee$ for OR, $\neg$ for NOT, $\leftrightarrow$ for IFF:
137137

138-
Student emailed nobody: $\exists s \forall z (\neg E(s,z))$,
138+
Student emailed nobody: $\exists s \forall z (\neg E(s,z))$,
139139

140-
Student emailed himself only: $\exists s \forall z (E(s,z) \leftrightarrow z = s)$,
140+
Student emailed himself only: $\exists s \forall z (E(s,z) \leftrightarrow z = s)$,
141141

142-
Student emailed one other person only: $\exists s \exists x (\neg(x = s) \wedge \forall z (E(s,z) \leftrightarrow z = x))$
142+
Student emailed one other person only: $\exists s \exists x (\neg(x = s) \wedge \forall z (E(s,z) \leftrightarrow z = x))$
143143

144-
Student emailed himself and one other person only:
144+
Student emailed himself and one other person only:
145145

146-
$\exists s \exists x (\neg(x = s) \wedge \forall z (E(s,z) \leftrightarrow z = x \vee z = s))$
146+
$\exists s \exists x (\neg(x = s) \wedge \forall z (E(s,z) \leftrightarrow z = x \vee z = s))$
147147

148-
Student emailed two other persons only:
148+
Student emailed two other persons only:
149149

150-
$\exists s \exists x \exists y (\neg(x = s) \wedge \neg(y = s) \wedge \neg(x = y) \wedge \forall z (E(s,z) \leftrightarrow z = x \vee z = y))$
150+
$\exists s \exists x \exists y (\neg(x = s) \wedge \neg(y = s) \wedge \neg(x = y) \wedge \forall z (E(s,z) \leftrightarrow z = x \vee z = y))$
151151

152-
Student emailed himself and two other persons only:
152+
Student emailed himself and two other persons only:
153153

154-
$\exists s \exists x \exists y (\neg(x = s) \wedge \neg(y = s) \wedge \neg(x = y) \wedge \forall z (E(s,z) \leftrightarrow z = x \vee z = y \vee z = s))$
154+
$\exists s \exists x \exists y (\neg(x = s) \wedge \neg(y = s) \wedge \neg(x = y) \wedge \forall z (E(s,z) \leftrightarrow z = x \vee z = y \vee z = s))$
155155

156-
So we can join these formulas with OR's between them to get the desired formula.
156+
So we can join these formulas with OR's between them to get the desired formula.
157157
\end{proof}
158158

159159
\section{Problem 4}
@@ -162,113 +162,113 @@ \section{Problem 4}
162162
\subsection{(a)}
163163
$\forall x \exists y P(x, y)$ IMPLIES $\exists y \forall x P(x, y)$
164164
\begin{proof}
165-
Define the domain to be the integers $\mathbb{Z}$. Define the predicate $P$ to mean: $P(x, y)$ iff $x < y$.
165+
Define the domain to be the integers $\mathbb{Z}$. Define the predicate $P$ to mean: $P(x, y)$ iff $x < y$.
166166

167-
Notice that $\forall x \exists y P(x, y)$ is true. For every integer $x$, there is another integer $y$ that is strictly bigger than $x$ (just take $y = x+1$).
167+
Notice that $\forall x \exists y P(x, y)$ is true. For every integer $x$, there is another integer $y$ that is strictly bigger than $x$ (just take $y = x+1$).
168168

169-
However the converse $\exists y \forall x P(x, y)$ is false, because it states that there exists one specific integer $y$ that's bigger than all other integers.
169+
However the converse $\exists y \forall x P(x, y)$ is false, because it states that there exists one specific integer $y$ that's bigger than all other integers.
170170
\end{proof}
171171

172172
\subsection{(b)}
173173
$\exists y \forall x P(x, y)$ IMPLIES $\forall x \exists y P(x, y)$
174174
\begin{proof}
175-
This implication is valid, let's prove it.
175+
This implication is valid, let's prove it.
176176

177-
1. Assume $\exists y \forall x P(x, y)$ is true.
177+
1. Assume $\exists y \forall x P(x, y)$ is true.
178178

179-
2. Want to prove: $\forall x \exists y P(x, y)$.
179+
2. Want to prove: $\forall x \exists y P(x, y)$.
180180

181-
3. To prove (2), assume $x_0$ is an arbitrarily chosed but fixed element in the domain. We want to show $\exists y P(x_0, y)$.
181+
3. To prove (2), assume $x_0$ is an arbitrarily chosed but fixed element in the domain. We want to show $\exists y P(x_0, y)$.
182182

183-
4. By (1) there exists a fixed element $y_0$ in the domain such that $\forall x P(x, y_0)$ is true.
183+
4. By (1) there exists a fixed element $y_0$ in the domain such that $\forall x P(x, y_0)$ is true.
184184

185-
5. By (4) $P(x_0, y_0)$ is true.
185+
5. By (4) $P(x_0, y_0)$ is true.
186186

187-
6. By (5) $\exists y P(x_0, y)$ is true.
187+
6. By (5) $\exists y P(x_0, y)$ is true.
188188

189-
7. Since $x_0$ was arbitrarily chosen, by (6) we have $\forall x \exists y P(x, y)$ is true.
189+
7. Since $x_0$ was arbitrarily chosen, by (6) we have $\forall x \exists y P(x, y)$ is true.
190190
\end{proof}
191191

192192
\section{Problem 5 (Supplemental Problem)}
193193
A certain cabal within the Math for Computer Science course staff is plotting to make the final exam ridiculously hard. (“Problem 1. Prove the Poincare Conjecture starting from the axioms of ZFC. Express your answer in khipu—the knot language of the Incas.”) The only way to stop their evil plan is to determine exactly who is in the cabal. The course staff consists of seven people:
194194

195195
\begin{center}
196-
$\{$Adam, Tom, Albert, Annie, Ben, Elizabeth, Siggig$\}$
196+
$\{$Adam, Tom, Albert, Annie, Ben, Elizabeth, Siggig$\}$
197197
\end{center}
198198

199199
The cabal is a subset of these seven. A membership roster has been found and appears below, but it is deviously encrypted in logic notation. The predicate cabal indicates who is in the cabal; that is, cabal$(x)$ is true if and only if $x$ is a member. Translate each statement below into English and deduce who is in the cabal.
200200

201201
\subsection{(a)}
202202
$\exists x \exists y \exists z(x \neq y$ AND $x \neq z$ AND $y \neq z$ AND cabal$(x)$ AND cabal$(y)$ AND cabal$(z))$
203203
\begin{proof}
204-
There are (at least) 3 different people, who are all members of the cabal.
204+
There are (at least) 3 different people, who are all members of the cabal.
205205
\end{proof}
206206
\subsection{(b)}
207207
NOT(cabal(Siggi) AND cabal(Annie))
208208
\begin{proof}
209-
Siggi and Annie are not both in the cabal.
209+
Siggi and Annie are not both in the cabal.
210210
\end{proof}
211211
\subsection{(c)}
212212
cabal(Elizabeth) IMPLIES $\forall x$ cabal$(x)$
213213
\begin{proof}
214-
If Elizabeth is in the cabal, then so is everyone else (all 7).
214+
If Elizabeth is in the cabal, then so is everyone else (all 7).
215215
\end{proof}
216216
\subsection{(d)}
217217
cabal(Annie) IMPLIES cabal(Siggi)
218218
\begin{proof}
219-
If Annie is in the cabal, then so is Siggi.
219+
If Annie is in the cabal, then so is Siggi.
220220
\end{proof}
221221
\subsection{(e)}
222222
(cabal(Ben) OR cabal(Albert)) IMPLIES NOT(cabal(Tom))
223223
\begin{proof}
224-
If either Ben or Albert is in the cabal, then Tom isn't.
224+
If either Ben or Albert is in the cabal, then Tom isn't.
225225
\end{proof}
226226
\subsection{(f)}
227227
(cabal(Ben) OR cabal(Siggi)) IMPLIES NOT(cabal(Adam))
228228
\begin{proof}
229-
If either Ben or Siggi is in the cabal, then Adam isn't.
229+
If either Ben or Siggi is in the cabal, then Adam isn't.
230230
\end{proof}
231231
\subsection{(g)}
232232
Now use these facts to explain exactly who is on the cabal and why.
233233
\begin{proof}
234-
1. By (b), we know that there is at least 1 person in the domain who is NOT in the cabal.
234+
1. By (b), we know that there is at least 1 person in the domain who is NOT in the cabal.
235235

236-
2. By (1), not everyone is in the cabal.
236+
2. By (1), not everyone is in the cabal.
237237

238-
3. By (2) and (c), Elizabeth cannot be in the cabal. (If Elizabeth is in the cabal, then everyone has to be in the cabal, which contradicts (2).)
238+
3. By (2) and (c), Elizabeth cannot be in the cabal. (If Elizabeth is in the cabal, then everyone has to be in the cabal, which contradicts (2).)
239239

240-
4. By (d) and (b), Annie cannot be in the cabal. (If Annie is in the cabal, then by (d) Siggie would be in the cabal too, but they can't be both in the cabal because of (b).)
240+
4. By (d) and (b), Annie cannot be in the cabal. (If Annie is in the cabal, then by (d) Siggie would be in the cabal too, but they can't be both in the cabal because of (b).)
241241

242-
5. Now let's argue by cases:
242+
5. Now let's argue by cases:
243243

244-
6. Case 1: Ben is in the cabal.
244+
6. Case 1: Ben is in the cabal.
245245

246-
6.1. By (e) and (6), Tom is not in the cabal.
246+
6.1. By (e) and (6), Tom is not in the cabal.
247247

248-
6.2. By (e) and (6), Adam is not in the cabal.
248+
6.2. By (e) and (6), Adam is not in the cabal.
249249

250-
6.3. So in this case, Elizabeth, Annie, Tom and Adam are not in the cabal. So the remaining 3 people Ben, Albert, Siggie must be in the cabal by (a).
250+
6.3. So in this case, Elizabeth, Annie, Tom and Adam are not in the cabal. So the remaining 3 people Ben, Albert, Siggie must be in the cabal by (a).
251251

252-
7. Case 2: Ben is not in the cabal. (So now 3 people: Ben, Elizabeth, Annie are not in the cabal. We need to check the remaining 4 people Adam, Tom, Albert, Siggi.)
252+
7. Case 2: Ben is not in the cabal. (So now 3 people: Ben, Elizabeth, Annie are not in the cabal. We need to check the remaining 4 people Adam, Tom, Albert, Siggi.)
253253

254-
7.1. Subcase 2.1: Albert is in the cabal.
254+
7.1. Subcase 2.1: Albert is in the cabal.
255255

256-
7.1.1. By (e) and (7.1), Tom is not in the cabal.
256+
7.1.1. By (e) and (7.1), Tom is not in the cabal.
257257

258-
7.1.2. Now we are left with 3 people: Siggi, Albert, Adam. By (a) they must be all members of the cabal.
258+
7.1.2. Now we are left with 3 people: Siggi, Albert, Adam. By (a) they must be all members of the cabal.
259259

260-
7.1.3. Since Siggi is in the cabal, by (f) Adam is not in the cabal, which is a contradiction! Therefore Subcase 2.1 is not possible.
260+
7.1.3. Since Siggi is in the cabal, by (f) Adam is not in the cabal, which is a contradiction! Therefore Subcase 2.1 is not possible.
261261

262-
7.2. Subcase 2.2: Albert is not in the cabal.
262+
7.2. Subcase 2.2: Albert is not in the cabal.
263263

264-
7.2.1. So now 4 people: Ben, Albert, Elizabeth, Annie are not in the cabal.
264+
7.2.1. So now 4 people: Ben, Albert, Elizabeth, Annie are not in the cabal.
265265

266-
7.2.2. By (a), the remaining 3 people: Siggi, Tom, Adam must be in the cabal.
266+
7.2.2. By (a), the remaining 3 people: Siggi, Tom, Adam must be in the cabal.
267267

268-
7.2.3. Once again, since Siggi is in the cabal, by (f) Adam is not in the cabal, which is a contradiction! Therefore Subcase 2.2 is also not possible.
268+
7.2.3. Once again, since Siggi is in the cabal, by (f) Adam is not in the cabal, which is a contradiction! Therefore Subcase 2.2 is also not possible.
269269

270-
7.3. By (7.1.3) and (7.2.3) we see that Case 2 leads to a contradiction, so it's impossible.
270+
7.3. By (7.1.3) and (7.2.3) we see that Case 2 leads to a contradiction, so it's impossible.
271271

272-
8. Therefore the only possible conclusion is the one at the end of Case 1: Ben, Albert, Siggie are in the cabal and nobody else.
272+
8. Therefore the only possible conclusion is the one at the end of Case 1: Ben, Albert, Siggie are in the cabal and nobody else.
273273
\end{proof}
274-
\end{document}
274+
\end{document}

0 commit comments

Comments
 (0)