├── book
└── exercises
│ └── ch1
│ ├── ch01_1-sol.pdf
│ ├── ch01_2-sol.pdf
│ ├── ch01_3-sol.pdf
│ ├── ch01_1-sol.tex
│ ├── ch01_3-sol.tex
│ └── ch01_2-sol.tex
├── README.md
├── .gitignore
├── LICENSE_CC
└── LICENSE_GNU
/book/exercises/ch1/ch01_1-sol.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lair001/rosen-discrete-math/HEAD/book/exercises/ch1/ch01_1-sol.pdf
--------------------------------------------------------------------------------
/book/exercises/ch1/ch01_2-sol.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lair001/rosen-discrete-math/HEAD/book/exercises/ch1/ch01_2-sol.pdf
--------------------------------------------------------------------------------
/book/exercises/ch1/ch01_3-sol.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lair001/rosen-discrete-math/HEAD/book/exercises/ch1/ch01_3-sol.pdf
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Solutions for *Discrete Mathematics and Its Applications* by Kenneth H. Rosen
2 | Solutions for the 8th edition of *Discrete Mathematics and Its Applications* by Kenneth H. Rosen.
3 |
4 | ## Contributing
5 |
6 | If you have a question, found an error in a solution, or want to request a solution to a particular problem, feel free to [open an issue](https://github.com/lair001/rosen-discrete-math/issues) or [fork the lehman-mathematics-cs repository](https://github.com/lair001/rosen-discrete-math/fork) and [submit a pull request](https://github.com/lair001/rosen-discrete-math/pulls). You may also email me (Samuel Lair) at lair001@gmail.com. Copies of the book and related materials are in a separate [repo](https://github.com/lair001/rosen-discrete-math-materials).
7 |
8 | ## License
9 |
10 | All software (e.g. *.tex and *.py files) in this repo is licensed under [GPLv3](https://www.gnu.org/licenses/gpl-3.0.en.html).
11 |
12 | Shield: [![CC BY-NC-SA 4.0][cc-by-nc-sa-shield]][cc-by-nc-sa]
13 |
14 | All content (e.g. *.pdf files) in this repo are licensed under a
15 | [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License][cc-by-nc-sa].
16 |
17 | [![CC BY-NC-SA 4.0][cc-by-nc-sa-image]][cc-by-nc-sa]
18 |
19 | [cc-by-nc-sa]: http://creativecommons.org/licenses/by-nc-sa/4.0/
20 | [cc-by-nc-sa-image]: https://licensebuttons.net/l/by-nc-sa/4.0/88x31.png
21 | [cc-by-nc-sa-shield]: https://img.shields.io/badge/License-CC%20BY--NC--SA%204.0-lightgrey.svg
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Core latex/pdflatex auxiliary files:
2 | *.aux
3 | *.lof
4 | *.log
5 | *.lot
6 | *.fls
7 | *.out
8 | *.toc
9 | *.fmt
10 | *.fot
11 | *.cb
12 | *.cb2
13 | .*.lb
14 |
15 | ## Intermediate documents:
16 | *.dvi
17 | *.xdv
18 | *-converted-to.*
19 | # these rules might exclude image files for figures etc.
20 | # *.ps
21 | # *.eps
22 | # *.pdf
23 |
24 | ## Generated if empty string is given at "Please type another file name for output:"
25 | .pdf
26 |
27 | ## Bibliography auxiliary files (bibtex/biblatex/biber):
28 | *.bbl
29 | *.bcf
30 | *.blg
31 | *-blx.aux
32 | *-blx.bib
33 | *.run.xml
34 |
35 | ## Build tool auxiliary files:
36 | *.fdb_latexmk
37 | *.synctex
38 | *.synctex(busy)
39 | *.synctex.gz
40 | *.synctex.gz(busy)
41 | *.pdfsync
42 |
43 | ## Build tool directories for auxiliary files
44 | # latexrun
45 | latex.out/
46 |
47 | ## Auxiliary and intermediate files from other packages:
48 | # algorithms
49 | *.alg
50 | *.loa
51 |
52 | # achemso
53 | acs-*.bib
54 |
55 | # amsthm
56 | *.thm
57 |
58 | # beamer
59 | *.nav
60 | *.pre
61 | *.snm
62 | *.vrb
63 |
64 | # changes
65 | *.soc
66 |
67 | # comment
68 | *.cut
69 |
70 | # cprotect
71 | *.cpt
72 |
73 | # elsarticle (documentclass of Elsevier journals)
74 | *.spl
75 |
76 | # endnotes
77 | *.ent
78 |
79 | # fixme
80 | *.lox
81 |
82 | # feynmf/feynmp
83 | *.mf
84 | *.mp
85 | *.t[1-9]
86 | *.t[1-9][0-9]
87 | *.tfm
88 |
89 | #(r)(e)ledmac/(r)(e)ledpar
90 | *.end
91 | *.?end
92 | *.[1-9]
93 | *.[1-9][0-9]
94 | *.[1-9][0-9][0-9]
95 | *.[1-9]R
96 | *.[1-9][0-9]R
97 | *.[1-9][0-9][0-9]R
98 | *.eledsec[1-9]
99 | *.eledsec[1-9]R
100 | *.eledsec[1-9][0-9]
101 | *.eledsec[1-9][0-9]R
102 | *.eledsec[1-9][0-9][0-9]
103 | *.eledsec[1-9][0-9][0-9]R
104 |
105 | # glossaries
106 | *.acn
107 | *.acr
108 | *.glg
109 | *.glo
110 | *.gls
111 | *.glsdefs
112 | *.lzo
113 | *.lzs
114 |
115 | # uncomment this for glossaries-extra (will ignore makeindex's style files!)
116 | # *.ist
117 |
118 | # gnuplottex
119 | *-gnuplottex-*
120 |
121 | # gregoriotex
122 | *.gaux
123 | *.gtex
124 |
125 | # htlatex
126 | *.4ct
127 | *.4tc
128 | *.idv
129 | *.lg
130 | *.trc
131 | *.xref
132 |
133 | # hyperref
134 | *.brf
135 |
136 | # knitr
137 | *-concordance.tex
138 | # TODO Comment the next line if you want to keep your tikz graphics files
139 | *.tikz
140 | *-tikzDictionary
141 |
142 | # listings
143 | *.lol
144 |
145 | # luatexja-ruby
146 | *.ltjruby
147 |
148 | # makeidx
149 | *.idx
150 | *.ilg
151 | *.ind
152 |
153 | # minitoc
154 | *.maf
155 | *.mlf
156 | *.mlt
157 | *.mtc[0-9]*
158 | *.slf[0-9]*
159 | *.slt[0-9]*
160 | *.stc[0-9]*
161 |
162 | # minted
163 | _minted*
164 | *.pyg
165 |
166 | # morewrites
167 | *.mw
168 |
169 | # nomencl
170 | *.nlg
171 | *.nlo
172 | *.nls
173 |
174 | # pax
175 | *.pax
176 |
177 | # pdfpcnotes
178 | *.pdfpc
179 |
180 | # sagetex
181 | *.sagetex.sage
182 | *.sagetex.py
183 | *.sagetex.scmd
184 |
185 | # scrwfile
186 | *.wrt
187 |
188 | # sympy
189 | *.sout
190 | *.sympy
191 | sympy-plots-for-*.tex/
192 |
193 | # pdfcomment
194 | *.upa
195 | *.upb
196 |
197 | # pythontex
198 | *.pytxcode
199 | pythontex-files-*/
200 |
201 | # tcolorbox
202 | *.listing
203 |
204 | # thmtools
205 | *.loe
206 |
207 | # TikZ & PGF
208 | *.dpth
209 | *.md5
210 | *.auxlock
211 |
212 | # todonotes
213 | *.tdo
214 |
215 | # vhistory
216 | *.hst
217 | *.ver
218 |
219 | # easy-todo
220 | *.lod
221 |
222 | # xcolor
223 | *.xcp
224 |
225 | # xmpincl
226 | *.xmpi
227 |
228 | # xindy
229 | *.xdy
230 |
231 | # xypic precompiled matrices and outlines
232 | *.xyc
233 | *.xyd
234 |
235 | # endfloat
236 | *.ttt
237 | *.fff
238 |
239 | # Latexian
240 | TSWLatexianTemp*
241 |
242 | ## Editors:
243 | # WinEdt
244 | *.bak
245 | *.sav
246 |
247 | # Texpad
248 | .texpadtmp
249 |
250 | # LyX
251 | *.lyx~
252 |
253 | # Kile
254 | *.backup
255 |
256 | # gummi
257 | .*.swp
258 |
259 | # KBibTeX
260 | *~[0-9]*
261 |
262 | # TeXnicCenter
263 | *.tps
264 |
265 | # auto folder when using emacs and auctex
266 | ./auto/*
267 | *.el
268 |
269 | # expex forward references with \gathertags
270 | *-tags.tex
271 |
272 | # standalone packages
273 | *.sta
274 |
275 | # Makeindex log files
276 | *.lpz
277 |
278 | # bak files
279 | *.bak*
280 |
281 | # intellij
282 | .idea/
283 |
--------------------------------------------------------------------------------
/book/exercises/ch1/ch01_1-sol.tex:
--------------------------------------------------------------------------------
1 | \documentclass{article}
2 | \usepackage[utf8]{inputenc}
3 | \usepackage[T1]{fontenc}
4 | \usepackage{indentfirst, hyperref, gensymb, amsmath, amsthm, wasysym, amsfonts, mathtools, braket, amssymb}
5 | \hypersetup{colorlinks,allcolors=blue,linktoc=all}
6 |
7 | \title{Chapter 1 Section 1 Exercise Solutions}
8 | \author{Samuel Lair}
9 | \date{September 2022}
10 |
11 | \begin{document}
12 |
13 | \maketitle
14 | \tableofcontents
15 |
16 | \pagebreak
17 |
18 | \section{Exercise 24}
19 | \subsection{(a)}
20 | If you got promoted, then you washed the boss's car.
21 | \subsection{(b)}
22 | If there are winds from the south, then there will be a spring thaw.
23 | \subsection{(c)}
24 | If you bought the computer less than a year ago, then the warranty is good.
25 | \subsection{(d)}
26 | If Willy cheats, then he gets caught.
27 | \subsection{(e)}
28 | If you can access the website, then you paid a subscription fee.
29 | \subsection{(f)}
30 | If you know the right people, then you'll get elected.
31 | \subsection{(g)}
32 | If Carol is on a boat, then she gets seasick.
33 |
34 | \pagebreak
35 |
36 | \section{Exercise 25}
37 | \subsection{(a)}
38 | If the wind blows from the northeast, then it snows.
39 | \subsection{(b)}
40 | If it stays warm for a week, then the apple trees will bloom.
41 | \subsection{(c)}
42 | If the Pistons win the championship, then they beat the Lakers.
43 | \subsection{(d)}
44 | If you got to the top of Long's Peak, then you walked eight miles.
45 | \subsection{(e)}
46 | If you are world famous, then you will get tenure as a professor.
47 | \subsection{(f)}
48 | If you drive more than 400 miles, then you will need to buy gasoline.
49 | \subsection{(g)}
50 | If your guarantee is good, then you bought your CD player less than 90 days ago.
51 | \subsection{(h)}
52 | If the water isn't too cold, then Jan will go swimming.
53 | \subsection{(i)}
54 | If people believe in science, then we will have a future.
55 |
56 | \pagebreak
57 |
58 | \section{Exercise 26}
59 | \subsection{(a)}
60 | If I remembered to send you the address, then you sent me an e-mail message.
61 | \subsection{(b)}
62 | If you were born in the United States, then you are a citizen of this country.
63 | \subsection{(c)}
64 | If you keep your textbook, then it will be a useful reference in your future courses.
65 | \subsection{(d)}
66 | If their goalie plays well, then the Red Wings will win the Stanley Cup.
67 | \subsection{(e)}
68 | If you get the job, then you had the best credentials.
69 | \subsection{(f)}
70 | If there is a storm, then the beach erodes.
71 | \subsection{(g)}
72 | If you log on to the server, then you have a valid password.
73 | \subsection{(h)}
74 | If you don't begin your climb too late, then you will reach the summit.
75 | \subsection{(i)}
76 | If you are among the first 100 customers tomorrow, then you will get a free ice cream cone.
77 |
78 | \pagebreak
79 |
80 | \section{Exercise 27}
81 | \subsection{(a)}
82 | It is hot outside if and only if you buy an ice cream cone.
83 | \subsection{(b)}
84 | You win the contest if and only if you have the only winning ticket.
85 | \subsection{(c)}
86 | You get promoted if and only if you have connections.
87 | \subsection{(d)}
88 | You watch television if and only if your mind will decay.
89 | \subsection{(e)}
90 | The trains run late if and only if it is a day when I take the train.
91 |
92 | \pagebreak
93 |
94 | \section{Exercise 28}
95 | \subsection{(a)}
96 | You get an A in this course if and only if you learn how to solve discrete mathematics problems.
97 | \subsection{(b)}
98 | You will be informed if and only if you read the newspaper every day.
99 | \subsection{(c)}
100 | It rains if and only if it is a weekend day.
101 | \subsection{(d)}
102 | The wizard is not in if and only if you can see him.
103 | \subsection{(e)}
104 | My airplane flight is late if and only if I have to catch a connecting flight.
105 |
106 | \pagebreak
107 |
108 | \section{Exercise 29}
109 | \subsection{(a)}
110 | Original: If it snows today, then I will ski tomorrow.
111 |
112 | Converse: If I will ski tomorrow, then it snows today.
113 |
114 | Contrapositive: If I won't ski tomorrow, then it doesn't snow today.
115 |
116 | Inverse: If it doesn't snow today, then I won't ski tomorrow.
117 |
118 | \subsection{(b)}
119 | Original: If there is going to be a quiz, then I come to class.
120 |
121 | Converse: If I come to class, then there is going to be a quiz.
122 |
123 | Contrapositive: If I don't come to class, then there isn't going to be a quiz.
124 |
125 | Inverse: If there isn't going to be a quiz, then I don't come to class.
126 |
127 | \subsection{(c)}
128 | Original: If a positive integer is prime, then it has no divisors other than 1 and itself.
129 |
130 | Converse: If a positive integer has no divisors other than 1 and itself, then it is prime.
131 |
132 | Contrapositive: If a positive integer has divisors other than 1 and itself, then it isn't prime.
133 |
134 | Inverse: If a positive integer isn't prime, then it has divisors other than 1 and itself.
135 |
136 | \pagebreak
137 |
138 | \section{Exercise 30}
139 |
140 | \subsection{(a)}
141 | Original: If it snows tonight, then I will stay at home.
142 |
143 | Converse: If I will stay at home, then it snows tonight.
144 |
145 | Contrapositive: If I won't stay at home, then it doesn't snow tonight.
146 |
147 | Inverse: If it doesn't snow tonight, then I won't stay at home.
148 |
149 | \subsection{(b)}
150 | Original: If it is a sunny summer day, then I go to the beach.
151 |
152 | Converse: If I go to the beach, then it is a sunny summer day.
153 |
154 | Contrapositive: If I don't go the beach, then it isn't a sunny summer day.
155 |
156 | Inverse: If it isn't a sunny summer day, then I don't go to the beach.
157 |
158 | \subsection{(c)}
159 | Original: If I stay up late, then I sleep until noon.
160 |
161 | Converse: If I sleep until noon, then I stay up late.
162 |
163 | Contrapositive: If I don't sleep until noon, then I don't stay up late.
164 |
165 | Inverse: If I don't stay up late, then I don't sleep until noon.
166 |
167 | \pagebreak
168 |
169 | \section{Exercise 42}
170 | Let
171 | \begin{align}
172 | & (p \lor \neg q) \label{e42e1} \\
173 | & (q \lor \neg r) \label{e42e2} \\
174 | & (r \lor \neg p) \label{e42e3} \\
175 | & \eqref{e42e1} \land \eqref{e42e2} \land \eqref{e42e3} \label{e42e4}
176 | \end{align}
177 |
178 | \eqref{e42e1} is true if and only if p is true or q is false.
179 |
180 | \eqref{e42e2} is true if and only if q is true or r is false.
181 |
182 | \eqref{e42e3} is true if and only if r is true or p is false.
183 |
184 | \eqref{e42e4} is true if and only if \eqref{e42e1}, \eqref{e42e2}, and \eqref{e42e3} are all true.
185 |
186 | Therefore, when $p,q,r$ have the same truth value, \eqref{e42e1}, \eqref{e42e2}, \eqref{e42e3}, and \eqref{e42e4} are all true. However, when one of $p,q,r$ has a different truth value from the other two, two of \eqref{e42e1}, \eqref{e42e2}, and \eqref{e42e3} are true while the other is false. \eqref{e42e4} is false in this case.
187 |
188 | Hence, \eqref{e42e4} is true when $p$, $q$, and $r$ have the same truth value and false otherwise.
189 |
190 | \pagebreak
191 |
192 | \section{Exercise 43}
193 | Let
194 | \begin{align}
195 | & (p \lor q \lor r) \label{e43e1} \\
196 | & (\neg p \lor \neg q \lor \neg r) \label{e43e2} \\
197 | & \eqref{e43e1} \land \eqref{e43e2} \label{e43e3}
198 | \end{align}
199 |
200 | \eqref{e43e1} is true if and only if at least one of $p, q, r$ is true.
201 |
202 | \eqref{e43e2} is true if and only if at least one of $p, q, r$ is false.
203 |
204 | Hence, \eqref{e43e3} is true if and only if at least one of $p, q, r$ is true and at least one of $p, q, r$ is false. I.e. \eqref{e43e3} is true if at least one of $p, q, r$ is true and at least one is false, but is false when all three variables have the same truth value
205 |
206 |
207 | \pagebreak
208 |
209 | \section{Exercise 44}
210 | If $p_1, p_2, ..., p_n$ are $n$ propositions explain why
211 | \begin{equation}\label{e44claim}
212 | \bigwedge_{i=1}^{n-1} \bigwedge_{j=i+1}^n (\neg p_i \lor \neg p_j)
213 | \end{equation}
214 | is true if and only if at most of $p_1, p_2, ..., p_n$ is true.
215 |
216 | \eqref{e44claim} is a conjunction of disjuncts of the form
217 | \begin{equation}\label{e44dj}
218 | \neg p_i \lor \neg p_j
219 | \end{equation}
220 | Due to the limits of the conjunctions, there is exactly one disjunct for every pair $(i,j)$ such that $1 \le i < j \le n$. Therefore, if more than one of the $p_k$'s are true, then there exists a pair $(i',j')$ such that both $p_{i'}$ and $p_{j'}$ are true and the corresponding disjunct \eqref{e44dj} is false. A single false disjunct is enough to cause \eqref{e44claim} to evaluate to false.
221 |
222 | If no more than 1 of the $p_k$'s is true, then \eqref{e44dj} is true. If \eqref{e44dj} is true, then no more 1 of the $p_k$'s is true. Our claim follows.
223 |
224 | \pagebreak
225 |
226 | \section{Exercise 45}
227 | \begin{equation}
228 | \bigvee_{h=1}^n p_h
229 | \end{equation}
230 | is true if and only if at least one of the $p_k$'s are true. Therefore,
231 | \begin{equation}
232 | \left( \bigwedge_{i=1}^{n-1} \bigwedge_{j=i+1}^n (\neg p_i \lor \neg p_j) \right) \land \left( \bigvee_{h=1}^n p_h \right)
233 | \end{equation}
234 | is true if and only if exactly one of the $p_k$'s is true.
235 |
236 | \pagebreak
237 |
238 | \section{Exercise 47}
239 | \subsection{(a)}
240 | \begin{align*}
241 | & \text{101 1110} & \\
242 | & \underline{\text{010 0001}} & \\
243 | & \text{111 1111} & (\text{bitwise OR}) \\
244 | & \text{000 0000} & (\text{bitwise AND}) \\
245 | & \text{111 1111} & (\text{bitwise XOR}) \\
246 | \end{align*}
247 |
248 | \subsection{(b)}
249 | \begin{align*}
250 | & \text{1111 0000} & \\
251 | & \underline{\text{1010 1010}} & \\
252 | & \text{1111 1010} & (\text{bitwise OR}) \\
253 | & \text{1010 0000} & (\text{bitwise AND}) \\
254 | & \text{0101 1010} & (\text{bitwise XOR}) \\
255 | \end{align*}
256 |
257 | \subsection{(c)}
258 | \begin{align*}
259 | & \text{00 0111 0001} & \\
260 | & \underline{\text{10 0100 1000}} & \\
261 | & \text{10 0111 1001} & (\text{bitwise OR}) \\
262 | & \text{00 0100 0000} & (\text{bitwise AND}) \\
263 | & \text{10 0011 1001} & (\text{bitwise XOR}) \\
264 | \end{align*}
265 |
266 | \subsection{(d)}
267 | \begin{align*}
268 | & \text{11 1111 1111} & \\
269 | & \underline{\text{00 0000 0000}} & \\
270 | & \text{11 1111 1111} & (\text{bitwise OR}) \\
271 | & \text{00 0000 0000} & (\text{bitwise AND}) \\
272 | & \text{11 1111 1111} & (\text{bitwise XOR}) \\
273 | \end{align*}
274 |
275 | \section{Exercise 48}
276 | \subsection{(a)}
277 | \begin{align*}
278 | & \text{0 1011} \\
279 | \lor \; & \underline{\text{1 1011}} \\
280 | & \text{1 1011} \\
281 | & \\
282 | & \text{1 1000} \\
283 | \land \; & \underline{\text{1 1011}} \\
284 | & \text{1 1000} \; \leftarrow \text{answer}
285 | \end{align*}
286 |
287 | \subsection{(b)}
288 | \begin{align*}
289 | & \text{0 1111} \\
290 | \land \; & \underline{\text{1 0101}} \\
291 | & \text{0 0101} \\
292 | & \\
293 | & \text{0 0101} \\
294 | \lor \; & \underline{\text{0 1000}} \\
295 | & \text{0 1101} \; \leftarrow \text{answer}
296 | \end{align*}
297 |
298 | \subsection{(c)}
299 | \begin{align*}
300 | & \text{0 1010} \\
301 | \oplus \; & \underline{\text{1 1011}} \\
302 | & \text{1 0001} \\
303 | & \\
304 | & \text{1 0001} \\
305 | \oplus \; & \underline{\text{0 1000}} \\
306 | & \text{1 1001} \; \leftarrow \text{answer}
307 | \end{align*}
308 |
309 | \subsection{(d)}
310 | \begin{align*}
311 | & \text{1 1011} \\
312 | \lor \; & \underline{\text{0 1010}} \\
313 | & \text{1 1011} \\
314 | & \\
315 | & \text{1 0001} \\
316 | \lor \; & \underline{\text{1 1011}} \\
317 | & \text{1 1011} \\
318 | & \\
319 | & \text{1 1011} \\
320 | \land \; & \underline{\text{1 1011}} \\
321 | & \text{1 1011} \; \leftarrow \text{answer}
322 | \end{align*}
323 |
324 | \pagebreak
325 |
326 | \section{Exercise 49}
327 | The truth value of "Fred is not happy" is $1 - 0.8 = 0.2$.
328 |
329 | The truth value of "John is not happy" is $1 - 0.4 = 0.6$.
330 |
331 | \pagebreak
332 |
333 | \section{Exercise 50}
334 | The truth value of "Fred and John are happy" is $min(0.8, 0.4) = 0.4$.
335 |
336 | "Neither Fred nor John is happy" is equivalent to "Fred is not happy and John is not happy". Therefore, the truth value of "Neither Fred nor John is happy" is $min(0.2, 0.6) = 0.2$.
337 |
338 | \pagebreak
339 |
340 | \section{Exercise 51}
341 | The truth value of "Fred is happy or John is happy" is $max(0.8, 0.4) = 0.8$.
342 |
343 | The truth value of "Fred is not happy or John is not happy" is $max(0.2, 0.6) = 0.6$.
344 |
345 | \pagebreak
346 |
347 | \section{Exercise 52}
348 | "This statement is false" is not a proposition. It is a declarative sentence but it doesn't have a definite truth value. It is, in fact, a logical paradox. Regardless of whether you assume it is true or false, you reach a contradiction.
349 |
350 | \pagebreak
351 |
352 | \section{Exercise 53}
353 | \subsection{(a)}
354 | If we assume that the 100th statement is true, we reach a contradiction since we must conclude that the 100th statement is false. No contradiction is reached if the 100th statement is false. Therefore, the 100th statement is false, which implies that at least one of the statements are true.
355 |
356 | If we take $1 \le n \le 98$ and assume that the $n^{th}$ statement is true, we reach a contradiction. If the $n^{th}$ statement is true, then $100 - n$ statements must true. Since $100 - n > 1$, there must be true statements other than $n^{th}$ statement. However, if more than 1 statement is true, they will contradict each other. No contradiction is reached if we assume that the $n^{th}$ statement is false. Therefore, statements $1-98$ are be false.
357 |
358 | Now if we assume that the $99^{th}$ statement is false, we reach a contradiction in that all statements are false yet exactly 1 must be true. However, no contradiction is reached if we assume that the $99^{th}$ statement is true. Therefore, the 99th statement must be true.
359 |
360 | Hence, we conclude that the $99^{th}$ statement is true and the rest are false.
361 |
362 | \subsection{(b)}
363 | First of all, note that if the $n^{th}$ statement is true then all prior statements are true as well.
364 |
365 | If we assume that the $51^{st}$ statement is true, we reach a contradiction. If the $51^{st}$ statement is true, then statements $1-50$ must also be true. This leaves only statements $52-100$ available to be false. However, this is only a total of $49$ statements, contradicting the $51^{st}$ statement. Therefore, $51^{st}$ statement is false, which implies that statements $52-100$ are also false.
366 |
367 | If we assume that the $50^{th}$ statement is false, then we reach a contradiction where at least $50$ statements are false since statements $51-100$ must also be false. We reach no contradiction if we assume that the $50^{th}$ statement is true. Therefore, the $50^{th}$ statement is true, which implies that statements $1-49$ are also true.
368 |
369 | Hence, we conclude that statements $1-50$ are true and statements $51-100$ are false.
370 |
371 | \subsection{(c)}
372 | If we assume that the $50^{th}$ statement is true, then we reach a contraction since statements $1-49$ must also be true leaving only statements $51-99$ available to be false.
373 |
374 | However, if we assume that the $50^{th}$ statement is false, then we reach a contraction where at $50$ statements are false since statements $51-99$ must also be false.
375 |
376 | Hence, we conclude that this system of statements represents an unsolvable logical paradox.
377 |
378 | \end{document}
--------------------------------------------------------------------------------
/book/exercises/ch1/ch01_3-sol.tex:
--------------------------------------------------------------------------------
1 | \documentclass{article}
2 | \usepackage[utf8]{inputenc}
3 | \usepackage[T1]{fontenc}
4 | \usepackage{indentfirst, hyperref, gensymb, amsmath, amsthm, wasysym, amsfonts, mathtools, braket, amssymb}
5 | \hypersetup{colorlinks,allcolors=blue,linktoc=all}
6 |
7 | \let\biconditional\leftrightarrow
8 | \let\conditional\rightarrow
9 |
10 | \title{Chapter 1 Section 3 Exercise Solutions}
11 | \author{Samuel Lair}
12 | \date{September 2022}
13 |
14 | \begin{document}
15 |
16 | \maketitle
17 | \tableofcontents
18 |
19 | \pagebreak
20 |
21 | \section{Exercise 5}
22 | \[
23 | \begin{array}{|c|c|c|c|c|c|c|c|}
24 | p & q & r & q \lor r & p \land (q \lor r) & p \land q & p \land r & (p \land q) \lor (p \land r) \\
25 | \hline
26 | T & T & T & T & T & T & T & T \\
27 | T & T & F & T & T & T & F & T \\
28 | T & F & T & T & T & F & T & T \\
29 | T & F & F & F & F & F & F & F \\
30 | F & T & T & T & F & F & F & F \\
31 | F & T & F & T & F & F & F & F \\
32 | F & F & T & T & F & F & F & F \\
33 | F & F & F & F & F & F & F & F
34 | \end{array}
35 | \]
36 |
37 | Since the truth values of the compound propositions $p \land (q \lor r)$ and $(p \land q) \lor (p \land r)$ agree for all possible combinations of the truth values of $p$, $q$, and $r$, said compound propositions are logically equivalent.
38 |
39 | \section{Exercise 6}
40 | \[
41 | \begin{array}{|c|c|c|c|c|c|c|}
42 | p & q & p \land q & \neg (p \land q) & \neg p & \neg q & \neg p \lor \neg q \\
43 | \hline
44 | T & T & T & F & F & F & F \\
45 | T & F & F & T & F & T & T \\
46 | F & T & F & T & T & F & T \\
47 | F & F & F & T & T & T & T
48 | \end{array}
49 | \]
50 |
51 | Since the truth values of the compound propositions $\neg (p \land q)$ and $\neg p \lor \neg q$ agree for all possible combinations of the truth values of $p$ and $q$, said compound propositions are logically equivalent.
52 |
53 | \pagebreak
54 |
55 | \section{Exercise 9}
56 |
57 | \subsection{(a)}
58 | \begin{align*}
59 | & p \implies \neg q & \equiv \\
60 | \neg & p \lor \neg q
61 | \end{align*}
62 |
63 | \subsection{(b)}
64 | \begin{align*}
65 | & (p \implies q) \implies r & \equiv \\
66 | \neg & (p \implies q) \lor r & \equiv \\
67 | \neg & (\neg p \lor q) \lor r & \equiv \\
68 | & (p \land \neg q) \lor r
69 | \end{align*}
70 |
71 | \subsection{(c)}
72 | \begin{align*}
73 | & (\neg q \implies p) \implies (p \implies \neg q) & \equiv \\
74 | \neg & (\neg q \implies p) \lor (p \implies \neg q) & \equiv \\
75 | \neg & (q \lor p) \lor (\neg p \lor \neg q) & \equiv \\
76 | & (\neg q \land \neg p) \lor (\neg p \lor \neg q) & \equiv \\
77 | & (\neg p \land \neg q) \lor (\neg p \lor \neg q) & \equiv \\
78 | & ((\neg p \land \neg q) \lor \neg p) \lor \neg q & \equiv \\
79 | & (\neg p \lor (\neg p \land \neg q)) \lor \neg q & \equiv \\
80 | \neg & p \lor \neg q
81 | \end{align*}
82 |
83 | \pagebreak
84 |
85 | \section{Exercise 10}
86 |
87 | \subsection{(a)}
88 | \begin{align*}
89 | \neg & p \implies \neg q & \equiv \\
90 | \neg (\neg & p) \lor \neg q & \equiv \\
91 | & p \lor \neg q
92 | \end{align*}
93 |
94 | \subsection{(b)}
95 | \begin{align*}
96 | & p \lor q \implies \neg p & \equiv \\
97 | \neg ( & p \lor q) \lor \neg p & \equiv \\
98 | (\neg & p \land \neg q) \lor \neg p & \equiv \\
99 | \neg & p \lor (\neg p \land \neg q) & \equiv \\
100 | \neg & p
101 | \end{align*}
102 |
103 | \subsection{(c)}
104 | \begin{align*}
105 | ( & p \implies \neg q) \implies (\neg p \implies q) & \equiv \\
106 | \neg ( & p \implies \neg q) \lor (\neg p \implies q) & \equiv \\
107 | \neg (\neg & p \lor \neg q) \lor (p \lor q) & \equiv \\
108 | ( & p \land q) \lor (p \lor q) & \equiv \\
109 | (( & p \land q) \lor p) \lor q & \equiv \\
110 | ( & p \lor (p \land q)) \lor q & \equiv \\
111 | & p \lor q
112 | \end{align*}
113 |
114 | \pagebreak
115 |
116 | \section{Exercise 15}
117 |
118 | \subsection{(a)}
119 | \begin{align*}
120 | & (p \land q) \implies p & \equiv \\
121 | \neg & (p \land q) \lor p & \equiv \\
122 | (\neg & p \lor \neg q) \lor p & \equiv \\
123 | \neg & q \lor (p \lor \neg p) & \equiv \\
124 | \neg & q \lor T & \equiv \\
125 | & T
126 | \end{align*}
127 |
128 | \subsection{(b)}
129 | \begin{align*}
130 | & p \implies (p \lor q) & \equiv \\
131 | \neg & p \lor (p \lor q) & \equiv \\
132 | & q \lor (p \lor \neg p) & \equiv \\
133 | & q \lor T & \equiv \\
134 | & T
135 | \end{align*}
136 |
137 | \subsection{(c)}
138 | \begin{align*}
139 | \neg & p \implies (p \implies q) & \equiv \\
140 | \neg & p \implies (\neg p \lor q) & \equiv \\
141 | & p \lor (\neg p \lor q) & \equiv \\
142 | & q \lor (p \lor \neg p) & \equiv \\
143 | & q \lor T & \equiv \\
144 | & T
145 | \end{align*}
146 |
147 | \subsection{(d)}
148 | \begin{align*}
149 | ( & p \land q) \implies (p \implies q) & \equiv \\
150 | ( & p \land q) \implies (\neg p \lor q) & \equiv \\
151 | \neg ( & p \land q) \lor (\neg p \lor q) & \equiv \\
152 | (\neg & p \lor \neg q) \lor (\neg p \lor q) & \equiv \\
153 | (\neg & p \lor \neg p) \lor (q \lor \neg q) & \equiv \\
154 | \neg & p \lor T & \equiv \\
155 | & T
156 | \end{align*}
157 |
158 | \subsection{(e)}
159 | \begin{align*}
160 | \neg( & p \implies q) \implies p & \equiv \\
161 | \neg(\neg & p \lor q) \implies p & \equiv \\
162 | (\neg & p \lor q) \lor p & \equiv \\
163 | & q \lor (p \lor \neg p) & \equiv \\
164 | & q \lor T & \equiv \\
165 | & T
166 | \end{align*}
167 |
168 | \subsection{(f)}
169 | \begin{align*}
170 | \neg( & p \implies q) \implies \neg q & \equiv \\
171 | \neg(\neg & p \lor q) \implies \neg q & \equiv \\
172 | (\neg & p \lor q) \lor \neg q & \equiv \\
173 | \neg & p \lor (q \lor \neg q) & \equiv \\
174 | \neg & p \lor T & \equiv \\
175 | & T
176 | \end{align*}
177 |
178 | \pagebreak
179 |
180 | \section{Exercise 16}
181 | \subsection{(a)}
182 | \begin{align*}
183 | [\neg & p \land (p \lor q)] \implies q & \equiv \\
184 | \neg [\neg & p \land (p \lor q)] \lor q & \equiv \\
185 | & p \lor \neg (p \lor q) \lor q & \equiv \\
186 | & p \lor (\neg p \land \neg q) \lor q & \equiv \\
187 | ( & p \lor q) \lor (\neg p \land \neg q) & \equiv \\
188 | (( & p \lor q) \lor \neg p) \land ((p \lor q) \lor \neg q) & \equiv \\
189 | ( & q \lor (p \lor \neg p)) \land (p \lor (q \lor \neg q)) & \equiv \\
190 | ( & q \lor T) \land (p \lor T) & \equiv \\
191 | & T \land T & \equiv \\
192 | & T
193 | \end{align*}
194 |
195 | \subsection{(b)}
196 | \begin{align*}
197 | [( & p \implies q) \land (q \implies r)] \implies (p \implies r) & \equiv \\
198 | \neg [( & p \implies q) \land (q \implies r)] \lor (p \implies r) & \equiv \\
199 | \neg [(\neg & p \lor q) \land (\neg q \lor r)] \lor (\neg p \lor r) & \equiv \\
200 | [\neg(\neg & p \lor q) \lor \neg (\neg q \lor r)] \lor (\neg p \lor r) & \equiv \\
201 | [( & p \land \neg q) \lor (q \land \neg r)] \lor (\neg p \lor r) & \equiv \\
202 | [(( & p \land \neg q) \land q) \lor ((p \lor \neg q) \land \neg r)] \lor (\neg p \lor r) & \equiv \\
203 | [( & p \land (q \land \neg q)) \lor ((p \lor \neg q) \land \neg r)] \lor (\neg p \lor r) & \equiv \\
204 | [( & p \land F) \lor (\neg r \land (p \lor \neg q))] \lor (\neg p \lor r) & \equiv \\
205 | [ & F \lor ((\neg r \land p) \lor (\neg r \land \neg q))] \lor (\neg p \lor r) & \equiv \\
206 | ((\neg & r \land p) \lor (\neg r \land \neg q)) \lor (\neg p \lor r) & \equiv \\
207 | ((\neg & p \lor r) \lor (\neg r \land p)) \lor (\neg r \land \neg q) & \equiv \\
208 | (((\neg & p \lor r) \lor \neg r) \land ((\neg p \lor r) \lor p)) \lor (\neg r \land \neg q) & \equiv \\
209 | ((\neg & p \lor T) \land (r \lor T)) \lor (\neg r \land \neg q) & \equiv \\
210 | ( & T \land T) \lor (\neg r \land \neg q) & \equiv \\
211 | (\neg & r \land \neg q) \lor T & \equiv \\
212 | & T
213 | \end{align*}
214 |
215 | \subsection{(c)}
216 | \begin{align*}
217 | [ & p \land (p \implies q)] \implies q & \equiv \\
218 | \neg [ & p \land (\neg p \lor q)] \lor q & \equiv \\
219 | [\neg & p \lor \neg (\neg p \lor q)] \lor q & \equiv \\
220 | [\neg & p \lor (p \land \neg q)] \lor q & \equiv \\
221 | (\neg & p \lor q) \lor (p \land \neg q) & \equiv \\
222 | [((\neg & p \lor q) \lor p) \land ((\neg p \lor q) \lor \neg q)] & \equiv \\
223 | [( & q \lor T) \land (\neg p \lor T)] & \equiv \\
224 | & T \land T \equiv \\
225 | & T
226 | \end{align*}
227 |
228 | \subsection{(d)}
229 | \begin{align*}
230 | [( & p \lor q) \land (p \implies r) \land (q \implies r)] \implies r & \equiv \\
231 | \neg [( & p \lor q) \land (\neg p \lor r) \land (\neg q \lor r)] \lor r & \equiv \\
232 | [\neg ( & p \lor q) \lor \neg (\neg p \lor r) \lor \neg (\neg q \lor r)] \lor r & \equiv \\
233 | [(\neg & p \land \neg q) \lor (p \land \neg r) \lor (q \land \neg r)] \lor r & \equiv \\
234 | [(\neg & p \land \neg q) \lor (p \land \neg r)] \lor [r \lor (q \land \neg r)] & \equiv \\
235 | [(\neg & p \land \neg q) \lor (p \land \neg r)] \lor [(r \lor q) \land (r \lor \neg r)] & \equiv \\
236 | [(\neg & p \land \neg q) \lor (p \land \neg r)] \lor (r \lor q) & \equiv \\
237 | [( & r \lor q) \lor (\neg p \land \neg q)] \lor (p \land \neg r) & \equiv \\
238 | [(( & r \lor q) \lor \neg p) \land ((r \lor q) \lor \neg q)] \lor (p \land \neg r) & \equiv \\
239 | (( & r \lor q) \lor \neg p) \lor (p \land \neg r) & \equiv \\
240 | ((( & r \lor q) \lor \neg p) \lor p) \land (((r \lor q) \lor \neg p) \lor \neg r) & \equiv \\
241 | (( & r \lor q) \lor (p \lor \neg p)) \land ((\neg p \lor q) \lor (r \lor \neg r)) & \equiv \\
242 | (( & r \lor q) \lor T) \land ((\neg p \lor q) \lor T) & \equiv \\
243 | & T \land T & \equiv \\
244 | & T
245 | \end{align*}
246 |
247 | \pagebreak
248 |
249 | \section{Exercise 17}
250 |
251 | \subsection{(a)}
252 | \[
253 | \begin{array}{|c|c|c|c|}
254 | p & q & p \land q & p \lor (p \land q) \\
255 | \hline
256 | \textbf{T} & T & T & \textbf{T} \\
257 | \textbf{T} & F & F & \textbf{T} \\
258 | \textbf{F} & T & F & \textbf{F} \\
259 | \textbf{F} & F & F & \textbf{F}
260 | \end{array}
261 | \]
262 |
263 | Since the truth values of $p \lor (p \land q)$ and $p$ agree for all possible combinations of truth values for $p$ and $q$, $p \lor (p \land q)$ and $p$ are logically equivalent. I.e. $p \lor (p \land q) \equiv p$ is true.
264 |
265 | \subsection{(b)}
266 | \[
267 | \begin{array}{|c|c|c|c|}
268 | p & q & p \lor q & p \land (p \lor q) \\
269 | \hline
270 | \textbf{T} & T & T & \textbf{T} \\
271 | \textbf{T} & F & T & \textbf{T} \\
272 | \textbf{F} & T & T & \textbf{F} \\
273 | \textbf{F} & F & F & \textbf{F}
274 | \end{array}
275 | \]
276 |
277 | Since the truth values of $p \land (p \lor q)$ and $p$ agree for all possible combinations of truth values for $p$ and $q$, $p \land (p \lor q)$ and $p$ are logically equivalent. I.e. $p \land (p \lor q) \equiv p$ is true.
278 |
279 | \pagebreak
280 |
281 | \section{Exercise 18}
282 |
283 | \begin{align*}
284 | (\neg & p \land (p \conditional q)) \conditional \neg q & \equiv \\
285 | \neg (\neg & p \land (\neg p \lor q)) \lor \neg q & \equiv \\
286 | ( & p \lor \neg (\neg p \lor q)) \lor \neg q & \equiv \\
287 | ( & p \lor (p \land \neg q)) \lor \neg q & \equiv \\
288 | & p \lor \neg q & \equiv \\
289 | \neg & p \conditional \neg q
290 | \end{align*}
291 |
292 | Hence, $(\neg p \land (p \conditional q)) \conditional \neg q$ is not a tautology.
293 |
294 | \pagebreak
295 |
296 | \section{Exercise 19}
297 |
298 | \begin{align*}
299 | (\neg & q \land (p \conditional q)) \conditional \neg q & \equiv \\
300 | \neg (\neg & q \land (\neg p \lor q)) \lor \neg q & \equiv \\
301 | ( & q \lor \neg (\neg p \lor q)) \lor \neg q & \equiv \\
302 | ( & q \lor (p \land \neg q)) \lor \neg q & \equiv \\
303 | ( & p \land \neg q) \lor (q \lor \neg q) & \equiv \\
304 | ( & p \land \neg q) \lor T & \equiv \\
305 | & T
306 | \end{align*}
307 |
308 | Hence, $(\neg q \land (p \conditional q)) \conditional \neg q$ is a tautology.
309 |
310 | \pagebreak
311 |
312 | \section{Exercise 20}
313 | Let
314 | \begin{align}
315 | & p \biconditional q \label{ex20eq1} \\
316 | ( & p \land q) \lor (\neg p \land \neg q) \label{ex20eq2}
317 | \end{align}
318 |
319 | \[
320 | \begin{array}{|c|c|c|c|c|c|}
321 | p & q & \eqref{ex20eq1} & p \land q & \neg p \land \neg q & \eqref{ex20eq2} \\
322 | \hline
323 | T & T & \textbf{T} & T & F & \textbf{T} \\
324 | T & F & \textbf{F} & F & F & \textbf{F} \\
325 | F & T & \textbf{F} & F & F & \textbf{F} \\
326 | F & F & \textbf{T} & F & T & \textbf{T}
327 | \end{array}
328 | \]
329 |
330 | Since the truth values of \eqref{ex20eq1} and \eqref{ex20eq2} agree for all possible combinations of truth values for $p$ and $q$, \eqref{ex20eq1} and \eqref{ex20eq2} are logically equivalent.
331 |
332 | \pagebreak
333 |
334 | \section{Exercise 21}
335 | Let
336 | \begin{align}
337 | \neg ( & p \biconditional q) \label{ex21eq1} \\
338 | & p \biconditional \neg q \label{ex21eq2}
339 | \end{align}
340 |
341 | \[
342 | \begin{array}{|c|c|c|c|c|c|}
343 | p & q & p \biconditional q & \eqref{ex21eq1} & \neg q & \eqref{ex21eq2} \\
344 | \hline
345 | T & T & T & \textbf{F} & F & \textbf{F} \\
346 | T & F & F & \textbf{T} & T & \textbf{T} \\
347 | F & T & F & \textbf{T} & F & \textbf{T} \\
348 | F & F & T & \textbf{F} & T & \textbf{F}
349 | \end{array}
350 | \]
351 |
352 | Since the truth values of \eqref{ex21eq1} and \eqref{ex21eq2} agree for all possible combinations of truth values for $p$ and $q$, \eqref{ex21eq1} and \eqref{ex21eq2} are logically equivalent.
353 |
354 | \pagebreak
355 |
356 | \section{Exercise 22}
357 | Let
358 | \begin{align}
359 | & p \conditional q \label{ex22eq1} \\
360 | \neg & q \conditional \neg p \label{ex22eq2}
361 | \end{align}
362 |
363 | \[
364 | \begin{array}{|c|c|c|c|c|c|}
365 | p & q & \eqref{ex22eq1} & \neg q & \neg p & \eqref{ex22eq2} \\
366 | \hline
367 | T & T & \textbf{T} & F & F & \textbf{T} \\
368 | T & F & \textbf{F} & T & F & \textbf{F} \\
369 | F & T & \textbf{T} & F & T & \textbf{T} \\
370 | F & F & \textbf{T} & T & T & \textbf{T}
371 | \end{array}
372 | \]
373 |
374 | Since the truth values of \eqref{ex22eq1} and \eqref{ex22eq2} agree for all possible combinations of truth values for $p$ and $q$, \eqref{ex22eq1} and \eqref{ex22eq2} are logically equivalent.
375 |
376 | \pagebreak
377 | \section{Exercise 23}
378 | Let
379 | \begin{align}
380 | \neg & p \biconditional q \label{ex23eq1} \\
381 | & p \biconditional \neg q \label{ex23eq2}
382 | \end{align}
383 |
384 | \[
385 | \begin{array}{|c|c|c|c|c|c|}
386 | p & q & \neg p & \eqref{ex23eq1} & \neg q & \eqref{ex23eq2} \\
387 | \hline
388 | T & T & F & F & F & F \\
389 | T & F & F & T & T & T \\
390 | F & T & T & T & F & T \\
391 | F & F & T & F & T & F
392 | \end{array}
393 | \]
394 |
395 | Since the truth values of \eqref{ex23eq1} and \eqref{ex23eq2} agree for all possible combinations of truth values for $p$ and $q$, \eqref{ex23eq1} and \eqref{ex23eq2} are logically equivalent.
396 |
397 | \pagebreak
398 | \section{Exercise 24}
399 | $\neg (p \oplus q)$ is true when $p \oplus q$ is false, which means that $p$ and $q$ share the same truth value. This is exactly when $p \biconditional q$ is true. Hence, $\neg (p \oplus q)$ and $p \biconditional q$ are logically equivalent.
400 |
401 | \pagebreak
402 | \section{Exercise 25}
403 | $\neg (p \biconditional q)$ is true when $p \biconditional q$ is false, which means that $p$ and $q$ have different truth values. This is exactly when $\neg p \biconditional q$ is true. Hence, $\neg (p \biconditional q)$ and $\neg p \biconditional q$ are logically equivalent.
404 |
405 | \pagebreak
406 | \section{Exercise 26}
407 | $(p \conditional q) \land (p \conditional r)$ is true when both $(p \conditional q)$ and $(p \conditional r)$ are true, which means either $p = F$ or both $q = T$ and $r = T$. This is exactly when $p \conditional (q \land r)$ is true. Hence, $(p \conditional q) \land (p \conditional r)$ and $p \conditional (q \land r)$ are logically equivalent.
408 |
409 | \pagebreak
410 | \section{Exercise 27}
411 | $(p \conditional r) \land (q \conditional r)$ is true when both $(p \conditional r)$ and $(q \conditional r)$ are true, which means either $r = T$ or both $p = F$ and $q = F$. This is exactly when $(p \lor q) \conditional r$ is true. Hence, $(p \conditional r) \land (q \conditional r)$ and $(p \lor q) \conditional r$ are logically equivalent.
412 |
413 | \pagebreak
414 | \section{Exercise 28}
415 | $(p \conditional q) \lor (p \conditional r)$ is true when either $(p \conditional q)$ or $(p \conditional r)$ is true, which means either $p = F$, $q = T$, or $r = T$. This is exactly when $p \conditional (q \lor r)$ is true. Hence, $(p \conditional q) \lor (p \conditional r)$ and $p \conditional (q \lor r)$ are logically equivalent.
416 |
417 | \pagebreak
418 | \section{Exercise 29}
419 | $(p \conditional r) \lor (q \conditional r)$ is true when either $(p \conditional r)$ or $(q \conditional r)$ is true, which means either $p = F$, $q = F$, or $r = T$. This is exactly when $(p \land q) \conditional r$ is true. Hence, $(p \conditional r) \lor (q \conditional r)$ and $(p \land q) \conditional r$ are logically equivalent.
420 |
421 | \pagebreak
422 | \section{Exercise 30}
423 | $\neg p \conditional (q \conditional r)$ is true when either $\neg p$ is false or $(q \conditional r)$ is true, which means that either $p = T$, $q = F$, or $r = T$. This is exactly when $q \conditional (p \lor r)$ is true. Hence, $\neg p \conditional (q \conditional r)$ and $q \implies (p \lor r)$ are logically equivalent.
424 |
425 | \pagebreak
426 | \section{Exercise 31}
427 | $p \biconditional q$ is true when $p$ and $q$ share the same truth value. This is exactly when $(p \conditional q) \land (q \conditional p)$ is true. Hence, $p \biconditional q$ and $(p \conditional q) \land (q \conditional p)$ are logically equivalent.
428 |
429 | \pagebreak
430 | \section{Exercise 32}
431 | $p \biconditional q$ is true when $p$ and $q$ share the same truth value. This is exactly when $\neg p \biconditional \neg q$ is true. Hence, $p \biconditional q$ and $\neg p \biconditional \neg q$ are logically equivalent.
432 |
433 | \pagebreak
434 | \section{Exercise 34}
435 | \begin{align*}
436 | ( & p \lor q) \land (\neg p \lor r) \conditional (q \lor r) & \equiv \\
437 | \neg [( & p \lor q) \land (\neg p \lor r)] \lor (q \lor r) & \equiv \\
438 | [\neg ( & p \lor q) \lor \neg (\neg p \lor r)] \lor (q \lor r) & \equiv \\
439 | [(\neg & p \land \neg q) \lor (p \land \neg r)] \lor (q \lor r) & \equiv \\
440 | (\neg & p \land \neg q) \lor [(q \lor r) \lor (p \land \neg r)] & \equiv \\
441 | (\neg & p \land \neg q) \lor [((q \lor r) \lor p) \land ((q \lor r) \lor \neg r)] & \equiv \\
442 | (\neg & p \land \neg q) \lor [((q \lor r) \lor p) \land T] & \equiv \\
443 | (( & q \lor r) \lor p) \lor (\neg p \land \neg q) & \equiv \\
444 | ((( & q \lor r) \lor p) \lor \neg p) \land (((q \lor r) \lor p) \lor \neg q) & \equiv \\
445 | & T \land T & \equiv \\
446 | & T
447 | \end{align*}
448 |
449 | \end{document}
--------------------------------------------------------------------------------
/LICENSE_CC:
--------------------------------------------------------------------------------
1 | Attribution-NonCommercial-ShareAlike 4.0 International
2 |
3 | =======================================================================
4 |
5 | Creative Commons Corporation ("Creative Commons") is not a law firm and
6 | does not provide legal services or legal advice. Distribution of
7 | Creative Commons public licenses does not create a lawyer-client or
8 | other relationship. Creative Commons makes its licenses and related
9 | information available on an "as-is" basis. Creative Commons gives no
10 | warranties regarding its licenses, any material licensed under their
11 | terms and conditions, or any related information. Creative Commons
12 | disclaims all liability for damages resulting from their use to the
13 | fullest extent possible.
14 |
15 | Using Creative Commons Public Licenses
16 |
17 | Creative Commons public licenses provide a standard set of terms and
18 | conditions that creators and other rights holders may use to share
19 | original works of authorship and other material subject to copyright
20 | and certain other rights specified in the public license below. The
21 | following considerations are for informational purposes only, are not
22 | exhaustive, and do not form part of our licenses.
23 |
24 | Considerations for licensors: Our public licenses are
25 | intended for use by those authorized to give the public
26 | permission to use material in ways otherwise restricted by
27 | copyright and certain other rights. Our licenses are
28 | irrevocable. Licensors should read and understand the terms
29 | and conditions of the license they choose before applying it.
30 | Licensors should also secure all rights necessary before
31 | applying our licenses so that the public can reuse the
32 | material as expected. Licensors should clearly mark any
33 | material not subject to the license. This includes other CC-
34 | licensed material, or material used under an exception or
35 | limitation to copyright. More considerations for licensors:
36 | wiki.creativecommons.org/Considerations_for_licensors
37 |
38 | Considerations for the public: By using one of our public
39 | licenses, a licensor grants the public permission to use the
40 | licensed material under specified terms and conditions. If
41 | the licensor's permission is not necessary for any reason--for
42 | example, because of any applicable exception or limitation to
43 | copyright--then that use is not regulated by the license. Our
44 | licenses grant only permissions under copyright and certain
45 | other rights that a licensor has authority to grant. Use of
46 | the licensed material may still be restricted for other
47 | reasons, including because others have copyright or other
48 | rights in the material. A licensor may make special requests,
49 | such as asking that all changes be marked or described.
50 | Although not required by our licenses, you are encouraged to
51 | respect those requests where reasonable. More considerations
52 | for the public:
53 | wiki.creativecommons.org/Considerations_for_licensees
54 |
55 | =======================================================================
56 |
57 | Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
58 | Public License
59 |
60 | By exercising the Licensed Rights (defined below), You accept and agree
61 | to be bound by the terms and conditions of this Creative Commons
62 | Attribution-NonCommercial-ShareAlike 4.0 International Public License
63 | ("Public License"). To the extent this Public License may be
64 | interpreted as a contract, You are granted the Licensed Rights in
65 | consideration of Your acceptance of these terms and conditions, and the
66 | Licensor grants You such rights in consideration of benefits the
67 | Licensor receives from making the Licensed Material available under
68 | these terms and conditions.
69 |
70 |
71 | Section 1 -- Definitions.
72 |
73 | a. Adapted Material means material subject to Copyright and Similar
74 | Rights that is derived from or based upon the Licensed Material
75 | and in which the Licensed Material is translated, altered,
76 | arranged, transformed, or otherwise modified in a manner requiring
77 | permission under the Copyright and Similar Rights held by the
78 | Licensor. For purposes of this Public License, where the Licensed
79 | Material is a musical work, performance, or sound recording,
80 | Adapted Material is always produced where the Licensed Material is
81 | synched in timed relation with a moving image.
82 |
83 | b. Adapter's License means the license You apply to Your Copyright
84 | and Similar Rights in Your contributions to Adapted Material in
85 | accordance with the terms and conditions of this Public License.
86 |
87 | c. BY-NC-SA Compatible License means a license listed at
88 | creativecommons.org/compatiblelicenses, approved by Creative
89 | Commons as essentially the equivalent of this Public License.
90 |
91 | d. Copyright and Similar Rights means copyright and/or similar rights
92 | closely related to copyright including, without limitation,
93 | performance, broadcast, sound recording, and Sui Generis Database
94 | Rights, without regard to how the rights are labeled or
95 | categorized. For purposes of this Public License, the rights
96 | specified in Section 2(b)(1)-(2) are not Copyright and Similar
97 | Rights.
98 |
99 | e. Effective Technological Measures means those measures that, in the
100 | absence of proper authority, may not be circumvented under laws
101 | fulfilling obligations under Article 11 of the WIPO Copyright
102 | Treaty adopted on December 20, 1996, and/or similar international
103 | agreements.
104 |
105 | f. Exceptions and Limitations means fair use, fair dealing, and/or
106 | any other exception or limitation to Copyright and Similar Rights
107 | that applies to Your use of the Licensed Material.
108 |
109 | g. License Elements means the license attributes listed in the name
110 | of a Creative Commons Public License. The License Elements of this
111 | Public License are Attribution, NonCommercial, and ShareAlike.
112 |
113 | h. Licensed Material means the artistic or literary work, database,
114 | or other material to which the Licensor applied this Public
115 | License.
116 |
117 | i. Licensed Rights means the rights granted to You subject to the
118 | terms and conditions of this Public License, which are limited to
119 | all Copyright and Similar Rights that apply to Your use of the
120 | Licensed Material and that the Licensor has authority to license.
121 |
122 | j. Licensor means the individual(s) or entity(ies) granting rights
123 | under this Public License.
124 |
125 | k. NonCommercial means not primarily intended for or directed towards
126 | commercial advantage or monetary compensation. For purposes of
127 | this Public License, the exchange of the Licensed Material for
128 | other material subject to Copyright and Similar Rights by digital
129 | file-sharing or similar means is NonCommercial provided there is
130 | no payment of monetary compensation in connection with the
131 | exchange.
132 |
133 | l. Share means to provide material to the public by any means or
134 | process that requires permission under the Licensed Rights, such
135 | as reproduction, public display, public performance, distribution,
136 | dissemination, communication, or importation, and to make material
137 | available to the public including in ways that members of the
138 | public may access the material from a place and at a time
139 | individually chosen by them.
140 |
141 | m. Sui Generis Database Rights means rights other than copyright
142 | resulting from Directive 96/9/EC of the European Parliament and of
143 | the Council of 11 March 1996 on the legal protection of databases,
144 | as amended and/or succeeded, as well as other essentially
145 | equivalent rights anywhere in the world.
146 |
147 | n. You means the individual or entity exercising the Licensed Rights
148 | under this Public License. Your has a corresponding meaning.
149 |
150 |
151 | Section 2 -- Scope.
152 |
153 | a. License grant.
154 |
155 | 1. Subject to the terms and conditions of this Public License,
156 | the Licensor hereby grants You a worldwide, royalty-free,
157 | non-sublicensable, non-exclusive, irrevocable license to
158 | exercise the Licensed Rights in the Licensed Material to:
159 |
160 | a. reproduce and Share the Licensed Material, in whole or
161 | in part, for NonCommercial purposes only; and
162 |
163 | b. produce, reproduce, and Share Adapted Material for
164 | NonCommercial purposes only.
165 |
166 | 2. Exceptions and Limitations. For the avoidance of doubt, where
167 | Exceptions and Limitations apply to Your use, this Public
168 | License does not apply, and You do not need to comply with
169 | its terms and conditions.
170 |
171 | 3. Term. The term of this Public License is specified in Section
172 | 6(a).
173 |
174 | 4. Media and formats; technical modifications allowed. The
175 | Licensor authorizes You to exercise the Licensed Rights in
176 | all media and formats whether now known or hereafter created,
177 | and to make technical modifications necessary to do so. The
178 | Licensor waives and/or agrees not to assert any right or
179 | authority to forbid You from making technical modifications
180 | necessary to exercise the Licensed Rights, including
181 | technical modifications necessary to circumvent Effective
182 | Technological Measures. For purposes of this Public License,
183 | simply making modifications authorized by this Section 2(a)
184 | (4) never produces Adapted Material.
185 |
186 | 5. Downstream recipients.
187 |
188 | a. Offer from the Licensor -- Licensed Material. Every
189 | recipient of the Licensed Material automatically
190 | receives an offer from the Licensor to exercise the
191 | Licensed Rights under the terms and conditions of this
192 | Public License.
193 |
194 | b. Additional offer from the Licensor -- Adapted Material.
195 | Every recipient of Adapted Material from You
196 | automatically receives an offer from the Licensor to
197 | exercise the Licensed Rights in the Adapted Material
198 | under the conditions of the Adapter's License You apply.
199 |
200 | c. No downstream restrictions. You may not offer or impose
201 | any additional or different terms or conditions on, or
202 | apply any Effective Technological Measures to, the
203 | Licensed Material if doing so restricts exercise of the
204 | Licensed Rights by any recipient of the Licensed
205 | Material.
206 |
207 | 6. No endorsement. Nothing in this Public License constitutes or
208 | may be construed as permission to assert or imply that You
209 | are, or that Your use of the Licensed Material is, connected
210 | with, or sponsored, endorsed, or granted official status by,
211 | the Licensor or others designated to receive attribution as
212 | provided in Section 3(a)(1)(A)(i).
213 |
214 | b. Other rights.
215 |
216 | 1. Moral rights, such as the right of integrity, are not
217 | licensed under this Public License, nor are publicity,
218 | privacy, and/or other similar personality rights; however, to
219 | the extent possible, the Licensor waives and/or agrees not to
220 | assert any such rights held by the Licensor to the limited
221 | extent necessary to allow You to exercise the Licensed
222 | Rights, but not otherwise.
223 |
224 | 2. Patent and trademark rights are not licensed under this
225 | Public License.
226 |
227 | 3. To the extent possible, the Licensor waives any right to
228 | collect royalties from You for the exercise of the Licensed
229 | Rights, whether directly or through a collecting society
230 | under any voluntary or waivable statutory or compulsory
231 | licensing scheme. In all other cases the Licensor expressly
232 | reserves any right to collect such royalties, including when
233 | the Licensed Material is used other than for NonCommercial
234 | purposes.
235 |
236 |
237 | Section 3 -- License Conditions.
238 |
239 | Your exercise of the Licensed Rights is expressly made subject to the
240 | following conditions.
241 |
242 | a. Attribution.
243 |
244 | 1. If You Share the Licensed Material (including in modified
245 | form), You must:
246 |
247 | a. retain the following if it is supplied by the Licensor
248 | with the Licensed Material:
249 |
250 | i. identification of the creator(s) of the Licensed
251 | Material and any others designated to receive
252 | attribution, in any reasonable manner requested by
253 | the Licensor (including by pseudonym if
254 | designated);
255 |
256 | ii. a copyright notice;
257 |
258 | iii. a notice that refers to this Public License;
259 |
260 | iv. a notice that refers to the disclaimer of
261 | warranties;
262 |
263 | v. a URI or hyperlink to the Licensed Material to the
264 | extent reasonably practicable;
265 |
266 | b. indicate if You modified the Licensed Material and
267 | retain an indication of any previous modifications; and
268 |
269 | c. indicate the Licensed Material is licensed under this
270 | Public License, and include the text of, or the URI or
271 | hyperlink to, this Public License.
272 |
273 | 2. You may satisfy the conditions in Section 3(a)(1) in any
274 | reasonable manner based on the medium, means, and context in
275 | which You Share the Licensed Material. For example, it may be
276 | reasonable to satisfy the conditions by providing a URI or
277 | hyperlink to a resource that includes the required
278 | information.
279 | 3. If requested by the Licensor, You must remove any of the
280 | information required by Section 3(a)(1)(A) to the extent
281 | reasonably practicable.
282 |
283 | b. ShareAlike.
284 |
285 | In addition to the conditions in Section 3(a), if You Share
286 | Adapted Material You produce, the following conditions also apply.
287 |
288 | 1. The Adapter's License You apply must be a Creative Commons
289 | license with the same License Elements, this version or
290 | later, or a BY-NC-SA Compatible License.
291 |
292 | 2. You must include the text of, or the URI or hyperlink to, the
293 | Adapter's License You apply. You may satisfy this condition
294 | in any reasonable manner based on the medium, means, and
295 | context in which You Share Adapted Material.
296 |
297 | 3. You may not offer or impose any additional or different terms
298 | or conditions on, or apply any Effective Technological
299 | Measures to, Adapted Material that restrict exercise of the
300 | rights granted under the Adapter's License You apply.
301 |
302 |
303 | Section 4 -- Sui Generis Database Rights.
304 |
305 | Where the Licensed Rights include Sui Generis Database Rights that
306 | apply to Your use of the Licensed Material:
307 |
308 | a. for the avoidance of doubt, Section 2(a)(1) grants You the right
309 | to extract, reuse, reproduce, and Share all or a substantial
310 | portion of the contents of the database for NonCommercial purposes
311 | only;
312 |
313 | b. if You include all or a substantial portion of the database
314 | contents in a database in which You have Sui Generis Database
315 | Rights, then the database in which You have Sui Generis Database
316 | Rights (but not its individual contents) is Adapted Material,
317 | including for purposes of Section 3(b); and
318 |
319 | c. You must comply with the conditions in Section 3(a) if You Share
320 | all or a substantial portion of the contents of the database.
321 |
322 | For the avoidance of doubt, this Section 4 supplements and does not
323 | replace Your obligations under this Public License where the Licensed
324 | Rights include other Copyright and Similar Rights.
325 |
326 |
327 | Section 5 -- Disclaimer of Warranties and Limitation of Liability.
328 |
329 | a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
330 | EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
331 | AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
332 | ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
333 | IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
334 | WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
335 | PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
336 | ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
337 | KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
338 | ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
339 |
340 | b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
341 | TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
342 | NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
343 | INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
344 | COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
345 | USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
346 | ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
347 | DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
348 | IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
349 |
350 | c. The disclaimer of warranties and limitation of liability provided
351 | above shall be interpreted in a manner that, to the extent
352 | possible, most closely approximates an absolute disclaimer and
353 | waiver of all liability.
354 |
355 |
356 | Section 6 -- Term and Termination.
357 |
358 | a. This Public License applies for the term of the Copyright and
359 | Similar Rights licensed here. However, if You fail to comply with
360 | this Public License, then Your rights under this Public License
361 | terminate automatically.
362 |
363 | b. Where Your right to use the Licensed Material has terminated under
364 | Section 6(a), it reinstates:
365 |
366 | 1. automatically as of the date the violation is cured, provided
367 | it is cured within 30 days of Your discovery of the
368 | violation; or
369 |
370 | 2. upon express reinstatement by the Licensor.
371 |
372 | For the avoidance of doubt, this Section 6(b) does not affect any
373 | right the Licensor may have to seek remedies for Your violations
374 | of this Public License.
375 |
376 | c. For the avoidance of doubt, the Licensor may also offer the
377 | Licensed Material under separate terms or conditions or stop
378 | distributing the Licensed Material at any time; however, doing so
379 | will not terminate this Public License.
380 |
381 | d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
382 | License.
383 |
384 |
385 | Section 7 -- Other Terms and Conditions.
386 |
387 | a. The Licensor shall not be bound by any additional or different
388 | terms or conditions communicated by You unless expressly agreed.
389 |
390 | b. Any arrangements, understandings, or agreements regarding the
391 | Licensed Material not stated herein are separate from and
392 | independent of the terms and conditions of this Public License.
393 |
394 |
395 | Section 8 -- Interpretation.
396 |
397 | a. For the avoidance of doubt, this Public License does not, and
398 | shall not be interpreted to, reduce, limit, restrict, or impose
399 | conditions on any use of the Licensed Material that could lawfully
400 | be made without permission under this Public License.
401 |
402 | b. To the extent possible, if any provision of this Public License is
403 | deemed unenforceable, it shall be automatically reformed to the
404 | minimum extent necessary to make it enforceable. If the provision
405 | cannot be reformed, it shall be severed from this Public License
406 | without affecting the enforceability of the remaining terms and
407 | conditions.
408 |
409 | c. No term or condition of this Public License will be waived and no
410 | failure to comply consented to unless expressly agreed to by the
411 | Licensor.
412 |
413 | d. Nothing in this Public License constitutes or may be interpreted
414 | as a limitation upon, or waiver of, any privileges and immunities
415 | that apply to the Licensor or You, including from the legal
416 | processes of any jurisdiction or authority.
417 |
418 | =======================================================================
419 |
420 | Creative Commons is not a party to its public
421 | licenses. Notwithstanding, Creative Commons may elect to apply one of
422 | its public licenses to material it publishes and in those instances
423 | will be considered the “Licensor.” The text of the Creative Commons
424 | public licenses is dedicated to the public domain under the CC0 Public
425 | Domain Dedication. Except for the limited purpose of indicating that
426 | material is shared under a Creative Commons public license or as
427 | otherwise permitted by the Creative Commons policies published at
428 | creativecommons.org/policies, Creative Commons does not authorize the
429 | use of the trademark "Creative Commons" or any other trademark or logo
430 | of Creative Commons without its prior written consent including,
431 | without limitation, in connection with any unauthorized modifications
432 | to any of its public licenses or any other arrangements,
433 | understandings, or agreements concerning use of licensed material. For
434 | the avoidance of doubt, this paragraph does not form part of the
435 | public licenses.
436 |
437 | Creative Commons may be contacted at creativecommons.org.
438 |
--------------------------------------------------------------------------------
/book/exercises/ch1/ch01_2-sol.tex:
--------------------------------------------------------------------------------
1 | \documentclass{article}
2 | \usepackage[utf8]{inputenc}
3 | \usepackage[T1]{fontenc}
4 | \usepackage{indentfirst, hyperref, gensymb, amsmath, amsthm, wasysym, amsfonts, mathtools, braket, amssymb}
5 | \hypersetup{colorlinks,allcolors=blue,linktoc=all}
6 |
7 | \title{Chapter 1 Section 2 Exercise Solutions}
8 | \author{Samuel Lair}
9 | \date{September 2022}
10 |
11 | \begin{document}
12 |
13 | \maketitle
14 | \tableofcontents
15 |
16 | \pagebreak
17 |
18 | \section{Exercise 1}
19 | \[
20 | \neg a \implies \neg e
21 | \]
22 |
23 | \pagebreak
24 |
25 | \section{Exercise 2}
26 | \[
27 | m \implies e \lor p
28 | \]
29 |
30 | \pagebreak
31 |
32 | \section{Exercise 3}
33 | \[
34 | g \implies r \land \neg m \land \neg b
35 | \]
36 |
37 | \pagebreak
38 |
39 | \section{Exercise 4}
40 | \[
41 | \neg s \implies (d \implies w)
42 | \]
43 |
44 | \pagebreak
45 |
46 | \section{Exercise 5}
47 | \[
48 | e \implies a \land (b \lor p) \land r
49 | \]
50 |
51 | \pagebreak
52 |
53 | \section{Exercise 6}
54 | \[
55 | u \implies (b_{32} \land g_1 \land r_1 \land h_{16}) \lor (b_{64} \land g_2 \land r_2 \land h_{32})
56 | \]
57 |
58 | \pagebreak
59 |
60 | \section{Exercise 7}
61 | \subsection{(a)}
62 | \[
63 | q \implies p
64 | \]
65 | \subsection{(b)}
66 | \[
67 | q \land \neg p
68 | \]
69 | \subsection{(c)}
70 | \[
71 | q \implies p
72 | \]
73 | \subsection{(d)}
74 | \[
75 | \neg q \implies \neg p
76 | \]
77 |
78 | \pagebreak
79 |
80 | \section{Exercise 8}
81 |
82 | \subsection{(a)}
83 | \[
84 | r \land \neg p
85 | \]
86 |
87 | \subsection{(b)}
88 | \[
89 | r \land p \implies q
90 | \]
91 |
92 | \subsection{(c)}
93 | \[
94 | \neg r \implies \neg q
95 | \]
96 | \subsection{(d)}
97 | \[
98 | \neg p \land r \implies q
99 | \]
100 |
101 | \pagebreak
102 |
103 | \section{Exercise 9}
104 | Let
105 | \begin{align*}
106 | p & \Coloneqq \text{"The system is in multiuser state."} \\
107 | q & \Coloneqq \text{"The system is operating normally."} \\
108 | r & \Coloneqq \text{"The kernel is functioning."} \\
109 | s & \Coloneqq \text{"The system is in interrupt mode"}
110 | \end{align*}
111 | Then our system specifications can be expressed as the following system of logical expressions:
112 | \begin{align}
113 | & p \iff q \label{ex9eq1} \\
114 | & q \implies r \label{ex9eq2} \\
115 | & \neg r \lor s \label{ex9eq3} \\
116 | & \neg p \implies s \label{ex9eq4} \\
117 | & \neg s \label{ex9eq5}
118 | \end{align}
119 | In order for \eqref{ex9eq5} to be true, $s$ must be false. Since $s$ is false, $p$ must be true in order for \eqref{ex9eq4} to be true. Since $p$ is true, $q$ must be true in order for \eqref{ex9eq1} to be true. Since $q$ is true, $r$ must be true in order in order for \eqref{ex9eq2} to be true. However, we must conclude that \eqref{ex9eq3} is false since $r$ is true and $s$ is false.
120 |
121 | Therefore, there is no assignment of truth values such that all of our logical expressions are true. Hence, our system specifications are inconsistent.
122 |
123 | \pagebreak
124 |
125 | \section{Exercise 10}
126 | Let
127 | \begin{align*}
128 | p & \Coloneqq \text{"The system software is being upgraded."} \\
129 | q & \Coloneqq \text{"Users can access the file system."} \\
130 | r & \Coloneqq \text{"Users can save new files"}
131 | \end{align*}
132 | Then our system specifications can be expressed as the following system of logical expressions:
133 | \begin{align}
134 | p & \implies \neg q \label{ex10eq1} \\
135 | q & \implies r \label{ex10eq2} \\
136 | \neg r & \implies \neg p \label{ex10eq3}
137 | \end{align}
138 | All of our logical expressions are true if we take $p = true$, $q = false$ and $r = true$. Hence, our system specifications are consistent.
139 |
140 | \pagebreak
141 |
142 | \section{Exercise 11}
143 | Let
144 | \begin{align*}
145 | p & \Coloneqq \text{"The router can send packets to the edge system."} \\
146 | q & \Coloneqq \text{"The router supports the new address space."} \\
147 | r & \Coloneqq \text{"The latest software release is installed."}
148 | \end{align*}
149 | Then our system specifications can be expressed as the following system of logical expressions:
150 | \begin{align}
151 | & p \implies q \label{ex11eq1} \\
152 | & q \implies r \label{ex11eq2} \\
153 | & r \implies p \label{ex11eq3} \\
154 | & \neg q \label{ex11eq4}
155 | \end{align}
156 | All of our logical expressions are true if we take $p = false$, $q = false$, and $r = false$. Hence, our system specifications are consistent.
157 |
158 | \pagebreak
159 |
160 | \section{Exercise 12}
161 | Let
162 | \begin{align*}
163 | p & \Coloneqq \text{"The file system is locked."} \\
164 | q & \Coloneqq \text{"New messages will be queued."} \\
165 | r & \Coloneqq \text{"The system is functioning normally."} \\
166 | s & \Coloneqq \text{"New messages will be sent to the message buffer."}
167 | \end{align*}
168 | Then our system specifications can be expressed as the following system of logical expressions:
169 | \begin{align}
170 | & \neg p \implies q \label{ex12eq1} \\
171 | & \neg p \iff r \label{ex12eq2} \\
172 | & \neg q \implies s \label{ex12eq3} \\
173 | & \neg p \implies s \label{ex12eq4} \\
174 | & \neg s \label{ex12eq5}
175 | \end{align}
176 | In order for \eqref{ex12eq5} to be true, s must be false. Since s is false, p must be true in order for \eqref{ex12eq4} to be true. Since s is false, q must be true in order for \eqref{ex12eq3} to be true. However, since p is false and q is false, we must conclude that \eqref{ex12eq1} is false.
177 |
178 | All of our logical expressions are true if we take $p = true$, $q = true$, $r = false$, and $s = false$. Hence, our system specifications are consistent.
179 |
180 | \pagebreak
181 |
182 | \section{Exercise 13}
183 | \subsection{(a)}
184 | beaches AND New AND Jersey
185 | \subsection{(b)}
186 | (beaches AND Jersey) NOT New
187 |
188 | \pagebreak
189 |
190 | \section{Exercise 14}
191 | \subsection{(a)}
192 | hiking AND West AND Virginia
193 | \subsection{(b)}
194 | (hiking AND Virginia) NOT West
195 |
196 | \pagebreak
197 |
198 | \section{Exercise 15}
199 | Ethiopian AND restaurant AND New AND (York OR Jersey)
200 |
201 | \pagebreak
202 |
203 | \section{Exercise 16}
204 | (men AND (shoes or boots)) NOT work
205 |
206 | \pagebreak
207 |
208 | \section{Exercise 17}
209 | \subsection{(a)}
210 | The statement that "All of the inscriptions are false" is equivalent to the propositional expression:
211 | \[
212 | \neg p_3 \land \neg p_1 \land \neg (\neg p_3) \equiv \neg p_1 \land \neg p_3 \land p_3 \equiv \neg p_1 \land F \equiv F
213 | \]
214 | Therefore, the Queen who never lies cannot make this statement.
215 |
216 | \subsection{(b)}
217 | The statement that "Exactly one of the inscriptions is true" is equivalent to the propositional expression:
218 | \begin{align*}
219 | & (p_3 \land \neg p_1 \land \neg (\neg p_3)) \lor (\neg p_3 \land p_1 \land \neg (\neg p_3)) \lor (\neg p_3 \land \neg p_1 \land \neg p_3) & \equiv \\
220 | & (p_3 \land \neg p_1) \lor (\neg p_3 \land \neg p_1)
221 | \end{align*}
222 | The Queen who never lies could make this statement if the treasure is in either Trunk 3 or Trunk 2.
223 |
224 | \subsection{(c)}
225 | The statement that "Exactly two of the inscriptions are true" is equivalent to the propositional expression:
226 | \begin{align*}
227 | & (p_3 \land p_1 \land \neg (\neg p_3)) \lor (p_3 \land \neg p_1 \land \neg p_3) \lor (\neg p_3 \land p_1 \land \neg p3) & \equiv \\
228 | & (p_3 \land p_1) \lor (\neg p_3 \land p_1)
229 | \end{align*}
230 | The Queen who never lies could make this statement. If we assume that the treasure cannot be in multiple trunks, we can conclude that the treasure is in Trunk 1.
231 |
232 | \subsection{(d)}
233 | The statement that "All three inscriptions are true" is equivalent to the propositional expression:
234 | \begin{align*}
235 | & p_3 \land p_1 \land \neg p_3 \equiv p_1 \land p_3 \land \neg p_3 \equiv p_1 \land F \equiv F
236 | \end{align*}
237 | The Queen who never lies cannot make this statement.
238 |
239 | \pagebreak
240 |
241 | \section{Exercise 18}
242 | \subsection{(a)}
243 | The statement that "All of the inscriptions are false" is equivalent to the propositional expression:
244 |
245 | \[
246 | \neg (\neg p_1) \land \neg p_1 \land \neg p_2 \equiv p_1 \land \neg p_1 \land \neg p_2 \equiv F \land \neg p_2 \equiv F
247 | \]
248 | Therefore, the Queen who never lies cannot make this statement.
249 |
250 | \subsection{(b)}
251 | The statement that "Exactly one of the inscriptions is true" is equivalent to the propositional expression:
252 | \begin{align*}
253 | & (\neg p_1 \land \neg p_1 \land \neg p_2) \lor (\neg (\neg p_1) \land p_1 \land \neg p_2) \lor (\neg (\neg p_1) \land \neg p_1 \land p_2) & \equiv \\
254 | & (\neg p_1 \land p_2) \lor (p_1 \land \neg p_2)
255 | \end{align*}
256 | The Queen who never lies could make this statement if the treasure is in either Trunk 2 or Trunk 1.
257 |
258 | \subsection{(c)}
259 | The statement that "Exactly two of the inscriptions are true" is equivalent to the propositional expression:
260 | \begin{align*}
261 | & (\neg p_1 & p_1 & \neg p_2) \lor (\neg p1 \land \neg p_1 \land p_2) \lor (\neg (\neg p1) \land p_1 \land p_2) & \equiv \\
262 | & (\neg p_1 \land p_2) \lor (p_1 \land p_2)
263 | \end{align*}
264 | The Queen who never lies could make this statement. If we assume that the treasure cannot be in multiple trunks, we can conclude that the treasure is in Trunk 2.
265 |
266 | \subsection{(d)}
267 | The statement that "All three inscriptions are true" is equivalent to the propositional expression:
268 | \[
269 | \neg p_1 \land p_1 \land p_2 \equiv F \land p_2 \equiv F
270 | \]
271 | Therefore, the Queen who never lies cannot make this statement.
272 |
273 | \pagebreak
274 |
275 | \section{Exercise 19}
276 | Let
277 | \begin{align*}
278 | p & \Coloneqq \text{"The left fork leads to the ruins."} \\
279 | q & \Coloneqq \text{"The villager always tells the truth."}
280 | \end{align*}
281 |
282 | Suppose we ask a straightfoward question like:
283 | \begin{equation}\label{ex19eq1}
284 | \text{"Does the left fork lead to the ruins?"}
285 | \end{equation}
286 |
287 | This question is equivalent to the following propositional expression:
288 | \begin{equation}\label{ex19eq1p}
289 | (p \land q) \lor (\neg p \land \neg q)
290 | \end{equation}
291 |
292 | In other words, the truth table for \eqref{ex19eq1} is as follows:
293 | \[
294 | \begin{array}{|c|c|c|}
295 | p & q & \eqref{ex19eq1p} \\
296 | \hline
297 | T & T & T \\
298 | T & F & F \\
299 | F & T & F \\
300 | F & F & T
301 | \end{array}
302 | \]
303 |
304 | This is problematic since we want the truth value of our question to match the truth value of p regardless of the truth value of q. We can achieve this by making the liar lie about his answer to \eqref{ex19eq1}. Due to the double negation rule, a lie about a lie will be equal to the truth. Therefore, the question we will actually ask is:
305 |
306 | \begin{equation}\label{ex19eq2}
307 | \text{"If I were to ask you about whether the left fork leads to the ruins, would you say yes?"}
308 | \end{equation}
309 |
310 | The truth table for \eqref{ex19eq2} is as follows:
311 | \[
312 | \begin{array}{|c|c|r c|}
313 | p & q & & \eqref{ex19eq2} \\
314 | \hline
315 | T & T & \eqref{ex19eq1} \equiv & T \\
316 | T & F & \neg \eqref{ex19eq1} \equiv & T \\
317 | F & T & \eqref{ex19eq1} \equiv & F \\
318 | F & F & \neg \eqref{ex19eq1} \equiv & F
319 | \end{array}
320 | \]
321 |
322 | The truth value of \eqref{ex19eq2} matches $p$ as desired, allowing us to infer which fork leads to the ruins.
323 |
324 | \pagebreak
325 |
326 | \section{Exercise 20}
327 | \subsection{(a)}
328 | The question "Are you a liar?" does not work because both types of cannibals will answer no. The cannibals who always tell the truth will answer no because that is the truth. The cannibals who always lie will answer no because that is the lie.
329 |
330 | \subsection{(b)}
331 | Similar to Exercise 19, the explorer needs to make the liars lie about a lie. Therefore, the explorer should ask: "If I were to ask you whether you are a liar, would you say yes?"
332 |
333 | \pagebreak
334 |
335 | \section{Exercise 21}
336 | From the first professor's response, we can infer that he wants coffee but does not know whether the other two professors want coffee. From the second professor's response, we can infer that he wants coffee but does not know whether the third professor wants coffee. From the third professor's response, we can infer that he does not want coffee.
337 |
338 | Therefore, the hostess gives coffee to the first and second professors.
339 |
340 | \pagebreak
341 |
342 | \section{Exercise 22}
343 | Let
344 | \begin{align*}
345 | j & \Coloneqq \text{"Jasmine attends."} \\
346 | s & \Coloneqq \text{"Samir attends."} \\
347 | k & \Coloneqq \text{"Kanti attends."}
348 | \end{align*}
349 |
350 | In order for noone to be unhappy, we must satisfy the following system specifications:
351 | \begin{align}
352 | j & \implies \neg s \label{ex22eq1} \\
353 | s & \implies k \label{ex22eq2} \\
354 | \neg j & \implies \neg k \label{ex22eq3}
355 | \end{align}
356 |
357 | Suppose that Jasmine attends. From \eqref{ex22eq1}, Samir cannot also attend. Our specifications are satisfied regardless of whether Kanti attends.
358 |
359 | Now suppose that Jasmine doesn't attend. From \eqref{ex22eq3}, Kanti also doesn't attend. Finally, from \eqref{ex22eq2}, Samir also doesn't attend.
360 |
361 | Hence, we can invite either Jasmine alone, both Jasmine and Kanti, or none of the three.
362 |
363 | \pagebreak
364 |
365 | \section{Exercise 23}
366 | Let
367 | \begin{align*}
368 | & p \Coloneqq \text{"A is a knight."} \\
369 | & q \Coloneqq \text{"B is a knight."}
370 | \end{align*}
371 | Then A's statement is equivalent to the propositional expression:
372 | \[
373 | R \Coloneqq \neg p \lor \neg q
374 | \]
375 |
376 | First, let us consider the case where A is a knave. Then $\neg p$ is true and A's statement is false. We could informally reason that the negation of A's statement is "Neither of us is knave" or $p \land q$. However, let us try a more formal approach by applying De Morgan's Law for OR:
377 |
378 | \begin{align*}
379 | & \neg R & \equiv \\
380 | & \neg (\neg p \lor \neg q) & \equiv \\
381 | & p \land q
382 | \end{align*}
383 | Therefore, we've contradicted our assumption that $\neg p$ is true.
384 |
385 | Next, let us consider the case where A is a knight. Then $p$ is true and A's statement is true. In order for $R$ to evaluate to true, $\neg q$ must be true. I.e. B is a knave.
386 |
387 | Hence, we conclude that A is a knight and B is a knave.
388 |
389 | \pagebreak
390 |
391 | \section{Exercise 24}
392 | The case where A is a knight is equivalent to the following system specifications:
393 | \begin{align*}
394 | & p \\
395 | & p \land q \\
396 | & (\neg p \land q) \lor (p \land \neg q)
397 | \end{align*}
398 | These specifications are inconsistent. In order for the first two expressions to be true, $p$ must be true and $q$ must be true. However, these truth value assignments result in the third expression evaluating to false.
399 |
400 | The case where A is a knave is equivalent to the following system specifications:
401 | \begin{align*}
402 | & \neg p \\
403 | & \neg (p \land q) \equiv \neg p \lor \neg q \\
404 | & (\neg p \land q) \lor (p \land \neg q)
405 | \end{align*}
406 | These specifications are all satisfied for $p = F$ and $q = T$.
407 |
408 | Hence, we conclude that A is a knave and B is a knight.
409 |
410 | \pagebreak
411 |
412 | \section{Exercise 25}
413 | The case where A is a knight is equivalent to the following system specifications:
414 | \begin{align*}
415 | & p \\
416 | & \neg p \lor q
417 | \end{align*}
418 | These specifications are all satisfied for $p = T$ and $q = T$.
419 |
420 | The case where A is a knave is equivalent to the following system specifications:
421 | \begin{align*}
422 | & \neg p \\
423 | & \neg (\neg p \lor q) \equiv p \land \neg q
424 | \end{align*}
425 | These specifications are inconsistent. In order for the first expression to be true, $p$ must be false. However, this truth value assignment results in the second expression evaluating to false regardless of the value for $q$.
426 |
427 | Hence, we conclude that A is a knight and B is a knight.
428 |
429 | \pagebreak
430 |
431 | \section{Exercise 26}
432 | Let $R$ be the logical expression equivalent to A's statement:
433 | \[
434 | R \Coloneqq p
435 | \]
436 |
437 | Let $S$ be the logical expression equivalent to B's statement:
438 | \[
439 | S \Coloneqq q
440 | \]
441 |
442 | This scenario is equivalent to the system specifications:
443 | \begin{align*}
444 | & (R \land p) \lor (\neg R \land \neg p) \equiv p \lor \neg p \equiv T \\
445 | & (S \land q) \lor (\neg S \land \neg q) \equiv q \lor \neg q \equiv T
446 | \end{align*}
447 |
448 | Any truth value assignment will satisfy all of the specifications.
449 |
450 | Hence, we conclude that we cannot draw any conclusions in this scenario. $A$ can be either a knight or a knave independent of the status of $B$. $B$ can be either a knight or a knave independent of the status of $A$.
451 |
452 | \pagebreak
453 |
454 | \section{Exercise 27}
455 | Let $R$ be the logical expression equivalent to A's statement:
456 | \[
457 | \neg p \land \neg q
458 | \]
459 |
460 | This scenario is equivalent to the logical expression:
461 | \begin{align*}
462 | & (R \land p) \lor (\neg R \land \neg p) & \equiv \\
463 | & (\neg p \land \neg q \land p) \lor (\neg (\neg p \land \neg q) \land \neg p) & \equiv \\
464 | & (p \land \neg p \land \neg q) \lor ((p \lor q) \land \neg p) & \equiv \\
465 | & (F \land \neg q) \lor ((\neg p \land p) \lor (\neg p \land q)) & \equiv \\
466 | & F \lor (\neg p \land q) & \equiv \\
467 | & \neg p \land q
468 | \end{align*}
469 |
470 | Hence, we conclude that $A$ is a knave and $B$ is a knight.
471 |
472 | \pagebreak
473 |
474 | \section{Exercise 28}
475 | Brute forcing knight, knave, and spy problems using logical formalism can get quite complicated as we need at least 4 propositional variables to uniquely express who is the knight, who is the knave, and who is the spy. Therefore, for exercises 28-35, we'll try to simplify the problem by applying the constraints before possibly resorting to logical expressions.
476 |
477 | $B$ cannot be the knight since then we would have two knights. If $C$ is the knight, then $C$'s statement would result in a contradiction. Therefore, $C$ isn't the knight either. $A$ must the knight.
478 |
479 | Hence, we conclude that $A$ is the knight, $B$ is the spy, and $C$ is the knave.
480 |
481 | \pagebreak
482 |
483 | \section{Exercise 29}
484 | $C$ cannot be the knight since then we would have two knights. If $B$ is the knight, then $B$'s statement would result in a contradiction. Therefore, $B$ isn't the knight either. $A$ must be the knight.
485 | Now suppose that $B$ is the knave. Then $B$'s statement would be false, resulting in a contradiction. Therefore, $B$ must be the spy.
486 |
487 | Hence, we conclude that $A$ is the knight, $B$ is the spy, and $C$ is the knave.
488 |
489 | \pagebreak
490 |
491 | \section{Exercise 30}
492 | This scenario is a paradox since it requires the knight to lie. I.e. there is no solution.
493 |
494 | \pagebreak
495 |
496 | \section{Exercise 31}
497 | If either $B$ or $C$ is the knight, then their respective statements results in a contradiction. $A$ must be the knight. Since this means that $B$'s statement is also true, $B$ must be the spy.
498 |
499 | Hence, we conclude that $A$ is the knight, $B$ is the spy, and $C$ is the knave.
500 |
501 | \pagebreak
502 |
503 | \section{Exercise 32}
504 | Suppose that $A$ is the knight. Then $B$'s statement is also true so $B$ is the spy. However, this also makes $C$'s statement true and we reach a contradiction since there is no knave. Therefore, $A$ isn't the knight.
505 |
506 | Suppose that $A$ is spy. Then B's statement is true so $B$ is the knight. However, this also makes $C$'s statement true and we reach a contradiction since there is no knave. Therefore, $A$ isn't the spy.
507 |
508 | Suppose that $A$ is the knave. Then B's statement is false so $B$ is the spy. $C$'s statement is true so $C$ is the knight.
509 |
510 | Hence, we conclude that $A$ is the knave, $B$ is the spy, and $C$ is the knight.
511 |
512 | \pagebreak
513 |
514 | \section{Exercise 33}
515 | These statements don't allow us to eliminate any solutions. I.e. all 6 permutations of knight, knave, and spy are possible in this scenario.
516 |
517 | \pagebreak
518 |
519 | \section{Exercise 34}
520 | Suppose that $C$ is the knight. Then $A$ is the spy and $B$ is the knave.
521 |
522 | Suppose that $C$ is the knave. Then C's statement is true, resulting in a contradiction.
523 |
524 | Suppose that $C$ is the spy. Then either $A$ or $B$ must be the knave. This results in a contradiction since the knave's statement is true.
525 |
526 | Hence, we conclude that $A$ is the spy, $B$ is the knave, and $C$ is the knight.
527 |
528 | \pagebreak
529 |
530 | \section{Exercise 35}
531 | This scenario is a paradox since it requires the knave to tell the truth. I.e. there is no solution.
532 |
533 | \pagebreak
534 |
535 | \section{Exercise 36}
536 |
537 | \subsection{(a)}
538 |
539 | If we assume that Jones is innocent, then his statement is true. Jones's statement implies that Smith's statement is false. Therefore, Smith is guilty. We can assume that Williams's statement is true without contradicting Jones's statement or the conclusion that Smith is guilty. In this case, we conclude that Smith is guilty and Jones and Williams are innocent.
540 |
541 | If we assume that Jones is guilty, then both Smith's and Williams's statements can be true without contradicting each other. In this case, we conclude that Jones is guilty and Smith and Williams are innocent.
542 |
543 | Hence, we cannot determine who the murderer is. We need additional information. For example, if one cannot both be with Cooper and out of town on the day of the killing, then we can conclude that Jones is the murderer since his statement would now contradicts those of both Smith and Williams.
544 |
545 | (In all honesty, this a probably a sloppily worded question where the author intended for Jones's statement to contradict Williams's statement, leading to the conclusion that Jones is guilty.)
546 |
547 | \subsection{(b)}
548 | We have even less information than in part (a). We cannot determine who the murderer is. Even if one cannot both be with Cooper and out of town on the day of the killing, we still cannot determine who the murderer(s) is/are since there could be multiple murderers.
549 |
550 | \pagebreak
551 |
552 | \section{Exercise 37}
553 | Let
554 | \begin{align*}
555 | f & \Coloneqq \text{"Fred is the highest paid."} \\
556 | j & \Coloneqq \text{"Janice is the highest paid."} \\
557 | k & \Coloneqq \text{"Janice is the lowest paid."} \\
558 | m & \Coloneqq \text{"Maggie is the highest paid."}
559 | \end{align*}
560 |
561 | Then the known facts are equivalent to the following system specifications:
562 | \begin{align}
563 | j & \implies \neg k \label{ex37eq1} \\
564 | k & \implies \neg j \label{ex37eq2} \\
565 | f & \implies \neg j \label{ex37eq3} \\
566 | f & \implies \neg m \label{ex37eq4} \\
567 | j & \implies \neg f \label{ex37eq5} \\
568 | j & \implies \neg m \label{ex37eq6} \\
569 | m & \implies \neg f \label{ex37eq7} \\
570 | m & \implies \neg j \label{ex37eq8} \\
571 | \neg f & \implies j \label{ex37eq9} \\
572 | \neg k & \implies m \label{ex37eq10}
573 | \end{align}
574 |
575 | Suppose that $f = T$. From \eqref{ex37eq3}, $j = F$. From \eqref{ex37eq4}, $m = F$. From \eqref{ex37eq10}, $k = T$. Therefore, Fred > Maggie > Janice in this case.
576 |
577 | Suppose that $f = F$. From \eqref{ex37eq9}, $j = T$. From \eqref{ex37eq1}, $k = F$. From \eqref{ex37eq10}, $m = T$. However, this contradicts both \eqref{ex37eq6} and \eqref{ex37eq8}. I.e. Janice and Maggie cannot both be the highest paid.
578 |
579 | Hence, we conclude that Fred is the highest paid, Janice is the lowest paid, and Maggie's pay is between that of Fred and Janice.
580 |
581 | \pagebreak
582 |
583 | \section{Exercise 38}
584 | Let
585 | \begin{align*}
586 | k & \Coloneqq \text{"Kevin is chatting."} \\
587 | h & \Coloneqq \text{"Heather is chatting."} \\
588 | r & \Coloneqq \text{"Randy is chatting."} \\
589 | v & \Coloneqq \text{"Vijay is chatting."} \\
590 | a & \Coloneqq \text{"Abby is chatting."}
591 | \end{align*}
592 |
593 | Our scenario is equivalent to the following system specifications:
594 |
595 | \begin{align}
596 | & k \lor h \label{ex38eq1} \\
597 | & r \oplus v \label{ex38eq2} \\
598 | & a \implies r \label{ex38eq3} \\
599 | & v \iff k \label{ex38eq4} \\
600 | & h \implies a \land k \label{ex38eq5}
601 | \end{align}
602 |
603 | Suppose that $v = T$. From \eqref{ex38eq4}, $k = T$. From \eqref{ex38eq2}, $r = F$. From \eqref{ex38eq3}, $a = F$. From \eqref{ex38eq5}, $h = F$. $\eqref{ex38eq1} = T$ since $k = T$.
604 |
605 | Suppose that $v = F$. From \eqref{ex38eq4}, $k = F$. From \eqref{ex38eq5}, $h = F$. However, this a contradiction since $\eqref{ex38eq1} = F$.
606 |
607 | Hence, we conclude that Kevin and Vijay are chatting while Heather, Randy and Abby are not chatting.
608 |
609 | \pagebreak
610 |
611 | \section{Exercise 39}
612 | Let
613 | \begin{align*}
614 | b & \Coloneqq \text{"The butler is telling the truth."} \\
615 | c & \Coloneqq \text{"The cook is telling the truth."} \\
616 | g & \Coloneqq \text{"The gardener is telling the truth."} \\
617 | h & \Coloneqq \text{"The handyman is telling the truth."}
618 | \end{align*}
619 |
620 | Our facts are equivalent to the following system specifications:
621 | \begin{align}
622 | b & \implies c \label{ex39eq1} \\
623 | c & \implies \neg g \label{ex39eq2} \\
624 | g & \implies \neg c \label{ex39eq3} \\
625 | \neg g & \implies h \label{ex39eq4} \\
626 | \neg h & \implies g \label{ex39eq5} \\
627 | h & \implies \neg c \label{ex39eq6}
628 | \end{align}
629 |
630 | Suppose that $b = T$. From \eqref{ex39eq1}, $c = T$. From \eqref{ex39eq2}, $g = F$. From \eqref{ex39eq4}, $h = T$. However, \eqref{ex39eq6} leads us to a contradiction where $c = F$.
631 |
632 | Suppose that $b = F$. We must also take $c = F$ to avoid the previous contradiction. If we take $g = T$, $h$ can be either true or false without reaching a contradiction. If we take $g = F$, then \eqref{ex39eq4} requires that $h = T$. This doesn't lead to any contradictions either.
633 |
634 | Hence, we can conclude that the butler and cook are lying. However, we cannot determine whether the gardener is telling the truth or whether the handyman is telling the truth.
635 |
636 | \pagebreak
637 |
638 | \section{Exercise 40}
639 |
640 | \subsection{(a)}
641 |
642 | Suppose Alice is telling the truth. Then we reach a contradiction where John is also telling the truth.
643 |
644 | Suppose that John is telling the truth. Then we reach a contradiction where either Carlos or Diana is also telling the truth. Since we can conclude that John's statement is false, we now know that he did it. However, let's also see if we can figure out who is telling the truth.
645 |
646 | Suppose that Carlos is telling the truth. This contradicts the fact that John's statement is false.
647 |
648 | Suppose that Diana is telling the truth. There is no contradiction in this case.
649 |
650 | Therefore, Diana is telling the truth while the other three are lying. Hence, we conclude that John accessed the computer system without authorization since his statement is false.
651 |
652 | \subsection{(b)}
653 | Alice's and Carlos's statements cannot both be true since they implicate different people. Also, if Diana's statement is true, then Carlos's statement is false.
654 |
655 | Suppose that Carlos's statement is true. Then we reach a contradiction where both Alice's and Diana's statements are false. Therefore, Carlos's statement is false while the other three are true.
656 |
657 | Hence, we conclude that Carlos accessed the computer system without authorization since Alice's statement is true.
658 |
659 | \pagebreak
660 |
661 | \section{Exercise 41}
662 | If the sign on the first door is true, then the sign on the second door is true as well. Since we know that exactly one sign is true, the sign on the first door must be false and the sign on the second door must be true.
663 |
664 | Hence, the lady is in the second room and the tiger is in the first room.
665 |
666 | \pagebreak
667 |
668 | \section{Exercise 43}
669 | If more than one senator is honest, then there exists a pair of senators such that both are honest (i.e. neither is corrupt). This contradicts the requirement that "given any two Freedonian senators, at least one is corrupt."
670 |
671 | Hence we conclude that one senator is honest and the other 49 are corrupt.
672 |
673 | \pagebreak
674 |
675 | \section{Exercise 44}
676 | \subsection{(a)}
677 | \[
678 | \neg p \lor \neg q
679 | \]
680 | \subsection{(b)}
681 | \[
682 | \neg (p \lor (\neg p \land q))
683 | \]
684 |
685 | \pagebreak
686 |
687 | \section{Exercise 45}
688 | \subsection{(a)}
689 | \[
690 | \neg (p \land (q \lor \neg r))
691 | \]
692 |
693 | \subsection{(b)}
694 | \[
695 | (\neg p \land \neg q) \lor (p \land r)
696 | \]
697 |
698 | \end{document}
699 |
700 |
--------------------------------------------------------------------------------
/LICENSE_GNU:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for
11 | software and other kinds of works.
12 |
13 | The licenses for most software and other practical works are designed
14 | to take away your freedom to share and change the works. By contrast,
15 | the GNU General Public License is intended to guarantee your freedom to
16 | share and change all versions of a program--to make sure it remains free
17 | software for all its users. We, the Free Software Foundation, use the
18 | GNU General Public License for most of our software; it applies also to
19 | any other work released this way by its authors. You can apply it to
20 | your programs, too.
21 |
22 | When we speak of free software, we are referring to freedom, not
23 | price. Our General Public Licenses are designed to make sure that you
24 | have the freedom to distribute copies of free software (and charge for
25 | them if you wish), that you receive source code or can get it if you
26 | want it, that you can change the software or use pieces of it in new
27 | free programs, and that you know you can do these things.
28 |
29 | To protect your rights, we need to prevent others from denying you
30 | these rights or asking you to surrender the rights. Therefore, you have
31 | certain responsibilities if you distribute copies of the software, or if
32 | you modify it: responsibilities to respect the freedom of others.
33 |
34 | For example, if you distribute copies of such a program, whether
35 | gratis or for a fee, you must pass on to the recipients the same
36 | freedoms that you received. You must make sure that they, too, receive
37 | or can get the source code. And you must show them these terms so they
38 | know their rights.
39 |
40 | Developers that use the GNU GPL protect your rights with two steps:
41 | (1) assert copyright on the software, and (2) offer you this License
42 | giving you legal permission to copy, distribute and/or modify it.
43 |
44 | For the developers' and authors' protection, the GPL clearly explains
45 | that there is no warranty for this free software. For both users' and
46 | authors' sake, the GPL requires that modified versions be marked as
47 | changed, so that their problems will not be attributed erroneously to
48 | authors of previous versions.
49 |
50 | Some devices are designed to deny users access to install or run
51 | modified versions of the software inside them, although the manufacturer
52 | can do so. This is fundamentally incompatible with the aim of
53 | protecting users' freedom to change the software. The systematic
54 | pattern of such abuse occurs in the area of products for individuals to
55 | use, which is precisely where it is most unacceptable. Therefore, we
56 | have designed this version of the GPL to prohibit the practice for those
57 | products. If such problems arise substantially in other domains, we
58 | stand ready to extend this provision to those domains in future versions
59 | of the GPL, as needed to protect the freedom of users.
60 |
61 | Finally, every program is threatened constantly by software patents.
62 | States should not allow patents to restrict development and use of
63 | software on general-purpose computers, but in those that do, we wish to
64 | avoid the special danger that patents applied to a free program could
65 | make it effectively proprietary. To prevent this, the GPL assures that
66 | patents cannot be used to render the program non-free.
67 |
68 | The precise terms and conditions for copying, distribution and
69 | modification follow.
70 |
71 | TERMS AND CONDITIONS
72 |
73 | 0. Definitions.
74 |
75 | "This License" refers to version 3 of the GNU General Public License.
76 |
77 | "Copyright" also means copyright-like laws that apply to other kinds of
78 | works, such as semiconductor masks.
79 |
80 | "The Program" refers to any copyrightable work licensed under this
81 | License. Each licensee is addressed as "you". "Licensees" and
82 | "recipients" may be individuals or organizations.
83 |
84 | To "modify" a work means to copy from or adapt all or part of the work
85 | in a fashion requiring copyright permission, other than the making of an
86 | exact copy. The resulting work is called a "modified version" of the
87 | earlier work or a work "based on" the earlier work.
88 |
89 | A "covered work" means either the unmodified Program or a work based
90 | on the Program.
91 |
92 | To "propagate" a work means to do anything with it that, without
93 | permission, would make you directly or secondarily liable for
94 | infringement under applicable copyright law, except executing it on a
95 | computer or modifying a private copy. Propagation includes copying,
96 | distribution (with or without modification), making available to the
97 | public, and in some countries other activities as well.
98 |
99 | To "convey" a work means any kind of propagation that enables other
100 | parties to make or receive copies. Mere interaction with a user through
101 | a computer network, with no transfer of a copy, is not conveying.
102 |
103 | An interactive user interface displays "Appropriate Legal Notices"
104 | to the extent that it includes a convenient and prominently visible
105 | feature that (1) displays an appropriate copyright notice, and (2)
106 | tells the user that there is no warranty for the work (except to the
107 | extent that warranties are provided), that licensees may convey the
108 | work under this License, and how to view a copy of this License. If
109 | the interface presents a list of user commands or options, such as a
110 | menu, a prominent item in the list meets this criterion.
111 |
112 | 1. Source Code.
113 |
114 | The "source code" for a work means the preferred form of the work
115 | for making modifications to it. "Object code" means any non-source
116 | form of a work.
117 |
118 | A "Standard Interface" means an interface that either is an official
119 | standard defined by a recognized standards body, or, in the case of
120 | interfaces specified for a particular programming language, one that
121 | is widely used among developers working in that language.
122 |
123 | The "System Libraries" of an executable work include anything, other
124 | than the work as a whole, that (a) is included in the normal form of
125 | packaging a Major Component, but which is not part of that Major
126 | Component, and (b) serves only to enable use of the work with that
127 | Major Component, or to implement a Standard Interface for which an
128 | implementation is available to the public in source code form. A
129 | "Major Component", in this context, means a major essential component
130 | (kernel, window system, and so on) of the specific operating system
131 | (if any) on which the executable work runs, or a compiler used to
132 | produce the work, or an object code interpreter used to run it.
133 |
134 | The "Corresponding Source" for a work in object code form means all
135 | the source code needed to generate, install, and (for an executable
136 | work) run the object code and to modify the work, including scripts to
137 | control those activities. However, it does not include the work's
138 | System Libraries, or general-purpose tools or generally available free
139 | programs which are used unmodified in performing those activities but
140 | which are not part of the work. For example, Corresponding Source
141 | includes interface definition files associated with source files for
142 | the work, and the source code for shared libraries and dynamically
143 | linked subprograms that the work is specifically designed to require,
144 | such as by intimate data communication or control flow between those
145 | subprograms and other parts of the work.
146 |
147 | The Corresponding Source need not include anything that users
148 | can regenerate automatically from other parts of the Corresponding
149 | Source.
150 |
151 | The Corresponding Source for a work in source code form is that
152 | same work.
153 |
154 | 2. Basic Permissions.
155 |
156 | All rights granted under this License are granted for the term of
157 | copyright on the Program, and are irrevocable provided the stated
158 | conditions are met. This License explicitly affirms your unlimited
159 | permission to run the unmodified Program. The output from running a
160 | covered work is covered by this License only if the output, given its
161 | content, constitutes a covered work. This License acknowledges your
162 | rights of fair use or other equivalent, as provided by copyright law.
163 |
164 | You may make, run and propagate covered works that you do not
165 | convey, without conditions so long as your license otherwise remains
166 | in force. You may convey covered works to others for the sole purpose
167 | of having them make modifications exclusively for you, or provide you
168 | with facilities for running those works, provided that you comply with
169 | the terms of this License in conveying all material for which you do
170 | not control copyright. Those thus making or running the covered works
171 | for you must do so exclusively on your behalf, under your direction
172 | and control, on terms that prohibit them from making any copies of
173 | your copyrighted material outside their relationship with you.
174 |
175 | Conveying under any other circumstances is permitted solely under
176 | the conditions stated below. Sublicensing is not allowed; section 10
177 | makes it unnecessary.
178 |
179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180 |
181 | No covered work shall be deemed part of an effective technological
182 | measure under any applicable law fulfilling obligations under article
183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184 | similar laws prohibiting or restricting circumvention of such
185 | measures.
186 |
187 | When you convey a covered work, you waive any legal power to forbid
188 | circumvention of technological measures to the extent such circumvention
189 | is effected by exercising rights under this License with respect to
190 | the covered work, and you disclaim any intention to limit operation or
191 | modification of the work as a means of enforcing, against the work's
192 | users, your or third parties' legal rights to forbid circumvention of
193 | technological measures.
194 |
195 | 4. Conveying Verbatim Copies.
196 |
197 | You may convey verbatim copies of the Program's source code as you
198 | receive it, in any medium, provided that you conspicuously and
199 | appropriately publish on each copy an appropriate copyright notice;
200 | keep intact all notices stating that this License and any
201 | non-permissive terms added in accord with section 7 apply to the code;
202 | keep intact all notices of the absence of any warranty; and give all
203 | recipients a copy of this License along with the Program.
204 |
205 | You may charge any price or no price for each copy that you convey,
206 | and you may offer support or warranty protection for a fee.
207 |
208 | 5. Conveying Modified Source Versions.
209 |
210 | You may convey a work based on the Program, or the modifications to
211 | produce it from the Program, in the form of source code under the
212 | terms of section 4, provided that you also meet all of these conditions:
213 |
214 | a) The work must carry prominent notices stating that you modified
215 | it, and giving a relevant date.
216 |
217 | b) The work must carry prominent notices stating that it is
218 | released under this License and any conditions added under section
219 | 7. This requirement modifies the requirement in section 4 to
220 | "keep intact all notices".
221 |
222 | c) You must license the entire work, as a whole, under this
223 | License to anyone who comes into possession of a copy. This
224 | License will therefore apply, along with any applicable section 7
225 | additional terms, to the whole of the work, and all its parts,
226 | regardless of how they are packaged. This License gives no
227 | permission to license the work in any other way, but it does not
228 | invalidate such permission if you have separately received it.
229 |
230 | d) If the work has interactive user interfaces, each must display
231 | Appropriate Legal Notices; however, if the Program has interactive
232 | interfaces that do not display Appropriate Legal Notices, your
233 | work need not make them do so.
234 |
235 | A compilation of a covered work with other separate and independent
236 | works, which are not by their nature extensions of the covered work,
237 | and which are not combined with it such as to form a larger program,
238 | in or on a volume of a storage or distribution medium, is called an
239 | "aggregate" if the compilation and its resulting copyright are not
240 | used to limit the access or legal rights of the compilation's users
241 | beyond what the individual works permit. Inclusion of a covered work
242 | in an aggregate does not cause this License to apply to the other
243 | parts of the aggregate.
244 |
245 | 6. Conveying Non-Source Forms.
246 |
247 | You may convey a covered work in object code form under the terms
248 | of sections 4 and 5, provided that you also convey the
249 | machine-readable Corresponding Source under the terms of this License,
250 | in one of these ways:
251 |
252 | a) Convey the object code in, or embodied in, a physical product
253 | (including a physical distribution medium), accompanied by the
254 | Corresponding Source fixed on a durable physical medium
255 | customarily used for software interchange.
256 |
257 | b) Convey the object code in, or embodied in, a physical product
258 | (including a physical distribution medium), accompanied by a
259 | written offer, valid for at least three years and valid for as
260 | long as you offer spare parts or customer support for that product
261 | model, to give anyone who possesses the object code either (1) a
262 | copy of the Corresponding Source for all the software in the
263 | product that is covered by this License, on a durable physical
264 | medium customarily used for software interchange, for a price no
265 | more than your reasonable cost of physically performing this
266 | conveying of source, or (2) access to copy the
267 | Corresponding Source from a network server at no charge.
268 |
269 | c) Convey individual copies of the object code with a copy of the
270 | written offer to provide the Corresponding Source. This
271 | alternative is allowed only occasionally and noncommercially, and
272 | only if you received the object code with such an offer, in accord
273 | with subsection 6b.
274 |
275 | d) Convey the object code by offering access from a designated
276 | place (gratis or for a charge), and offer equivalent access to the
277 | Corresponding Source in the same way through the same place at no
278 | further charge. You need not require recipients to copy the
279 | Corresponding Source along with the object code. If the place to
280 | copy the object code is a network server, the Corresponding Source
281 | may be on a different server (operated by you or a third party)
282 | that supports equivalent copying facilities, provided you maintain
283 | clear directions next to the object code saying where to find the
284 | Corresponding Source. Regardless of what server hosts the
285 | Corresponding Source, you remain obligated to ensure that it is
286 | available for as long as needed to satisfy these requirements.
287 |
288 | e) Convey the object code using peer-to-peer transmission, provided
289 | you inform other peers where the object code and Corresponding
290 | Source of the work are being offered to the general public at no
291 | charge under subsection 6d.
292 |
293 | A separable portion of the object code, whose source code is excluded
294 | from the Corresponding Source as a System Library, need not be
295 | included in conveying the object code work.
296 |
297 | A "User Product" is either (1) a "consumer product", which means any
298 | tangible personal property which is normally used for personal, family,
299 | or household purposes, or (2) anything designed or sold for incorporation
300 | into a dwelling. In determining whether a product is a consumer product,
301 | doubtful cases shall be resolved in favor of coverage. For a particular
302 | product received by a particular user, "normally used" refers to a
303 | typical or common use of that class of product, regardless of the status
304 | of the particular user or of the way in which the particular user
305 | actually uses, or expects or is expected to use, the product. A product
306 | is a consumer product regardless of whether the product has substantial
307 | commercial, industrial or non-consumer uses, unless such uses represent
308 | the only significant mode of use of the product.
309 |
310 | "Installation Information" for a User Product means any methods,
311 | procedures, authorization keys, or other information required to install
312 | and execute modified versions of a covered work in that User Product from
313 | a modified version of its Corresponding Source. The information must
314 | suffice to ensure that the continued functioning of the modified object
315 | code is in no case prevented or interfered with solely because
316 | modification has been made.
317 |
318 | If you convey an object code work under this section in, or with, or
319 | specifically for use in, a User Product, and the conveying occurs as
320 | part of a transaction in which the right of possession and use of the
321 | User Product is transferred to the recipient in perpetuity or for a
322 | fixed term (regardless of how the transaction is characterized), the
323 | Corresponding Source conveyed under this section must be accompanied
324 | by the Installation Information. But this requirement does not apply
325 | if neither you nor any third party retains the ability to install
326 | modified object code on the User Product (for example, the work has
327 | been installed in ROM).
328 |
329 | The requirement to provide Installation Information does not include a
330 | requirement to continue to provide support service, warranty, or updates
331 | for a work that has been modified or installed by the recipient, or for
332 | the User Product in which it has been modified or installed. Access to a
333 | network may be denied when the modification itself materially and
334 | adversely affects the operation of the network or violates the rules and
335 | protocols for communication across the network.
336 |
337 | Corresponding Source conveyed, and Installation Information provided,
338 | in accord with this section must be in a format that is publicly
339 | documented (and with an implementation available to the public in
340 | source code form), and must require no special password or key for
341 | unpacking, reading or copying.
342 |
343 | 7. Additional Terms.
344 |
345 | "Additional permissions" are terms that supplement the terms of this
346 | License by making exceptions from one or more of its conditions.
347 | Additional permissions that are applicable to the entire Program shall
348 | be treated as though they were included in this License, to the extent
349 | that they are valid under applicable law. If additional permissions
350 | apply only to part of the Program, that part may be used separately
351 | under those permissions, but the entire Program remains governed by
352 | this License without regard to the additional permissions.
353 |
354 | When you convey a copy of a covered work, you may at your option
355 | remove any additional permissions from that copy, or from any part of
356 | it. (Additional permissions may be written to require their own
357 | removal in certain cases when you modify the work.) You may place
358 | additional permissions on material, added by you to a covered work,
359 | for which you have or can give appropriate copyright permission.
360 |
361 | Notwithstanding any other provision of this License, for material you
362 | add to a covered work, you may (if authorized by the copyright holders of
363 | that material) supplement the terms of this License with terms:
364 |
365 | a) Disclaiming warranty or limiting liability differently from the
366 | terms of sections 15 and 16 of this License; or
367 |
368 | b) Requiring preservation of specified reasonable legal notices or
369 | author attributions in that material or in the Appropriate Legal
370 | Notices displayed by works containing it; or
371 |
372 | c) Prohibiting misrepresentation of the origin of that material, or
373 | requiring that modified versions of such material be marked in
374 | reasonable ways as different from the original version; or
375 |
376 | d) Limiting the use for publicity purposes of names of licensors or
377 | authors of the material; or
378 |
379 | e) Declining to grant rights under trademark law for use of some
380 | trade names, trademarks, or service marks; or
381 |
382 | f) Requiring indemnification of licensors and authors of that
383 | material by anyone who conveys the material (or modified versions of
384 | it) with contractual assumptions of liability to the recipient, for
385 | any liability that these contractual assumptions directly impose on
386 | those licensors and authors.
387 |
388 | All other non-permissive additional terms are considered "further
389 | restrictions" within the meaning of section 10. If the Program as you
390 | received it, or any part of it, contains a notice stating that it is
391 | governed by this License along with a term that is a further
392 | restriction, you may remove that term. If a license document contains
393 | a further restriction but permits relicensing or conveying under this
394 | License, you may add to a covered work material governed by the terms
395 | of that license document, provided that the further restriction does
396 | not survive such relicensing or conveying.
397 |
398 | If you add terms to a covered work in accord with this section, you
399 | must place, in the relevant source files, a statement of the
400 | additional terms that apply to those files, or a notice indicating
401 | where to find the applicable terms.
402 |
403 | Additional terms, permissive or non-permissive, may be stated in the
404 | form of a separately written license, or stated as exceptions;
405 | the above requirements apply either way.
406 |
407 | 8. Termination.
408 |
409 | You may not propagate or modify a covered work except as expressly
410 | provided under this License. Any attempt otherwise to propagate or
411 | modify it is void, and will automatically terminate your rights under
412 | this License (including any patent licenses granted under the third
413 | paragraph of section 11).
414 |
415 | However, if you cease all violation of this License, then your
416 | license from a particular copyright holder is reinstated (a)
417 | provisionally, unless and until the copyright holder explicitly and
418 | finally terminates your license, and (b) permanently, if the copyright
419 | holder fails to notify you of the violation by some reasonable means
420 | prior to 60 days after the cessation.
421 |
422 | Moreover, your license from a particular copyright holder is
423 | reinstated permanently if the copyright holder notifies you of the
424 | violation by some reasonable means, this is the first time you have
425 | received notice of violation of this License (for any work) from that
426 | copyright holder, and you cure the violation prior to 30 days after
427 | your receipt of the notice.
428 |
429 | Termination of your rights under this section does not terminate the
430 | licenses of parties who have received copies or rights from you under
431 | this License. If your rights have been terminated and not permanently
432 | reinstated, you do not qualify to receive new licenses for the same
433 | material under section 10.
434 |
435 | 9. Acceptance Not Required for Having Copies.
436 |
437 | You are not required to accept this License in order to receive or
438 | run a copy of the Program. Ancillary propagation of a covered work
439 | occurring solely as a consequence of using peer-to-peer transmission
440 | to receive a copy likewise does not require acceptance. However,
441 | nothing other than this License grants you permission to propagate or
442 | modify any covered work. These actions infringe copyright if you do
443 | not accept this License. Therefore, by modifying or propagating a
444 | covered work, you indicate your acceptance of this License to do so.
445 |
446 | 10. Automatic Licensing of Downstream Recipients.
447 |
448 | Each time you convey a covered work, the recipient automatically
449 | receives a license from the original licensors, to run, modify and
450 | propagate that work, subject to this License. You are not responsible
451 | for enforcing compliance by third parties with this License.
452 |
453 | An "entity transaction" is a transaction transferring control of an
454 | organization, or substantially all assets of one, or subdividing an
455 | organization, or merging organizations. If propagation of a covered
456 | work results from an entity transaction, each party to that
457 | transaction who receives a copy of the work also receives whatever
458 | licenses to the work the party's predecessor in interest had or could
459 | give under the previous paragraph, plus a right to possession of the
460 | Corresponding Source of the work from the predecessor in interest, if
461 | the predecessor has it or can get it with reasonable efforts.
462 |
463 | You may not impose any further restrictions on the exercise of the
464 | rights granted or affirmed under this License. For example, you may
465 | not impose a license fee, royalty, or other charge for exercise of
466 | rights granted under this License, and you may not initiate litigation
467 | (including a cross-claim or counterclaim in a lawsuit) alleging that
468 | any patent claim is infringed by making, using, selling, offering for
469 | sale, or importing the Program or any portion of it.
470 |
471 | 11. Patents.
472 |
473 | A "contributor" is a copyright holder who authorizes use under this
474 | License of the Program or a work on which the Program is based. The
475 | work thus licensed is called the contributor's "contributor version".
476 |
477 | A contributor's "essential patent claims" are all patent claims
478 | owned or controlled by the contributor, whether already acquired or
479 | hereafter acquired, that would be infringed by some manner, permitted
480 | by this License, of making, using, or selling its contributor version,
481 | but do not include claims that would be infringed only as a
482 | consequence of further modification of the contributor version. For
483 | purposes of this definition, "control" includes the right to grant
484 | patent sublicenses in a manner consistent with the requirements of
485 | this License.
486 |
487 | Each contributor grants you a non-exclusive, worldwide, royalty-free
488 | patent license under the contributor's essential patent claims, to
489 | make, use, sell, offer for sale, import and otherwise run, modify and
490 | propagate the contents of its contributor version.
491 |
492 | In the following three paragraphs, a "patent license" is any express
493 | agreement or commitment, however denominated, not to enforce a patent
494 | (such as an express permission to practice a patent or covenant not to
495 | sue for patent infringement). To "grant" such a patent license to a
496 | party means to make such an agreement or commitment not to enforce a
497 | patent against the party.
498 |
499 | If you convey a covered work, knowingly relying on a patent license,
500 | and the Corresponding Source of the work is not available for anyone
501 | to copy, free of charge and under the terms of this License, through a
502 | publicly available network server or other readily accessible means,
503 | then you must either (1) cause the Corresponding Source to be so
504 | available, or (2) arrange to deprive yourself of the benefit of the
505 | patent license for this particular work, or (3) arrange, in a manner
506 | consistent with the requirements of this License, to extend the patent
507 | license to downstream recipients. "Knowingly relying" means you have
508 | actual knowledge that, but for the patent license, your conveying the
509 | covered work in a country, or your recipient's use of the covered work
510 | in a country, would infringe one or more identifiable patents in that
511 | country that you have reason to believe are valid.
512 |
513 | If, pursuant to or in connection with a single transaction or
514 | arrangement, you convey, or propagate by procuring conveyance of, a
515 | covered work, and grant a patent license to some of the parties
516 | receiving the covered work authorizing them to use, propagate, modify
517 | or convey a specific copy of the covered work, then the patent license
518 | you grant is automatically extended to all recipients of the covered
519 | work and works based on it.
520 |
521 | A patent license is "discriminatory" if it does not include within
522 | the scope of its coverage, prohibits the exercise of, or is
523 | conditioned on the non-exercise of one or more of the rights that are
524 | specifically granted under this License. You may not convey a covered
525 | work if you are a party to an arrangement with a third party that is
526 | in the business of distributing software, under which you make payment
527 | to the third party based on the extent of your activity of conveying
528 | the work, and under which the third party grants, to any of the
529 | parties who would receive the covered work from you, a discriminatory
530 | patent license (a) in connection with copies of the covered work
531 | conveyed by you (or copies made from those copies), or (b) primarily
532 | for and in connection with specific products or compilations that
533 | contain the covered work, unless you entered into that arrangement,
534 | or that patent license was granted, prior to 28 March 2007.
535 |
536 | Nothing in this License shall be construed as excluding or limiting
537 | any implied license or other defenses to infringement that may
538 | otherwise be available to you under applicable patent law.
539 |
540 | 12. No Surrender of Others' Freedom.
541 |
542 | If conditions are imposed on you (whether by court order, agreement or
543 | otherwise) that contradict the conditions of this License, they do not
544 | excuse you from the conditions of this License. If you cannot convey a
545 | covered work so as to satisfy simultaneously your obligations under this
546 | License and any other pertinent obligations, then as a consequence you may
547 | not convey it at all. For example, if you agree to terms that obligate you
548 | to collect a royalty for further conveying from those to whom you convey
549 | the Program, the only way you could satisfy both those terms and this
550 | License would be to refrain entirely from conveying the Program.
551 |
552 | 13. Use with the GNU Affero General Public License.
553 |
554 | Notwithstanding any other provision of this License, you have
555 | permission to link or combine any covered work with a work licensed
556 | under version 3 of the GNU Affero General Public License into a single
557 | combined work, and to convey the resulting work. The terms of this
558 | License will continue to apply to the part which is the covered work,
559 | but the special requirements of the GNU Affero General Public License,
560 | section 13, concerning interaction through a network will apply to the
561 | combination as such.
562 |
563 | 14. Revised Versions of this License.
564 |
565 | The Free Software Foundation may publish revised and/or new versions of
566 | the GNU General Public License from time to time. Such new versions will
567 | be similar in spirit to the present version, but may differ in detail to
568 | address new problems or concerns.
569 |
570 | Each version is given a distinguishing version number. If the
571 | Program specifies that a certain numbered version of the GNU General
572 | Public License "or any later version" applies to it, you have the
573 | option of following the terms and conditions either of that numbered
574 | version or of any later version published by the Free Software
575 | Foundation. If the Program does not specify a version number of the
576 | GNU General Public License, you may choose any version ever published
577 | by the Free Software Foundation.
578 |
579 | If the Program specifies that a proxy can decide which future
580 | versions of the GNU General Public License can be used, that proxy's
581 | public statement of acceptance of a version permanently authorizes you
582 | to choose that version for the Program.
583 |
584 | Later license versions may give you additional or different
585 | permissions. However, no additional obligations are imposed on any
586 | author or copyright holder as a result of your choosing to follow a
587 | later version.
588 |
589 | 15. Disclaimer of Warranty.
590 |
591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599 |
600 | 16. Limitation of Liability.
601 |
602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610 | SUCH DAMAGES.
611 |
612 | 17. Interpretation of Sections 15 and 16.
613 |
614 | If the disclaimer of warranty and limitation of liability provided
615 | above cannot be given local legal effect according to their terms,
616 | reviewing courts shall apply local law that most closely approximates
617 | an absolute waiver of all civil liability in connection with the
618 | Program, unless a warranty or assumption of liability accompanies a
619 | copy of the Program in return for a fee.
620 |
621 | END OF TERMS AND CONDITIONS
622 |
623 | How to Apply These Terms to Your New Programs
624 |
625 | If you develop a new program, and you want it to be of the greatest
626 | possible use to the public, the best way to achieve this is to make it
627 | free software which everyone can redistribute and change under these terms.
628 |
629 | To do so, attach the following notices to the program. It is safest
630 | to attach them to the start of each source file to most effectively
631 | state the exclusion of warranty; and each file should have at least
632 | the "copyright" line and a pointer to where the full notice is found.
633 |
634 |
635 | Copyright (C)
636 |
637 | This program is free software: you can redistribute it and/or modify
638 | it under the terms of the GNU General Public License as published by
639 | the Free Software Foundation, either version 3 of the License, or
640 | (at your option) any later version.
641 |
642 | This program is distributed in the hope that it will be useful,
643 | but WITHOUT ANY WARRANTY; without even the implied warranty of
644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 | GNU General Public License for more details.
646 |
647 | You should have received a copy of the GNU General Public License
648 | along with this program. If not, see .
649 |
650 | Also add information on how to contact you by electronic and paper mail.
651 |
652 | If the program does terminal interaction, make it output a short
653 | notice like this when it starts in an interactive mode:
654 |
655 | Copyright (C)
656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 | This is free software, and you are welcome to redistribute it
658 | under certain conditions; type `show c' for details.
659 |
660 | The hypothetical commands `show w' and `show c' should show the appropriate
661 | parts of the General Public License. Of course, your program's commands
662 | might be different; for a GUI interface, you would use an "about box".
663 |
664 | You should also get your employer (if you work as a programmer) or school,
665 | if any, to sign a "copyright disclaimer" for the program, if necessary.
666 | For more information on this, and how to apply and follow the GNU GPL, see
667 | .
668 |
669 | The GNU General Public License does not permit incorporating your program
670 | into proprietary programs. If your program is a subroutine library, you
671 | may consider it more useful to permit linking proprietary applications with
672 | the library. If this is what you want to do, use the GNU Lesser General
673 | Public License instead of this License. But first, please read
674 | .
675 |
--------------------------------------------------------------------------------