You are on page 1of 4

Challenge Assignment: Challenge Assignment: Logic

Beza Demssie

Department of Computer Science, University of Wisconsin –

MATH 310 Spring 2024

Professor Josh Stangle

Date: 2024, March 14.

1. (a) Use a truth table to prove that P ∨ Q ≡(¬P)⇒ Q.

In order to prove P ∨ Q ≡(¬P)⇒ Q using a table we have to show that (P ∨ Q) ⇔((¬P)⇒ Q) is


a tautology

P Q ¬P P∨Q ((¬P)⇒ Q) (P ∨ Q) ⇔((¬P)⇒ Q)

F F T F F T

F T T T T T

T F F T T T

T T F T T T

(b) Use (a) to prove that a conditional statement is logically equivalent to its own contrapositive
WITHOUT using a truth table

We need to pro
𝑃 ⇒ 𝑄 ⇔ ¬𝑄 ⇒ ¬𝑃 𝑖𝑠 𝑎 𝑡𝑎𝑢𝑡𝑜𝑙𝑜𝑔𝑦

P ∨ Q ≡(¬P)⇒ Q…………………. Priori


¬P ∨ Q ≡P⇒ Q applying law of negation

¬𝑃 ∨ 𝑄 ⇔ 𝑄 ∨ ¬𝑃 applying the equivalence given in our priori

We get ¬𝑃 ∨ 𝑄 ⇔ ¬𝑃 ∨ 𝑄 but we know that 𝑃 ⇔ 𝑃 𝑖𝑠 𝑎 𝑡𝑎𝑢𝑡𝑜𝑙𝑜𝑔𝑦

This implies that any conditional statement is logically equivalent to its own contrapositive
2
(c) x is even or 𝑥 is odd
𝑃 = 𝑥 𝑖𝑠 𝑒𝑣𝑒𝑛
2
𝑄 = 𝑥 𝑖𝑠 𝑜𝑑𝑑

𝑃 ∨ 𝑄 ⇔ (¬𝑃) ⇒ 𝑄
2 2
𝑖𝑓 𝑥 𝑖𝑠 𝑛𝑜𝑡 𝑒𝑣𝑒𝑛 𝑡ℎ𝑒𝑛 𝑥 𝑖𝑠 𝑜𝑑𝑑 ≡ 𝑥 𝑖𝑠 𝑒𝑣𝑒𝑛 𝑜𝑟 𝑥 𝑖𝑠 𝑜𝑑𝑑
If we can prove 𝑃 ∨ 𝑄
If x is not even, it means it is odd, the square of odd number is always odd
2 2
(2𝑛 + 1) = 4𝑛 + 4𝑛 + 1

2
Let k = 2𝑛 + 2𝑛
2𝑘 + 1 𝑤ℎ𝑖𝑐ℎ 𝑖𝑠 𝑜𝑑𝑑

2 2
We proved that 𝑖𝑓 𝑥 𝑖𝑠 𝑛𝑜𝑡 𝑒𝑣𝑒𝑛 𝑡ℎ𝑒𝑛 𝑥 𝑖𝑠 𝑜𝑑𝑑 ≡ 𝑥 𝑖𝑠 𝑒𝑣𝑒𝑛 𝑜𝑟 𝑥 𝑖𝑠 𝑜𝑑𝑑

And because 𝑃 ∨ 𝑄 ⇔ (¬𝑃) ⇒ 𝑄


2
x is even or 𝑥 is odd is also true

3. Premises
● Superior, WI was founded in 1814.
● Superior is the northernmost city in Wisconsin or Superior is the 5th largest city in
Wisconsin.
● If Superior is the northernmost city in Wisconsin, then Superior, WI was founded in
1822.

𝑃 = 𝑆𝑢𝑝𝑒𝑟𝑖𝑜𝑟, 𝑊𝐼 𝑤𝑎𝑠 𝑓𝑜𝑢𝑛𝑑𝑒𝑑 𝑖𝑛 1814.


