🎉 Initial commit!

This commit is contained in:
tomit4 2026-05-10 18:53:46 -07:00
commit 18763aa542
19 changed files with 1282 additions and 0 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
*.pdf

24
LICENSE Normal file
View file

@ -0,0 +1,24 @@
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to <https://unlicense.org>

4
README.md Normal file
View file

@ -0,0 +1,4 @@
# Discrete Mathematics: An Open Introduction
This repository holds my notes as I do the exercises for
[Discrete Mathematics: An Open Introduction, by Oscar Levin](https://discrete.openmathbooks.org/)

View file

@ -0,0 +1,163 @@
1.
Q:
The most popular mathematician in the world is throwing a party for all of his
friednds. To kick things off, they decide that everyone should shake hands.
Assuming all 10 people at the party each shake hands with every other person
(but not themselves, obviously) exactly once, how many handshakes take place?
1A:
If we pair off the people into sets, then we get something like this:
{1, 2}, {1, 3}, {1, 4}, {1, 5}, {1, 6}, {1, 7}, {1, 8}, {1, 9}, {1, 10}
{2, 3}, {2, 4}, {2, 5}, {2, 6}, {2, 7}, {2, 8}, {2, 9}, {2, 10}
{3, 4}, {3, 5}, {3, 6}, {3, 7}, {3, 8}, {3, 9}, {3, 10}
{4, 5}, {4, 6}, {4, 7}, {4, 8}, {4, 9}, {4, 10}
{5, 6}, {5, 7}, {5, 8}, {5, 9}, {5, 10}
{6, 7}, {6, 8}, {6, 9}, {6, 10}
{7, 8}, {7, 9}, {7, 10}
{8, 9}, {8, 10}
{9, 10}
As you can see this just becomes 10+9+8+7+6+5+4+3+2+1=55 handshakes. This likely
is alluding to basic summation mathematical induction.
2.
Q: At the warm-up event for Oscar's All-Star Hot Dog Eating Contest, Al ate one
hot dog. Bob then showed him up by eating three hot dogs. Not to be outdone,
Carl ate five. This continued with each contestant eating two more hot dogs than
the previous contestant. How many hot dogs did Zeno (the 26th and final
contestant) eat? How many hot dogs were eaten in total?
A:
This is another summation mathematical induction function, just slightly
different:
(1) +
(1 + 2) +
(3 + 2) +
(5 + 2) +
(7 + 2) +
(9 + 2) +
(11 + 2) +
(13 + 2) +
(15 + 2) +
(17 + 2) +
(19 + 2) +
(21 + 2) +
(23 + 2) +
(25 + 2) +
(27 + 2) +
(29 + 2) +
(31 + 2) +
(33 + 2) +
(35 + 2) +
(37 + 2) +
(39 + 2) +
(41 + 2) +
(43 + 2) +
(45 + 2) +
(47 + 2) +
(49 + 2) +
(51 + 2) +
(53 + 2) = 55
(1) + (1 + 2) + (3 + 2) + (5 + 2) + (7 + 2) + (9 + 2) + (11 + 2) + (13 + 2) +
(15 + 2) + (17 + 2) + (19 + 2) + (21 + 2) + (23 + 2) + (25 + 2) + (27 + 2) +
(29 + 2) + (31 + 2) + (33 + 2) + (35 + 2) + (37 + 2) + (39 + 2) + (41 + 2) +
(43 + 2) + (45 + 2) + (47 + 2) + (49 + 2) + (51 + 2) + (53 + 2) = 784
55 is how many Zeno ate, and the total hot dogs that were eaten is : 784
3.
Q: After excavating for weeks, you finally arrive at the burial chamber. The
room is empty except for two large chests. On each is carved a message
(strangely English):
- Exactly one of these chests contains a treasure, while the other is filled
with deadly immortal scorpions.
- For either chest, if the chest's message is true, then the chest contains
treasure.
The problem is, you don't know whether the messages are true or false. What do
you do?
A: Honestly, I'd probably walk away, but since that's likely not the answer,
we'd likely have to consider that these are relating to a form of truth tables.
The first chest's message claims that one chest contains scorpions, the other
treasure
So if we say T="contains treasure", and f="contains scorpions", then we can say
that Chest_1 and Chest_2:
Chest_1 = T Chest_2 = F
The other chest's message claims that if it's own message or the other chest's
message is true, then the chest contains treasure.
This is a contradiction, because if the second chest's message is true, then
that chest is the one that contains treasure, and the other chest is the one
that contains scorpions.
If the second chest's message is false, then the chest doesn't contain treasure,
but then you don't know if the second chest contains treasure or scorpions,
because the chest containing treasure is no longer contingent on whether the
chest's message is true or not.
This is probably best expressed again, in some form, of truth notation.
4.
Q: Back in the days of yore, five small towns decided they wanted to build roads
directly connecting each pair of towns. While the towns had plenty of money to
build roads as long and as winding as they wished, it was very important that
the roads not intersect with each other (as stop signs had not yet been
invented). Also, tunnels and bridges were not allowed, for moral reasons. It is
possible for each of these towns to build a road to each of the four other towns
without creating any intersections?
A: This seems possible, as you could just create two roads from each town to at
least two other towns (a pair as the question alludes to). But something tells
me this is a trick question.

View file

@ -0,0 +1,16 @@
1. Right now, how would you describe what **discrete** mathematics is about, if
you were telling your friends about the class you are in? Write one or two
sentences.
Discrete Mathematics is about performing some mathematical logic where the
inputs and outputs of some function contain only elements that are separate,
_i.e._ they are discrete. The main problems solved by discrete mathematics deal
with cominatorics, sequences, symbolic logic, and graph theory, though there are
others.
2. What questions do you have after reading this section? Write at least one
question about the content of this section that you are curious about.
The chest problem interested me as the second chest's message creates a logical
fallacy, such as "This statement is false." I wonder how this problem would be
"solved", if it's even possible, with discrete math.

View file

@ -0,0 +1,52 @@
1.
Q: Think back to the domino problem, at the beginning of this section. We asked
how many dominoes are in a double-six domino _set_. Is this really a set, in our
mathematical sense? What discrete structure would you use to represent each
domino individually?
A: No, the domino set is _not_ a set, because the order of the number matters so
you don't repeat any pair. Thusly a sequence, or tuple, would be more
appropriate to represent each domino individually.
2.
Q: A double-zero domino set would contain only one domino (both sides showing
0). A double-one set would contain this plus the dominoes (1, 0) and (1, 1). We
can continue in this way, creating a sequence of domino sets. Find the next
three terms of this sequence.
1, 3, _, _, _ ...
A: 1, 3, 6, 10, 15
The reason for this is we are summing up all the dominos, you can count starting
like we wrote out in our investigation:
(0, 6), (1, 6), (2, 6), (3, 6), (4, 6), (5, 6), (6, 6)
(0, 5), (1, 5), (2, 5), (3, 5), (4, 5), (5, 5)
(0, 4), (1, 4), (2, 4), (3, 4), (4, 4) = 5 tuples
(0, 3), (1, 3), (2, 3), (3, 3) = 4 tuples
(0, 2), (1, 2), (2, 2) = 3 tuples
(0, 1), (1, 1) = 2 tuples
(0, 0) = 1 tuples
1, (1 + 2), (1 + 2 + 3), (1 + 2 + 3 + 4), (1 + 2 + 3 + 4 + 5)
3.
Q: What questions do you have after reading this section? Write at least one
question about the content of this section that you are curious about.
A: The author makes not of graphs with edges and vertices that are related by
some function. In the example given, there are graphs where edges are made based
off of summing up to 7, or in the other, based off those same sets are connected
by edges based off of if their sum is even. I don't really have a question, but
the logic based off of these relationships are established. In other words, how
the cardinality is established and why.

View file

@ -0,0 +1,36 @@
2.0:
Q: A double-six domino set consists of tiles containing paris of numbers, each
from 0 to 6. How many tiles are in a double-six domino set? How many dominoes
are in a double-nine domino set? How many dominoes are in a double-$n$ domino
set?
This is a combinatorics problem. It is a summation.
ON a double-six domino set, we can think of each domino being like a bunch of
tuples:
(0, 6), (1, 6), (2, 6), (3, 6), (4, 6), (5, 6), (6, 6)
(0, 5), (1, 5), (2, 5), (3, 5), (4, 5), (5, 5)
(0, 4), (1, 4), (2, 4), (3, 4), (4, 4)
(0, 3), (1, 3), (2, 3), (3, 3)
(0, 2), (1, 2), (2, 2)
(0, 1), (1, 1)
(0, 0)
A: The author makes not of graphs with edges and vertices that are related by
some function. In the example given, there are graphs where edges are made based
off of summing up to 7, or in the other, based off those same sets are connected
by edges based off of if their sum is even. I don't really have a question, but
the logic based off of these relationships are established. In other words, how
the cardinality is established and why.
And on a double-nine:
(0, 9), (1, 9), (2, 9)

167
chapter_1/1_1/1_1_10.md Normal file
View file

@ -0,0 +1,167 @@
Q: Using the truth conditions for the logical connectives, determine which
statements below are true and which are false.
1. 17 is prime, and 17 is odd.
2. 17 is prime, and 18 is prime.
3. 17 is prime, or 18 is prime.
4. 17 is prime, or 19 is prime.
5. If 17 is prime, then 19 is prime.
6. If 18 is prime, then my favorite number is 17.
7. 17 is prime if and only if 19 is prime.
8. 17 is not prime if and only if 19 is not prime.
A:
1. 17 is prime, and 17 is odd.
This equates to a $P \wedge Q$ statement.
$P = \text{ 17 is prime}$
$Q = \text{ 17 is odd}$
Recall the truth table for $P \wedge Q$, which equates to the expected output
that 17 is prime, which is true:
$P = \text{ 17 is prime} = \text{ T}$
and also the statement 17 is odd, which is also true:
$Q = \text{ 17 is odd} = \text{ T}$.
This equates to the truth table row:
| $P$ | $Q$ | $P\wedge Q$ |
| --- | --- | ----------- |
| T | T | T |
There for this statement is true.
2. 17 is prime, and 18 is prime.
This can be followed similar to one, we already know the first statement is
true, but the second statement, $Q$, is not true (_i.e._ 18 is not prime, it can
be divided by a whole number).
Therefore:
$P = \text{ 17 is prime} = \text{ T}$
$Q = \text{ 18 is prime} = \text{ F}$.
From our truth table we know that:
| $P$ | $Q$ | $P\wedge Q$ |
| --- | --- | ----------- |
| T | F | F |
The statement is false.
3. 17 is prime, or 18 is prime.
This correlates to $P \vee Q$, and in this case only $P$ or $Q$ must be true,
and since these are the same atomic statements as number 2, we know that $P$ is
true, and $Q$ is false, and so therefore:
$P = \text{ 17 is prime} = \text{ T}$
$Q = \text{ 18 is prime} = \text{ F}$.
From our truth table we know that:
| $P$ | $Q$ | $P\vee Q$ |
| --- | --- | --------- |
| T | F | T |
The statement is true
4. 17 is prime, or 19 is prime.
Similar to 3, except here we also know that 19 is prime, so our statements look
like this:
$P = \text{ 17 is prime} = \text{ T}$
$Q = \text{ 19 is prime} = \text{ T}$.
From our truth table we know that:
| $P$ | $Q$ | $P\vee Q$ |
| --- | --- | --------- |
| T | T | T |
The statement is true.
5. If 17 is prime, then 19 is prime.
This is referencing $P\to Q$, which does confuse us a bit, so be careful here.
Here we know both statements are true, so this corresponds to our truth table
as:
$P = \text{ 17 is prime} = \text{ T}$
$Q = \text{ 19 is prime} = \text{ T}$.
From our truth table we know that:
| $P$ | $Q$ | $P\to Q$ |
| --- | --- | -------- |
| T | T | T |
The statement is true.
6. If 18 is prime, then my favorite number is 17.
Interestingly here, we have no way of validating whether 17 is our favorite
number or not, so we cannot really validate if $Q$ is true or false. Or can we?
Consulting the table for $P\to Q$, we find:
| $P$ | $Q$ | $P\to Q$ |
| --- | --- | -------- |
| T | T | T |
| T | F | F |
| F | T | T |
| F | F | T |
And we already know that $P$ is false, because 18 is not a prime number!
Regardless, if $P$ is false, the conclusion of $P\to Q$ is always true, as you
can see in the above table.
The statement is true.
7. 17 is prime if and only if 19 is prime.
This is a $P \leftrightarrow Q$ statement.
$P = \text{ 17 is prime} = \text{ T}$
$Q = \text{ 19 is prime} = \text{ T}$.
From our truth table we know that:
| $P$ | $Q$ | $P\leftrightarrow Q$ |
| --- | --- | -------------------- |
| T | T | T |
The statement is true.
8. 17 is not prime if and only if 19 is not prime.
This technically is still a $P \leftrightarrow Q$ statement. Let's see what the
solution has to say here, because honestly I'm a little confused.
Okay, so this is true as well. Consider number 7 now and realize that we're
saying that $P$ is false, since 17 is a prime number, but our assertion states
that it is not (a false statement). As mentioned in 7, if $P$ in $P\to Q$ is
false, then $Q$ is always true.
The statement is true.

47
chapter_1/1_1/1_1_11.md Normal file
View file

@ -0,0 +1,47 @@
Identify the logical structure of each of the following statements.
1. 4 and 5 are both prime.
2. Only one of 4 or 5 is prime.
3. You must attend every day and do the homework to pass this class.
4. Every number is even or odd.
A:
1. 4 and 5 are both prime.
This follows the $P \wedge Q$ statement (in this case it is false). It is
asserting that 4 is prime and that 5 is prime. 4 is not prime, and therefore the
statement is false.
2. Only one of 4 or 5 is prime.
We can't just put an "or" on one side of the statement here. we have to take
each proposition as it's own.
Where $P = \text{ 4 is prime}$ and $Q = \text{ 5 is prime}$
$$ (P \vee Q) \wedge \neg (P \wedge Q) $$
This equates to:
$$ \text{T} \wedge \neg \text{F} = \text{T} $$
3. You must attend every day and do the homework to pass this class.
This one actually the assertion is at the end.
If you passed the class ($P$), then we conclude that you must have attended
every day ($Q$) and also done the homework ($R$):
$$ P \to (Q \wedge R) $$
4. Every number is even or odd.
We don't yet have the terminology to express whether a number is even or odd
(this likely means we express it as being in some set or the output of some
function), but we can ascertain that this is a standard or statement.
$$ P \vee Q $$

18
chapter_1/1_1/1_1_13.md Normal file
View file

@ -0,0 +1,18 @@
Translate the statement "Every number is even or odd" into symbols.
If we define:
$$ E(x) = x \text{ is even} $$
$$ O(x) = x \text{ is odd} $$
Then we can say or statement is closer to:
$$ E(x) \vee O(x) $$
A:
But we need to express that this is "every number", which we can do with
$\forall$, _i.e._ "for all":
$$ \forall x (E(x) \vee O(x)) $$

5
chapter_1/1_1/1_1_14.md Normal file
View file

@ -0,0 +1,5 @@
## Definition 1.1.14
Given a sentence with free variables, the **universal generalization** of that
sentence is the statement obtained bya dding enough universal quantifiers to the
beginning of the sentence so that all free variables become bound.

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

View file

@ -0,0 +1,42 @@
Q: While walking through a fictional forest, you encounter three trolls guarding
a bridge. Each is either a _knight_, who always tells the truth, or a _knave_,
who always lies. The trolls will not let you pass until you correctly identify
each as either a knight or a knave. Each troll makes a single statement.
Troll 1: If I am a knave, then there are exactly two knights here.
Troll 2. Troll 1 is lying.
Troll 3: Either we are all knaves, or at least one of us is a knight.
Which troll is which?
A:
Let's think this through step by step by assuming the first Troll is lying.
If "If I am a knave, then there are exactly two knights here." = False:
Then: Troll 1 = knave, BUT that doesn't meant that there are exactly two
knights. In other words, the other two could be either knaves or knights. But we
know that this troll is a knave.
Moving on, we have:
Troll 2: "Troll 1 is lying"
If Troll 2 is lying, then Troll 1 is not lying (i.e. a knight), and this
invalidates our previous assumption that Troll 1 is lying, and therefore we
still don't know if the other two trolls are knights.
Moving on to troll 3:
Troll 3: "Either we are all knaves, or at least one of us is a knight."
If we assume troll 3 is also lying, then all three trolls are knaves, and we
have solved their riddle and pass, because he is no knight.
These are just my initial thoughts on this based off the prompt that we could
start just thinking about this if Troll 1 were lying.
$$ \therefore $$

View file

@ -0,0 +1,71 @@
## Definition 1.1.7 Logical Connectives.
We define the following **logical connectives.**
- $P \wedge Q$ is read "P and Q", and is called a **conjunction**.
- $P \vee Q$ is read "P or Q", and is called a **disjunction**.
- $P \to Q$ is read "if P then Q", and is called an **implication** or
**conditional**.
- $P \leftrightarrow Q$ is read "P if and only if Q" and is called a
**biconditional**.
- $$ \neg P $$
is read "not P", and is called a **negation**.
## Definitions 1.1.8 Truth Conditions for Connectives.
The **truth conditions** for the logical connectives are defined as follows.
- $P \wedge Q$ is true when both $P$ and $Q$ are true.
- $P \vee Q$ is trueh when $P$ or $Q$ or both are true.
- $P \to Q$ is true when $P$ is false or $Q$ is true (or both).
- $P \leftrightarrow Q$ is true when $P$ and $Q$ are both true, or both false.
- $\neg P$ is true when $P$ is false.
**Personal Notes**
The statement $P \to Q$ was confusing for me. ChatGPT expalains it as:
The rule given in your book is:
$P \to Q$ is true when $P$ is false, or $Q$ is true (or both).
That sounds weird, so lets rephrase:
The only time “If P, then Q” is false is if P happens but Q doesnt happen. In
every other situation, the statement is considered true.
Think of it as a promise:
“If I do X, then Y will happen.”
The promise is broken only if I do X and Y fails to happen. Otherwise, the
promise hasnt been broken.
Step 3:
Truth table example
| P (It rains) | Q (Ground wet) | P → Q (If it rains, then ground gets wet) |
| ------------ | -------------- | ----------------------------------------------- |
| True | True | True (rain happened, ground got wet ✅) |
| True | False | False (rain happened, ground stayed dry ❌) |
| False | True | True (didnt rain, but ground is wet anyway ✅) |
| False | False | True (didnt rain, ground isnt wet ✅) |
Notice that whenever it didnt rain ($P$ is false), we consider the statement
“If it rains, then the ground gets wet” as true, because the promise about rain
hasnt been broken.
## Definition 1.1.12 Quantifiers
The **universal quantifier** is written as $\forall$ and is read, "for all." The
**existential quantifier** is written $\exists$ and is read, "there exists" or
"for some."

View file

@ -0,0 +1,426 @@
1.
Q: For each sentence below, decide whether it is an atomic statement, a
molecular statement, or not a statement at all.
(a) Some say the end is near, and some say we'll see Armageddon soon.
(b) Mom's coming 'round to put it back the way it ought to be.
(c) Learn to swim.
A:
(a) This is moleculr statement, two predicates are asserted, one is that "Some
say the end is near" and the other is "some say we'll see armageddon".
If we say $P(x)$ is "some say the end is near", and $Q(x)$ is "some say we'll
see Armageddon soon", we can write this as:
$$ \exists x \left(P(x) \wedge Q(x)\right) $$
(b) This can be reversed as "if there's a way it ought to be, then Mom is coming
'round to put it back."
If we say that $x$ is "it", and $P(x)$ is "the way it ought to be", and $Q(x)$
is "Mom is coming round to put it back," then we can write this as:
$$ P(x) \to Q(x) $$
This is an atomic statement, as both $P(x)$ and $Q(x)$ cannot be divided into
smaller elements.
(c) Learn to swim.
This is not a statement, there is no assertion made.
---
2.
Q: Classify each of the sentences below as an atomic statement, a molecular
statement, or not a statement at all. If the statement is molecular, say what
kind it is (conjunction, disjunction, conditional, biconditional, negation).
(a) Everybody can be fooled sometimes.
This is molecular due to the "sometimes" statement.
If we say that $x$ is somebody, and $y$ is some point in time. And if we say
that $P(x)$ is some situation somebody is in, and $Q(y)$ is "being fooled at
some point in time", then we can express this as:
$$ \forall x \exists y\left(P(x) \to Q(y)\right) $$
And this is a conjunction.
W: atomic
(b) Every natural number greater than 1 is either prime or composite.
This is also molecular. Let's break this down. If we say that $x$ is some
natural number, and $P(x)$ is "$x$ is prime", and $Q(x)$ is "$x$ is composite",
then we can say that:
$$ \forall (x > 1) \in \mathbb{N} \left(P(x) \vee Q(x)\right) $$
This is an disjunction.
(c) Go to your room!
This is not a statement as no assertion is made.
(d) The Broncos will win the Super Bowl, or I'll eat my hat.
This is an atomic statement. If we say that $P$ is "The Broncos will win the
Super Bowl", and we say that $Q$ is "I'll eat my hat". Then we can express this
as:
$$ P \vee Q $$
W: this is molecular.
(e) This shirt is not black.
Here an assertion is made, but no conclusion is drawn, so this is not a
statement. If we say that $P$ is "This shirt is black", then we are only left
with:
$$ \neg P $$
And there is no conclusion $Q$ to be drawn.
This is not a statement.
W: this is a statement. $\neg P$ is a statement.
---
3.
Q: Determine whether each molecular statement below is true or false, or whether
it is impossible to determine. Assume you do not know what my favorite number is
(but you do know which numbers are prime).
(a) If 4 is my favorite number, then 4 + 1 is my favorite number.
(b) 8 is my favorite number, and 3 is not prime.
(c) 4 is my favorite number, or 4 is prime.
(d) If 4 is prime then 2 $\cdot$ 4 is prime.
(e) If 3 is prime, then 3 is my favorite number.
(f) 8 is my favorite number, and 4 is not prime.
A:
(a) If 4 is my favorite number, then 4 + 1 is my favorite number.
We can not determine this as we do not know if $4$ is my favorite number.
$$ P(4) \to P(5) $$
(b) 8 is my favorite number, and 3 is not prime.
False, although we are saying that $P(8)$ is true, our original statement says
we cannot know that, and we say that Q(3) is "3 is prime", then we can say
$$ P(8) \wedge \neg Q(3) $$
Which is a false statement as, again $P(8)$ is unknown and $\neg Q(3)$ is false.
(c) 4 is my favorite number, or 4 is prime.
This is a false statement, we are saying that $P(4)$ is true, but we cannot know
that (like in problem 3). And we're saying that $Q(4)$ as being "4 is prime".
While $Q(4)$ is not true, $P(4)$ is unknown, and this implies the following:
$$ P(4) \vee Q(4) $$
Which is a false statement since $P(4)$ is unknown and $Q(4)$ is false.
(d) If 4 is prime then 2 $\cdot$ 4 is prime.
This is a true statement. If we say that $P(x)$ is true if 4 is prime, then we
can say that $Q(x)$ is true if 2 $\cdot$ 4 is prime.
$$ P(x) \to Q(x) $$
Since $P(x)$ and $Q(x)$ is false, this means that $P(x) \to Q(x)$ is true (see
truth tables).
(e) If 3 is prime, then 3 is my favorite number.
This is a not possible to determine. We say that $P$ is "3 is prime", which is
true, but then we say that $Q$ is "3 is my favorite number", it follows that:
$$ P \to Q $$
Since $P$ is true, but $Q$ is unknown, we cannot determine the validity of this
statement
(f) 8 is my favorite number, and 4 is not prime.
We can say that this is not possible to determine. We can declare $P(8)$ is "8
is my favorite number" as true, but we cannot know that. Also "4 is prime" is
expressed as $Q(4)$, but is false so therefore:
$$ P(8) \wedge \neg Q(4) $$
Is unkonwn because $P(8)$ is unknown and $\neq Q(4)$ is true, but both must be
true for this statement to be true, and so therefore this statement is not
possible to determine.
4.
Q: Let $P(x, y)$ be the predicate, "person $x$ can be fooled at time $y$."
Match each statement with its representation in symbols.
| | |
| ------------------------------------------------ | ----------------------------- |
| It is always true that some people can be fooled | $\exists x \forall y P(x, y)$ |
| Sometimes everyone can be fooled. | $\forall x \exists y P(x, y)$ |
| Everyone can be fooled sometimes. | $\forall y \exists x P(x, y)$ |
| Some people can be fooled all of the time. | $\exists y\forall x P(x, y)$ |
A:
| | |
| ------------------------------------------------ | ----------------------------- |
| It is always true that some people can be fooled | $\forall y \exists x P(x, y)$ |
| Sometimes everyone can be fooled. | $\exists y \forall x P(x, y)$ |
| Everyone can be fooled sometimes. | $\forall x \exists y P(x, y)$ |
| Some people can be fooled all of the time. | $\exists x\forall y P(x, y)$ |
5.
Q: Your friend believes that you cannot fool everyone at the same time. What is
another way of saying this, and how would you write that in symbols (using
$P(x, y)$ to say you can fool $x$ at time $y$).
A. Someone is never fooled. $\exists x \forall y \neg P(x, y)$
B. Everyone is never fooled. $\forall x \forall y \neg P(x, y)$
C. Someone is not fooled sometimes. $\exists x \exists y \neg P (x, y)$
D. Everyone is not fooled sometimes. $\forall x \exists y \neg P (x, y)$
A:
I'd say D is correct.
6.
Q: Regardless of your beliefs of how many people can be fooled at various times,
what could you conclude if we reinterpret $P(x, y)$ to mean $x < y$ and only
quantify over the natural numbers (so $\forall x$ means "For all natural
numbers," and $\exists x$ means "There exists a natural number")? Select all of
the following that apply.
A. $\forall x \exists y P(x, y)$ is true.
B. $\exists x \forall y P(x, y)$ is true.
C. $\forall y \exists x P(x, y)$ is true.
D. $\exists y \forall x P(x, y)$ is true.
E. No matter what $P(x, y)$ means, we can conclude that
$\forall x \exists y P(x, y)$ and $\exists y \forall x$ are NOT _logically
equivalent_
A:
A. This is true. We interpret this as "For all numbers for $x$, there exists
some number, $y$ where $x < y$". If $x \in \mathbb{N}$, then we know that this
is the same meaning as $x \in [0, \infty)$. We're essentially saying that every
possible value for $x$, there exists some value for $y$ that must be greater
than $x$. That's true.
B. This is false. "There exists some number, $x$, for all possible numbers for
$y$ where $x < y$". This means that some value of $x$ will always be less than
every possible $y$, that cannot be true.
C. This is true. "For all possible values for $y$, there exists some value $x$
where $x < y$." This is saying that for any given value for $y$, we can always
find at least one value for $x$ where $x < y$.
D. This is false. "There exists some value for $y$ such that for all possible
values of $x$, $x < y$." This would mean there is a natural number $y$ that is
greater than every natural number $x$, but this is impossible because for any
$y$, we can choose $x = y$, which makes $x < y$ false.
E. This is true. The statements $\forall x \exists y\, P(x,y)$ and
$\exists y \forall x\, P(x,y)$ are not logically equivalent.
The first means: for every value of $x$, there exists some value of $y$ such
that $x < y$. This is true for natural numbers since we can always choose a
larger number.
The second means: there exists some value of $y$ such that for all values of
$x$, $x < y$. This is false, because for any choice of $y$, we can take $x = y$,
which makes $x < y$ false.
The two statements, in essence, logically contradict each other.
7.
Q: Let $P(x)$ be the predicate, "$17x + 1$ is even."
(a) Is $P(15)$ true or false?
(b) What, if anything, can yhou conclude about $\exists x P(x)$ from the truth
value of $P(15)$?
(c) What, if anything, can you conclude about $\forall x P(x)$ from the truth
value of $P(15)$?
A:
(a) Yes, simple arithmetic shows that if the predicate states:
$$ P(x) = (17x + 1) \mod 2 = 0 $$
Then:
$$ P(15) = (17(15) + 1) = 256 \mod 2 = 0 $$
Therefore the statement $P(15)$ is true.
(b)
We can conclude that this statement, $\exists x P(x)$ is true. This is saying
"There exists some value for $x$ where $17x + 1$ is even." This is definitely
true, as there only has to exist 1 value for $x$ for this statement to be true,
and in part a we showed just that.
(c) This is false. The statement $\forall x P(x)$ is saying "For every possible
value in $x$, it is true that $17x + 1$ is even". That cannot be true. Just take
$P(2) = 35$ as a simple example. Basically when you start off with a $\forall$
predicate, every single value passed for $x$ (in this case) has to hold for the
assertion.
8.
Q: Let $P(x)$ be the predicate, "$18x + 1$ is even."
(a) Is $P(15)$ true or false?
(b) What, if anything, can you conclude about $\exists x P(x)$ from the truth
value of $P(15)$?
(c) What, if anything, can you conclude about $\forall x P(x)$ from the truth
value of $P(15)$?
A:
(a) Let's evaluate $P(15)$:
$$ P(15) = 18(15) + 1 = 271 $$
But obviously 271 is odd. This is a false statement.
(b) Because $18$ is an even number, and adding $1$ onto an even number will
always result in an odd number. We can conclude that the statement
$\exists x P(x)$, which means "There exists at least one value for $x$ where
$18x + 1$ is even." is false. There is no value for $x$ where $P(x)$ is true.
(c) The statement $\forall x P(x)$, which states "For every value of $x$,
$18x + 1$ is even" is also false. In fact, the exact opposite is true. As we
explained in part b, $P(x)$ can never be true for _any_ value of $x$. Thusly, to
state that it must be true for every possible value of $x$ as $\forall x P(x)$
asserts, simply cannot be the case.
9.
Q: Consider the sentence, $\exists x P(x, y) \to \forall x P(x, y)$. What can we
say about this sentence? Select all that apply.
A. The sentence is a statement because it contains quantifiers.
B. The sentence is not a statement because $x$ and $z$ are free variables.
C. The sentence is not a statement because $y$ is a free variable.
D. The universal generalization of the sentence is a statement.
A:
A. This is false, a sentence becomes a statement when a quantifier makes the
resulting statement true or false. But free variables still matter. The above
sentence essentially says "If there exists some value for $x$ where $P(x, y)$ is
true, then for every value for $x$, $P(x, y)$ must be true." But a sentence
cannot be a statement until, in this case, both $x$, and $y$ are replaced by
constants.
B. $z$ is never mentioned, so this statement is not true.
C. This is true. A statement cannot contain a free variable. Only when you
replace a free variable with a constant of some sort does a sentence become a
statement proper.
D. No, this statement is false. Although $x$ is bound by the universal
quantifier $\forall$, $y$ is not bound, and so remains a free variable. The
universal generalization of a sentence can only be a statement if the universal
quantifiers at the beginning of the sentence bind (restrict the domain) of all
free variables. $x$ is bound in this way after the predicate, but $y$ is not.
10.
Q: Suppose $P(x, y)$ is some binary predicate defined on a very small domain of
discourse: just the integers 1, 2, 3, 4. For each of the 16 pairs of these
numbers, $P(x, y)$ is either true or false, according to the following table
($x$ values are rows, $y$ values are columns).
| | 1 | 2 | 3 | 4 |
| - | - | - | - | - |
| 1 | T | F | F | F |
| 2 | F | T | T | F |
| 3 | T | T | T | T |
| 4 | F | F | F | F |
For example, $P(1, 3)$ is false, as indicated by the $F$ in the first row, third
column. Use the table to decide whether the following statements are true or
false.
(a) $\forall y \exists x P(x, y)$.
(b) $\exists x \forall y P(x, y)$.
(c) $\forall x \exists y P(x, y)$.
(d) $\exists y \forall x P(x, y)$.
A:
(a) This is true. "For all columns, y, there exists some row, $x$, where
$P(x, y)$ returns true." This means that there must be some T somewhere in the
column.
$$ y = 1: T exists (1, 3) $$
$$ y = 4: T exists (4, 1) $$
(b) "There exists at least one row, $x$, where all of the column values, $y$,
return T."
This is true.
$$ x = 3: T exists (3, 1), (3, 2), (3, 3), (3, 4) $$
(c) "For all rows, $x$, there exists at least one column $y$, that returns T."
This is false, this is essentially saying every row has at least one T value,
but row 4 does not. Consider the following statement:
$$ x = 4: T \text{ exists in at least one of: } (4, 1), (4, 2), (4, 3), (4, 4) $$
This isn't true, row 4 returns all F.
(d) "There exists at least one column, $y$, where all rows $x$ return T"
This is false. There is no column $y$ where all rows are filled with Ts.

View file

@ -0,0 +1,95 @@
1.
Q: Which of the following sentences should count as statements? That is, for
which of the sentences below could you _potentially_ claim the sentence was
eithr true or false? Select all that apply.
A. The sum of the first 100 positive integers.
B. What is the sum of the first 100 positive integers?
C. The sum of the first 100 positive integers is 5050.
D. Is the sum of the first 100 positive integers 5050?
E. The sum of the first 100 positive integers is 17.
A: C, E
These are potentially true/false, as each makes a definitive claim. The rest are
either statements of being/existence (A), or questions with a specific answer
that is not true/false (B), or a question that could be answered by a true/false
statement, but doesn't definitively declare a true/false assertion (D).
2.
Q: You and your roommate are arguing, and they make the audacious claim that
pineapple is good both on pizza and in smoothies. Which of the following are
reasonable responses to this claim, from a logical point of view?
A. The statement is false because even though pineapple is good in smoothies, it is NOT good on pizza.
B. The statement is false because while pineapple is good on pizza and pineapple is good in smoothies, a pizza smoothie is never good.
C. The statement is half true because regardless of what you think about pineapple on pizza, we can all agree at least that pineapple is good in smoothies.
D. The statement is false because everyone who likes pineapple on pizza does NOT like pineapple in smoothies.
A: From a logical point of view, statements A, C, and D are all reasonable
responses. Only B is not reasonable because it is a conclusion based on an
assertion that was never made (i.e. the roommate never claimed that pizza
smoothie is good).
3.
Q: Your roommate now makes an even more outrageous claim: If a superhero movie
is part of the Marvel Cinematic Universe, then it is good. Which of the
following are reasonable responses to this claim, from a logical point of view?
A. This is false because there are good superhero movies, like Wonder Woman and Dark Knight, that are based on DC Comics, and so not part of the Marvel Cinematic Universe.
B. The statement is false because there is at least one superhero movie that is part of the Marvel Cinematic Universe that is also not good.
C. The statement is false because, for example, Green Lantern is neither Marvel nor good.
D. The statement is true because more than half of the Marvel movies are good.
A: Only B is a valid logical point of view. This is because the roommate claims
that if a movie in the Marvel Universe, it is good, but the counterargument is
that there is at least one superhero movie in the Marvel Universe that is not
good, which invalidates his claim.
The first option, A, is not a valid logical point of view because just because
there are DC movies that are good has no bearing on whether Marvel movies are
good as there is no relation between them.
C is also not a valid option because it points out a DC movie is bad, which
again, has no bearing on the assertion's statement that all Marvel movies are
good.
D is not a valid logical conclusion because it only claims that more than half
of the Marvel movies are good, which does not answer whether or not the rest of
them are, which is the only way that the assertion could be concluded as being
true.
4.
Q: Your roommate just won't let up with their outrageous claims. Now they claim
that either every troll is a knave, or there is at least one troll that is a
knight. What can you say to this?
A. Yes, this is true because every troll is either a knight or a knave. If it is not the case that _all_ trolls are knaves, then there must be _some_ troll that is a knight.
B. This is false because some trolls are knights and some other trolls are knaves.
C. The statement is false because there is no way to verify which of the two options is the case.
D. The statement is false because no troll could say that all trolls are knaves, since knaves always lie
A:
C is the only verifiable logical argument. Since we only have each troll's word
on whether they are a knave(lying) or a knight (telling the truth), there is
always the potential that they are lying. Without another external way of
validating whether they are a knave or a knight, we cannot validate the
roommate's assertion.

View file

@ -0,0 +1,97 @@
1.
Q: Match each statement in symbols with it stype of statement.
| | |
| ------------ | ------------------------------- |
| $P \to Q$ | $P$ and $Q$ (conjunction) |
| $P \vee Q$ | If $P$, then $Q$, (implication) |
| $P \wedge Q$ | $P$ or $Q$ (disjunction) |
| $\neg P$ | Not $P$ (negation) |
A:
| | |
| ------------ | ------------------------------- |
| $P \to Q$ | If $P$, then $Q$, (implication) |
| $P \wedge Q$ | $P$ and $Q$ (conjunction) |
| $P \vee Q$ | $P$ or $Q$ (disjunction) |
| $\neg P$ | Not $P$ (negation) |
2.
Q: Consider the sentence, "If $x > 3$, then $x$ is even."
Which of the following statements are true about the sentence? Select all that
apply.
A. The sentence is a false statement since it has a free variable.
B. The universal generalization of the sentence is a statement.
C. If you substitute 10 for $x$, the resulting statement is true.
D. The sentence becomes a true statement no matter what natural number you substitute for $x$.
A:
B and C are true about the sentence.
A. No, this sentence is not a statement because it has a free variable, but that
doesn't automatically make the statement true or false.
B. Given a sentence with free variables, the **universal generalization** of a
sentence is the statement obtained by adding enough universal quantifiers to the
beginning of the sentence so that all free variables become bound.
The beginning of the sentence states "If $x > 3$", this is a universal
quantifier that bounds our free variable, $x$, and therefore by the definition
of the **universal generalization**, this sentence is therefore a statement.
C. This is also true, though it doesn't follow in "regular" day to day logic,
but recall our truth table for $P \to Q$:
| $P$ | $Q$ | $P \to $Q$ |
| --- | --- | ---------- |
| T | T | T |
Again our sentence is:
"If $x > 3$, then $x$ is even."
We can say that $P(x)$ is "If $x > 3$", and that $Q(x)$ is "$x$ is even."
$$ P(x) \to Q(x) $$
Since $x = 10$ according to C, this means that:
$$ P(10) = \text{ If }10 > 3 = \text{ True} $$
$$ Q(10) = 10 \text{ is even} = \text{ True} $$
So therefore it follows that:
$$ P(10) \to Q(10) $$
Is a true statement.
3. What questions do you have after reading this section? Write at least one
question about the content of this section that you are curious about.
This section is quite interesting, I suppose I'm curious about how negation
adjusts the truth tables of other qualifiers. In one of the examples, this
statement is made:
17 is not prime if and only if 19 is not prime.
To which the answer is:
True. Now both parts are false (since both are the negation of a true
statement), so the entire statement is true.
The $P \leftrightarrow Q$ statement does confuse me, and so therefore we have:
$$ \neg P \leftrightarrow \neg Q $$
and I suppose I just need to sit down and have some clarification on how
negation affects this statement.

View file

@ -0,0 +1,17 @@
## Every blank is blank.
Any statement of the form, "Every $P$-thing is a $Q$-thing" can be written as:
$$ \forall x \left(P(x) \to Q(x)\right) $$
Example: all mammals have hair, becomes $\forall x \left(M(x) \to H(x)\right)$,
where $M(x)$ means $x$ is a mammal, and $H(x)$ means $x$ has hair.
## Some blanks are blank
Any statement of the form, "Some $P$-things are $Q$-things", can be written as:
$$ \exists x\left(P(x) \wedge Q(x)\right) $$
Example: Some cats can swim, becomes $\exists x\left(C(x) \vee S(x)\right)$,
where $C(x)$ means $x$ is a cat, and $S(x)$ means $x$ can swim.

1
leftoff.txt Normal file
View file

@ -0,0 +1 @@
48