You are on page 1of 10

Homework 1

Hoang Quoc Viet


January 16, 2024

1 Warm up
True
Example: The statement ”The sun rises in the east” is considered true.
Truth
Example: The truth of the statement ”I enjoy playing basketball” is based
on personal experience.
Valid
Example: He give a valid argument to all the competitors in a debate.
Correct
Example: Let’s correct that math , it’s wrong on so many levels.
Fallacy
Example: The fallacy of some theory can lead human’s mind to the bridge
of explosion.
Contradiction
Example: The statement ”It is raining heavily, and it is not raining at all”
is a contradiction.
Paradox
Example: The ”grandfather paradox” in time travel, where someone goes
back in time and kills their own grandfather before the birth of their own parent,
raising the question of their existence.
Counterexample
Example: It is commonly conjectured that ”all prime numbers greater than
2 are odd.” However, the counterexample of 2 disproves this since it is a prime
number, but it is not odd.
Premise
Example:If you want to increase your score, the suplement is premise.
Assumption
Example: The Law of Motion is an assumption.
Presumption
Example: In a courtroom, the presumption of innocence holds that a defen-
dant is considered innocent until proven guilty based on the evidence presented.
Axiom
Example: ”Human body has two arms” is an axiom.

1
Hypothesis
Example: In the past, there is a hypothesis about the earth that its shape
is like a plate.
Conjecture
Example: The Goldbach Conjecture in number theory states that every even
integer greater than 2 can be expressed as the sum of two prime numbers.
Tautology: A tautology is a statement that is always true, regardless of the
truth values of its individual components. It is a redundant or uninformative
statement.
Example: ”It is what it is” or ”A bachelor is an unmarried man” are tau-
tologies because they state something that is inherently true by definition.
Satisfiable
Example: The statement ”P OR Q” is satisfiable if either P or Q is true.
Contingency: In logic, a contingency refers to a proposition or statement
that is neither necessarily true nor necessarily false. It is dependent on certain
conditions or circumstances.
Example: The statement ”It will rain tomorrow” is a contingency because
its truth depends on the specific weather conditions that may arise.
Inference
Example: From the two premises ”All cats have tails” and ”Fluffy is a cat,”
the inference can be made that ”Fluffy has a tail.”
Argument
Example: ”Smoking is harmful because it can cause cancer” is an argument.
Reasoning
Example: Deductive reasoning starts from general principles or premises and
applies logical rules to derive specific conclusions.

2 Section 1.1
Exercise 8
a/ ¬p expressed: I did not buy a lottery ticket this week.
b/p ∨ qexpressed: Either i bought a lottery ticket this week or i won the
million dollar jackpot on Sunday.
c/p → q expressed: If i bought a lottery ticket this week, i won the million
dollar jackpot on Sunday.
d/p ∧ qexpressed: I bought a lottery ticket this week and i won the million
dollar jackpot on Sunday.
e/p → q expressed: I bought a lottery ticket this week if and only if i won
the million dollar jackpot on Sunday.
f/¬p → ¬q expressed: If i did not buy a lottery ticket this week, i did not
win the million dollar jackpot on Sunday.
g/¬p ∧ ¬qexpressed: I did not buy a lottery ticket this week and i did not
win the million dollar jackpot on Sunday.

2
h/ ¬p ∨ (p ∧ q)expressed: Either i did not buy the lottery ticket or else i
bought one and won the million dollar jackpot on Sunday.

Exercise 9
a/ ¬q expressed: Sharks have not been spotted near the shore.
b/p ∧ qexpressed: Swimming at the New Jersey shore is allowed and Sharks
have been spotted near the shore.
c/ ¬p ∨ qexpressed: Swimming at the New Jersey shore is not allowed or
sharks have been spotted near the shore.
d/ p → ¬q expressed: If swimming at the New Jersey shore is allowed, then
sharks have not been spotted near the shore.
e/ ¬q → q expressed: If sharks have not been spotted near the shore, swim-
ming at the New Jersey shore is allowed.
f/¬p → ¬qexpressed: If swimming at the New Jersey shore is not allowed,
sharks have not been spotted near the shore.
g/ p → ¬q expressed: Swimming at the New Jersey shore is allowed if and
only if sharks have not been spotted near the shore.
h/ ¬p∧(p∨¬q) expressed: Swimming at the New Jersey shore is not allowed
and either swimming at the New Jersey shore is allowed or sharks have not been
spotted near the shore.

Exercise 11
a/ It is below freezing and snowing converted:p ∧ q
b/ It is below freezing but not snowing converted:p ∧ ¬q
c/ It is not below freezing and it is not snowing converted: ¬p ∧ ¬q
d/ It is either snowing or below freezing (or both) converted:p ∨ q
e/ If it is below freezing, it is also snowing converted:p → q
f/ Either it is below freezing or it is snowing, but it is not snowing if it is
below freezing converted: (p ∨ q) ∧ (¬p → ¬q)
g/ That it is below freezing is necessary and sufficient for it to be snowing
converted: p → q

