Exercises – Short Day#

Exercise 1: Repetition Exercise about Negation#

Consider again the logical propositions \(u\), \(v\), and \(w\) from Exercise 1 on Long Day.

Question a#

Write out the truth tables for \(\neg u\), \(\neg v\), and \(\neg w\).

Question b#

Now, let \(P\) and \(Q\) denote the negation of the logical propositions:

\(6\) is an odd number” and “\(3<7\)”.

What are the truth values of the three propositions \(u\), \(v\), and \(w\)?


Exercise 2: Implication#

Question a#

Let \(P\) be a logical proposition. Write out the truth tables for \((P \Rightarrow P) \Rightarrow P\) and \(P \Rightarrow (P \Rightarrow P)\).

Question b#

Are the above two logical propositions equivalent?


Exercise 3: Implication vs. Biimplication#

Question a#

Solve the first-degree equation \(x-2 = 3\).

Question b#

Maybe a student solves the above first-degree equation in a rather laborious manner with more steps than necessary. Also, they might forget to place implication arrows between the steps along the way. The steps might look as follows:

\(x-2=3\)

\((x-2)^2 =3^2\)

\(x^2 -4x+4=9\)

\(x^2 -4x -5 =0\)

\(x=-1 \vee x=5\)

Between which steps can we place biimplication arrows and between which only implication arrows? Explain why not every shown option for \(x\) after the last step necessarily is a solution to the original equation.

Question c#

Another student solves the above first-degree equation in another (and still rather laborious) way:

\(x-2=3\)

\(x-5 =0\)

\((x-5)^2 =0\)

\(x^2 -10x +25 =0\)

\(x=5\) (there is only one solution to the second-degree equation)

Between which steps can we place biimplication arrows and between which only implication arrows? Explain why this time every option for \(x\) after the last step is a solution to the original equation.


Exercise 4: Tautology#

Consider the logical proposition: \((P \vee Q)\vee (\neg P \wedge \neg Q)\).

Question a#

Show by the use of truth tables that this is a tautology.

Question b#

Explain in words that the above is a tautology.

Question c#

Repeat Question a but with the proposition \((P \Rightarrow Q)\vee (Q \Rightarrow P)\).

Question d#

Repeat Question a but now with the proposition \((P \Rightarrow Q)\vee (\neg P \Rightarrow Q)\).


Exercise 5: Equations#

Solve the following four equations by first introducing a tautology.

Question a#

  1. Solve the equation \(|x|=-x+1\).

  2. Solve the equation \(|x|=2x+1\).

  3. Solve the equation \(3|2x-1|=-4x+3\).

  4. Solve the equation \(|2x+1|=|-5x+3|\).


Exercise 6: Python Exercise#

In this exercise you will need the command console Python on your computer.

Question a#

Python can determine the truth value of some simple logical expressions. As examples, run the following Python code (note that Python displays the full words True and False rather than the short-hand \(\mathrm T\) and \(\mathrm F\) as used in the textbook):

2>5

3>1

1==1

Question b#

The logical operations \(\neg\), \(\wedge\), and \(\vee\) are written in Python as not, and, and or, respectively. As examples, run the following Python code and check whether the output is correct:

2>5 and 3>1

2>5 or 3>1

not (2>5 and 3>1)

True or False

not (True and False)

Question c#

In place of True and False one can also write 1 and 0, respectively, in Python. As examples, run the following Python code:

True == 1

False == 0

0 or 1

Question d#

Now fill in the truth table in Example 1.3.2 in the textbook using Python. It can be advantageous to use the shorter notation with 0 and 1 rather than False and True.