𝑄 = 𝑆𝑢𝑝𝑒𝑟𝑖𝑜𝑟 𝑖𝑠 𝑡ℎ𝑒 𝑛𝑜𝑟𝑡ℎ𝑒𝑟𝑛𝑚𝑜𝑠𝑡 𝑐𝑖𝑡𝑦 𝑖𝑛 𝑊𝑖𝑠𝑐𝑜𝑛𝑠𝑖𝑛
𝑅 = 𝑆𝑢𝑝𝑒𝑟𝑖𝑜𝑟 𝑖𝑠 𝑡ℎ𝑒 5𝑡ℎ 𝑙𝑎𝑟𝑔𝑒𝑠𝑡 𝑐𝑖𝑡𝑦 𝑖𝑛 𝑊𝑖𝑠𝑐𝑜𝑛𝑠𝑖𝑛.

𝑃
𝑄 ∨𝑅
𝑄 ⇒𝑃
(a) Superior is the northernmost city in Wisconsin.

We cannot determine the truth state of this statement from the given premises, and here is why:
𝑃 is true (premise)
𝑄 ⇒ 𝑃 is also true (premise)

The truth value of Q here can be T or F because 𝐹 ⇒ 𝑇 𝑖𝑠 𝑡𝑟𝑢𝑒 𝑎𝑛𝑑 𝑇 ⇒ 𝑇 is also true

(b) Superior is the 5th largest city in Wisconsin.

Again this is also ambiguous,


𝑄 ∨ 𝑅 is true (premise)

R can be T or F still the premise is true.

The disjunctive statement only guarantees that at least one of the possibilities (northernmost or
5th largest) is true, but it doesn't tell us which one.
(c) Superior is the 5th largest or northernmost city in Wisconsin
This statement is guaranteed to be true based on the given premises

. The disjunctive statement 𝑄 ∨ 𝑅


explicitly states that Superior must be either the northernmost city or the 5th largest city. Since
at least one of these options must be true (premise). This given statement is true.

3.
(a) Determine the truth value of ∀x ∈ Z, ∃y ∈ Z, P(x, y)

This statement reads "For all integers x, there exists an integer y such that x > 2y + 1". To
evaluate its truth value, we need to consider if we can find a value for y that makes P(x, y) true
for any integer x.

This means that for any value of x we pick there will always be at least one value y that satisfies
the inequality, and this is true, because 2y+1 can be made less than any number x by picking the
right y values. Another proof is since 2y+1 is an Integer as well, let’s denote is as w

So the inequality is now ∀x ∈ Z, ∃w ∈Z x>w this can be interpreted as for for any number
x there is exist another number w that’s less than x which is true according to number theory.
b) Determine the truth value of ∃x ∈ Z, ∀y ∈ Z, P(x, y)

This statement reads


There exists an integer x such that for all integers y, x > 2y + 1 or there exist x greater than any
other integer 2y+1 which is false!

4. Consider the following conjecture: conjecture: For all functions f : Z → Z, there exists an x ∈
Z such that f(x) = 0 and f(x + 1) = 2.
(a) Try to determine/justify the truth value of the conjecture without using negation

The conjecture states: "For all functions f : Z → Z (f maps integers to integers), there exists an
integer x such that f(x) = 0 and f(x + 1) = 2."

In order to justify/disprove this conjecture, let’s try to find a counterexample where for any
integer x we choose, f(x) ≠ 0 or f(x + 1) ≠ 2.

Let’s take f(x) = x+1


Checking f(x) = 0, x =0 f(x+1) = f(1) = 1
1≠ 2

We can say that thai conjecture is false.


B.
There exists a function f : Z → Z such that for all integers x, either f(x) ≠ 0 or f(x + 1) ≠ 2.

There's at least one function that maps integers to integers, where for any integer we pick, the
function's output at that number (f(x)) is not 0, or the function's output at one more than that
number (f(x + 1)) is not 2 .

C.

we have shown that the original conjecture is false; this implies its negation is true!

We can prove this by finding one function that maps integers to integers where f(x) ≠ 0 or f(x+1)
≠2

We can use f(x) = x+1


For any x we pick the disjunction f(x) ≠ 0 or f(x+1) ≠ 2 will always be true

You might also like