360 lines
8.6 KiB
Text
360 lines
8.6 KiB
Text
#import "./dvd.typ": *
|
|
|
|
#show: dvdtyp.with(
|
|
title: "Pset 1",
|
|
author: "Youwen Wu",
|
|
)
|
|
|
|
#set heading(
|
|
numbering: (
|
|
num => {
|
|
return "1." + str(num)
|
|
}
|
|
),
|
|
)
|
|
|
|
Problems:
|
|
|
|
1.1: \#1ceij, 2c, 3cdeghjL, 4cdefh, 6, 7cg, 10ce, 11bei, 12a, 13
|
|
|
|
1.2: \#1bd, 2bd, 3, 5cfgh, 6bcg, 7be, 10bfg, 12bc, 13, 16cde
|
|
|
|
= Exercises
|
|
|
|
1. \
|
|
c. #[
|
|
$x/2$ is a rational number.
|
|
|
|
True.
|
|
] \
|
|
e. #[
|
|
Either $pi$ is rational and $17$ is a prime, or $7 < 13$ and $81$ is a perfect square.
|
|
|
|
True.
|
|
] \
|
|
i. #[
|
|
It is not the case that $39$ is prime, or that 64 is a power of 2.
|
|
|
|
False.
|
|
] \
|
|
j. #[
|
|
There are more than three false statements in this book, and this statement is one of them.
|
|
|
|
False.
|
|
]
|
|
|
|
2c. #[
|
|
$P$ is $5^2 + 12^2 = 13^2$ and $Q$ is $sqrt(2) + sqrt(3) = sqrt(2 + 3)$
|
|
|
|
$P and Q: "false"$
|
|
|
|
$P or Q: "true"$
|
|
]
|
|
|
|
3. #[
|
|
\
|
|
c. $P and not Q$
|
|
#[
|
|
#table(
|
|
columns: 3,
|
|
align: center,
|
|
[$P$], [$Q$], [$P and not Q$],
|
|
[T], [T], [F],
|
|
[T], [F], [T],
|
|
[F], [T], [F],
|
|
[F], [F], [F],
|
|
)
|
|
] \
|
|
d. $P and (Q or not Q)$
|
|
#[
|
|
#table(
|
|
columns: 5,
|
|
align: center,
|
|
[$P$], [$Q$], [$not Q$], [$Q or not Q$], [$P and (Q or not Q)$],
|
|
[T], [T], [F], [T], [T],
|
|
[T], [F], [T], [T], [T],
|
|
[F], [T], [F], [T], [F],
|
|
[F], [F], [T], [T], [F],
|
|
)
|
|
] \
|
|
e. $(P and Q) or not Q$ \
|
|
#[
|
|
#table(
|
|
columns: 5,
|
|
align: center,
|
|
[$P$], [$Q$], [$P and Q$], [$not Q$], [$(P and Q) or not Q$],
|
|
[T], [T], [T], [F], [T],
|
|
[F], [T], [F], [F], [F],
|
|
[T], [F], [F], [T], [T],
|
|
[F], [F], [F], [T], [T],
|
|
)
|
|
] \
|
|
g. $(P or S) and (P or K)$
|
|
#table(
|
|
columns: (1fr, 1fr, 1fr, 1fr, 1fr, 2fr),
|
|
align: center,
|
|
[$P$], [$S$], [$K$], [$P or S$], [$P or K$], [$(P or S) and (P or K)$],
|
|
[T], [T], [T], [T], [T], [T],
|
|
[T], [T], [F], [T], [T], [T],
|
|
[T], [F], [T], [T], [T], [T],
|
|
[T], [F], [F], [T], [T], [T],
|
|
[F], [T], [T], [T], [T], [T],
|
|
[F], [T], [F], [T], [F], [F],
|
|
[F], [F], [T], [F], [T], [T],
|
|
[F], [F], [F], [F], [F], [F],
|
|
)
|
|
] \
|
|
h. $not P and not Q$
|
|
#table(
|
|
align: center,
|
|
columns: 5,
|
|
[$P$], [$Q$], [$not P$], [$not Q$], [$not P and not Q$],
|
|
[T], [T], [F], [F], [F],
|
|
[T], [F], [F], [T], [F],
|
|
[F], [T], [T], [F], [F],
|
|
[F], [F], [T], [T], [T],
|
|
) \
|
|
j. $(P and Q) or (P and R)$
|
|
#table(
|
|
align: center,
|
|
columns: 6,
|
|
[$P$], [$Q$], [$R$], [$P and Q$], [$P and R$], [$(P and Q) or (P and R)$],
|
|
[T], [T], [T], [T], [T], [T],
|
|
[T], [F], [T], [F], [T], [T],
|
|
[T], [T], [F], [T], [F], [T],
|
|
[T], [F], [F], [F], [F], [F],
|
|
[F], [T], [T], [F], [F], [F],
|
|
[F], [F], [T], [F], [F], [F],
|
|
[F], [T], [F], [F], [F], [F],
|
|
[F], [F], [F], [F], [F], [F],
|
|
) \
|
|
L. $(P and Q) or (P and not S)$
|
|
#table(
|
|
align: center,
|
|
columns: 7,
|
|
[$P$],
|
|
[$Q$],
|
|
[$S$],
|
|
[$not S$],
|
|
[$P and Q$],
|
|
[$P and not S$],
|
|
[$(P and Q) or (P and not S)$],
|
|
|
|
[T], [T], [T], [F], [T], [F], [T],
|
|
[T], [F], [T], [F], [F], [F], [F],
|
|
[T], [T], [F], [T], [T], [T], [T],
|
|
[T], [F], [F], [T], [F], [T], [T],
|
|
[F], [T], [T], [F], [F], [F], [F],
|
|
[F], [F], [T], [F], [F], [F], [F],
|
|
[F], [T], [F], [T], [F], [F], [F],
|
|
[F], [F], [F], [T], [F], [F], [F],
|
|
)
|
|
|
|
4. \
|
|
c. $(P or Q) and (R or S)$ is true. \
|
|
d. $(not P or not Q) or (not R or not S)$ is true. \
|
|
e. $not P or not Q$ is false. \
|
|
f. $(not Q or S) and (Q or S)$ is false. \
|
|
h. $K and not (S or Q)$ is false.
|
|
|
|
6. \
|
|
a. $not P and not Q$, $not (P and not Q)$ are not equivalent because we can choose $P$ and $Q$ to both be true which gives false for proposition 1 and true for proposition 2. \
|
|
b. $(not P) or (not Q), not (P or not Q)$ are not equivalent because we can choose $P$ to be true and $Q$ to be false, and proposition 1 is true while proposition 2 is false. \
|
|
c. $(P and Q) or R$, $P and (Q or R)$ are not equivalent, by a truth table.
|
|
|
|
#proof[
|
|
Direct computation, by a truth table. Hopefully this suffices to show the absurdity of computing nontrivial boolean results by truth table.
|
|
#table(
|
|
align: center,
|
|
columns: (1fr, 1fr, 1fr, 1fr, 1fr, 2fr, 2fr),
|
|
[$P$],
|
|
[$Q$],
|
|
[$R$],
|
|
[$P and Q$],
|
|
[$Q or R$],
|
|
[$(P and Q) or R$],
|
|
[$P and (Q or R)$],
|
|
|
|
[T], [T], [T], [T], [T], [T], [T],
|
|
[T], [F], [T], [F], [T], [T], [T],
|
|
[T], [T], [F], [F], [T], [T], [T],
|
|
[T], [F], [F], [F], [F], [F], [F],
|
|
[F], [T], [T], [F], [T], [T], [F],
|
|
[F], [F], [T], [], [], [], [],
|
|
[F], [T], [F], [], [], [], [],
|
|
[F], [F], [F], [], [], [], [],
|
|
)
|
|
|
|
We need not complete the table as we have already identified a contradiction for when $P$ and $Q$ are false, $R$ true.
|
|
]
|
|
|
|
#remark(numbering: none)[
|
|
We can also show this result directly by
|
|
|
|
$
|
|
(P and Q) or R &= (P or R) and (Q or R) \
|
|
P and (Q or R) &= (P or Q) and (P or R)
|
|
$
|
|
|
|
Clearly the choices of $P$ and $Q$ are false, $R$ is true again yields a contradictory result where proposition 1 is true while proposition 2 is false.
|
|
]
|
|
|
|
d. $not (P and Q), not P and not Q$ \
|
|
|
|
The statements are not equivalent.
|
|
|
|
#proof[
|
|
By DeMorgan's,
|
|
$ not (P and Q) = not P or not Q $
|
|
Therefore, choosing $P,Q$ with $P != Q$ gives a contradictory result between the two propositions.
|
|
]
|
|
|
|
e. $(P and Q) or R, P or (Q and R)$
|
|
|
|
They are not equivalent.
|
|
|
|
#proof[
|
|
Symbolic manipulation gives
|
|
$
|
|
(P and Q) or R &= (P or R) and (Q or R) \
|
|
P or (Q and R) &= (P or Q) and (P or R)
|
|
$
|
|
Then select the conjunctive statement in parentheses that occurs
|
|
exclusively in one of the statements and set both of its propositions to
|
|
false. In this case we take $Q$ and $R$ false while $P$ is true, which
|
|
makes proposition 1 false while proposition 2 is true.
|
|
]
|
|
|
|
f. $(P and Q) or P, P$
|
|
|
|
They are equivalent, trivially. Clearly $Q$ is independent of the outcome's truth value which only depends on $P$.
|
|
|
|
7. \
|
|
|
|
c. Julius Caesar was born in 1492 or 1493 and died in 1776. \
|
|
|
|
This proposition is of the form $(P or Q) and R$, where
|
|
|
|
$
|
|
P &= #[Caesar was born in 1492] \
|
|
Q &= #[Caesar was born in 1493] \
|
|
R &= #[Caesar died in 1776] \
|
|
$
|
|
|
|
It is false, clearly, as Caesar certainly could not have died in 1776.
|
|
|
|
g. It is not the case that $-5$ and $13$ are elements of $NN$, but $4$ is in the set of rational numbers.
|
|
|
|
This proposition takes the form $not (P and Q) and R$, where
|
|
|
|
$
|
|
P &= -5 in NN \
|
|
Q &= 13 in NN \
|
|
R &= 4 in QQ
|
|
$
|
|
|
|
It is true, since $P$ is false, $Q$ is true, $R$ is true, which implies $not
|
|
(P and Q)$ is true, thus making the proposition as a whole true.
|
|
|
|
10. \
|
|
c. $(P and Q) or (not P or not Q)$ \
|
|
|
|
This is a tautology that is true $forall P,Q$.
|
|
|
|
#proof[
|
|
#table(
|
|
align: center,
|
|
columns: 5,
|
|
[$P$],
|
|
[$Q$],
|
|
[$P and Q$],
|
|
[$not P or not Q$],
|
|
[$(P and Q) or (not P or not Q)$],
|
|
|
|
[T], [T], [T], [F], [T],
|
|
[T], [F], [F], [T], [T],
|
|
[F], [T], [F], [T], [T],
|
|
[F], [F], [T], [T], [T],
|
|
)
|
|
]
|
|
|
|
e. $(Q and not P) and not (P and R)$ \
|
|
|
|
This is neither a tautology nor a contradiction.
|
|
|
|
#proof[
|
|
#table(
|
|
align: center,
|
|
columns: 5,
|
|
[$P$],
|
|
[$Q$],
|
|
[$Q and not P$],
|
|
[$not (P and R)$],
|
|
[$(Q and not P) and not (P and R)$],
|
|
|
|
[T], [T], [F], [F], [F],
|
|
[F], [T], [F], [T], [F],
|
|
[T], [F], [T], [T], [T],
|
|
[F], [F], [F], [T], [F],
|
|
)
|
|
]
|
|
|
|
11. \
|
|
|
|
b. Cleveland will win the first game or the second game.
|
|
|
|
Cleveland loses both the first and second games.
|
|
|
|
e. Roses are red and violets are blue.
|
|
|
|
Roses are green.
|
|
|
|
i. The function $g$ has a relative maximum at $x = 2$ or $x = 4$ and a relative minimum at $x = 3$.
|
|
|
|
$ g(x) "is given by" integral^x_0 (t - 5)(t-6) dif t $
|
|
|
|
12a.
|
|
|
|
Restore parentheses to $not not P or not Q and not S$.
|
|
|
|
$ not (not P) or (not Q and not S) $
|
|
|
|
13. \
|
|
|
|
a. Make a truth table for the exclusive or ($xor$)
|
|
|
|
#table(
|
|
align: center,
|
|
columns: 3,
|
|
[$P$], [$Q$], [$P xor Q$],
|
|
[T], [T], [F],
|
|
[F], [T], [T],
|
|
[T], [F], [T],
|
|
[F], [F], [F],
|
|
)
|
|
|
|
b. Show that $A xor B = (A or B) and not (A and B)$.
|
|
|
|
Intuitively this fact makes sense. Either $A$ or $B$ are true, but $A$ and $B$ can't _both_ be true.
|
|
|
|
#proof[
|
|
By direct computation,
|
|
|
|
#table(
|
|
align: center,
|
|
columns: 6,
|
|
[$P$],
|
|
[$Q$],
|
|
[$P xor Q$],
|
|
[$A or B$],
|
|
[$not (A and B)$],
|
|
[$(A or B) and not (A and B)$],
|
|
|
|
[T], [T], [F], [T], [F], [F],
|
|
[F], [T], [T], [T], [T], [T],
|
|
[T], [F], [T], [T], [T], [T],
|
|
[F], [F], [F], [F], [T], [F],
|
|
)
|
|
]
|
|
|
|
= Exercises
|