Exercise 12
a/ p → q expressed: If you have the flu, you miss the final examination.
b/¬q → rexpressed: You do not miss the final exam if and only if you pass
the course.
c/ q → ¬r expressed: If you miss the final exam, you do not pass the course.
d/ p ∨ q ∨ rexpressed: You have the flu, or miss the final exam, or pass the
course.

3
e/ (p → ¬r) ∨ (q → ¬r) expressed: It is either the case that if you have the
flu then you do not pass the course or the case that if you miss the final exam
then you do not pass the course (or both).
f/ (p ∧ q) ∨ (¬q ∧ r) expressed: Either you have the flu and miss the final
exam, or you do not miss the final exam and do pass the course.

Exercise 15
a/ Berries are ripe along the trail, but grizzly bears have not been seen in the
area converted:r ∧ ¬p.
b/ Grizzly bears have not been seen in the area and hiking on the trail is
safe, but berries are ripe along the trail converted:¬p ∧ q ∧ r.
c/ If berries are ripe along the trail, hiking is safe if and only if grizzly bears
have not been seen in the area converted:r → (q → ¬p).
d/ It is not safe to hike on the trail, but grizzly bears have not been seen in
the area and the berries along the trail are ripe converted:¬q ∧ ¬p ∧ r.
e/ For hiking on the trail to be safe, it is necessary but not sufficient that
berries not be ripe along the trail and for grizzly bears not to have been seen in
the area converted: (q → (¬r ∧ ¬p)) ∧ ¬((¬r ∧ ¬p) → q).
f/ Hiking is not safe on the trail whenever grizzly bears have been seen in
the area and berries are ripe along the trail converted:(p ∧ r) → ¬q.

Exercise 16
a/2 + 2 = 4 if and only if 1 + 1 = 2. This is True→ True, so it True.
b/1 + 1 = 2 if and only if 2 + 3 = 4. This is True → False, so it False.
c/ 1 + 1 = 3 if and only if monkeys can fly. This is False→False, so it True.
d/ 0 > 1 if and only if 2 > 1. This is False → True, so it False.

Exercise 17
a/ If 1 + 1 = 2, then 2 + 2 = 5. This is True → False, so it False.
b/ If 1 + 1 = 3, then 2 + 2 = 4. This is False → True, so it True.
c/ If 1 + 1 = 3, then 2 + 2 = 5. This is False → False, so it True.
d/ If monkeys can fly, then 1 + 1 = 3. This is False → False, so it True.

Exercise 36
a/ (p ∨ q) ∨ r
b/ (p ∨ q) ∧ r

4
pqr (p ∨ q) ∨ r (p ∨ q) ∧ r
TTT T T
TTF T F
TFT T T
TFT T T
TFF T F
FTT T T
FTF T F
FFT T F
FFF F F
c/ (p ∧ q) ∨ rd/(p ∧ q) ∧ r
pqr (p ∧ q) ∨ r (p ∧ q) ∧ r
TTT T T
TTF T F
TFT T F
TFF F F
FTT T F
FTF F F
FFT T F
FFF F F
e/ (p ∨ q) ∧ ¬rf /(p ∧ q) ∨ ¬r
pqr (p ∨ q) ∧ ¬r (p ∧ q) ∨ ¬r
TTT F T
TTF T T
TFT F F
TFF T T
FTT F F
FTF T T
FFT F F
FFF F T

Exercise 37
a/p → (¬q ∨ r)
b/¬p → (q → r)
c/ (p → q) ∨ (¬p → r)
d/ (p → q) ∧ (¬p → r)

5
pqr p → (¬q ∨ r) ¬p → (q → r) (p → q) ∨ (¬p → r) (p → q) ∧ (¬p → r)
TTT T T T T
TTF F T T T
TFT T T T F
TFF T T T F
FTT T T T T
FTF T F T F
FFT T T T T
FFF T T T F
e/ (p ↔ q) ∨ (¬q ↔ r)
f/ (¬p ↔ ¬q) ↔ (q ↔ r)
pqr (p ↔ q) ∨ (¬q ↔ r) (¬p ↔ ¬q) ↔ (q ↔ r)
TTT T T
TTF T F
TFT T T
TFF F F
FTT F F
FTF T T
FFT T F
FFF T T

Exercise 44
a/ 11000 ∧ (01011 ∨ 11011) = 11000 ∧ 11011 = 11000
b/ (01111 ∧ 10101) ∨ 01000 = 00101 ∨ 01000 = 01101
c/ (01010 ⊕ 11011) ⊕ 01000 = 10001 ⊕ 01000 = 11001
d/ (11011 ∨ 01010) ∧ (10001 ∨ 11011) = 11011 ∧ 11011 = 11011

Exercise 45
The truth value of the negation of a proposition in fuzzy logic is 1 minus the
truth value of the proposition. What are the truth values of the statements
”Fred is not happy” and ”John is not happy?”
→ For ”Fred is not happy”, the truth value is 1 − 0.8 = 0.2
→ For ”John is not happy”, the truth value is 1 − 0.4 = 0.6

3 Section 1.2
Exercise 6
Answer of u: (b32 ∧ g1 ∧ r1 ∧ h16) ∨ (b64 ∧ g2 ∧ r2 ∧ h32)

6
Exercise 7
a/ The message is scanned for viruses whenever the message was sent from an
unknown system converted: q → p
b/ The message was sent from an unknown system but it was not scanned
for viruses converted:q ∨ ¬p
c/ It is necessary to scan the message for viruses whenever it was sent from
an unknown system converted: q → p
d/ When a message is not sent from an unknown system it is not scanned
for viruses converted:¬q → ¬p

Exercise 19
A says “At least one of us is a knave” and B says nothing.
Solution:
If A is a knight, then he is telling the truth, so B must be a knave. And
since B said nothing, that is possible.
If A is a knave, then he is lying, which means his statements is false. So
they are both knights. That is a contradiction.
→ Conclude that A is a knight and B is a knave.

Exercise 36
a/ Answer: John did it. There are four cases to consider. Let’s call the sole
truth-teller A. If Alice is the A, then Carlos did it; but this means that John is
telling the truth, a contradiction. If John is the A, then Diana must be lying,
so she did it, but then Carlos is telling the truth, a contradiction. If Carlos is
the A, then Diana did it, but that makes John truthful, again a contradiction.
So the only possibility is that Diana is the A. This means that John is lying, so
he did it. In this case both Alice and Carlos are lying.
b/ Answer: There are four cases to consider. Since Carlos and Diana are
making contradictory statements, the liar must be one of them (we could have
used this approach in part (a) as well). Therefore Alice is telling the truth, so
Carlos did it. Note that John and Diana are telling the truth as well here, and
it is Carlos who is lying.

Exercise 37
Answer: If the first sign were true, then the second sign would also be true.
In that case, we could not have one true sign and one false sign. Rather, the
second sign is true and the first is false; there is a lady in the second room and
a tiger in the first room.

7
Exercise 38
A table will be shown as the answer for this Ex:
NATIONALITY Norwegian Italian Englishman Spaniard Japanese
COLOR Yellow Blue Red White Green
PET Fox Horse Snail Dog Zebra
JOB Diplomat Physician Photographer Violinist Painter
DRINK Water Tea Milk Juice Coffee

Exercise 39
Answer: The clues shown that there cannot be two honest senators. There-
fore,with at least one honest senator, there must be exactly 49 corrupt senators.

Exercise 40
a/ ¬p ∨ ¬q
b/ ¬(p ∨ ((¬p) ∧ q))

Exercise 41
a/ ¬(p ∧ (q ∨ ¬r))
b/ ((¬p) ∧ (¬q)) ∨ (p ∧ r)

8
Exercise 42
4 Section 1.3
Exercise 43
Answer: Given a compound proposition p, we can construct its truth table and
then, by Exercise 42, write down a proposition q in disjunctive normal form
that is logically equivalent to p. Since q involves only ¬, ∧ and ∨, this shows
that ¬, ∧ and ∨ form a functionally complete collection of logical operators.

Exercise 47
Answer:The definition of p|q will work in this case, we realize that p|q is False
when both p and q are True, and True for otherwise. That same result with
¬(p ∧ q). So they are both logically equivalent.

Exercise 49
Answer: Same, the definition of p ↓ q will work here, we all know that p ↓ q is
True when both p and q are False, and False for otherwise. That same result
with ¬(p ∨ q). So they are both logically equivalent.

Exercise 54
Answer: To show that these are not equivalent, we just need to find at least one
assignment of truth values to p, q, r, for which the truth value of p|(q|r) and
(p|q)|r differ. One such assignment is True for r and False for p and q, then we
see that p|(q|r)is True but (p|q)|r is False.

Exercise 59
Answer: All propositions are 9 disjunctions, so we only need to make at least
one proposition of the disjunctions is True. Let notice to 9 disjunctions, we can
see ¬p occurs in fours of the disjunctions and r occurs in three of the remaining
disjunctions. So we only need to make p False and r True. The remains only
p ∨ ¬q ∨ s and q ∨ ¬r ∨ ¬s, so we can satisfy both of those by making both q
and s become True. Conclusion, all disjunctions can be made simultaneously
true by making p False and q, s, r True.

9
Exercise 61
a/(p ∨ ¬q) ∧ (¬p ∨ q) ∧ (¬p ∨ ¬q) Solution: With a few trial we discover that if
p = False and q = False then it makes compound proposition return the value
True. So this compound proposition is satisfiable. (Note that this is the only
satisfying truth assignment.)
b/ (p → q) ∧ (p → ¬q) ∧ (¬p → q) ∧ (¬p → ¬q) Solution: We claim that
there is no satisfying truth assignment here. No matter what the truth value
of p and q be, the four implications always have at least one is False, so their
conjunction is false.
c/ (p ↔ q)∧(¬p ↔ q) Solution: This compound proposition is not satisfiable.
These two clause are in- compatible (first clause need True vs True to make it
True while second clause need False vs True to make it true. That is impossible),
so there is no satisfying truth assignment.

10

You might also like