Logic 2: syntax trees and truth tables Flashcards

1
Q

Create a syntax tree for the following formula:
((p ↔ q) → r))

A

. →
/ \
↔ r
/ \
p q

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

what is parsing?

A

Analysing the structure of any valid formula.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What does a syntax tree do?

A

It can represent the result of parsing a formula.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the highest level connective in the following formula, and why?
((p ↔ q) → r)

A

→ is the highest level connective. This is because the whole formula is formed from (p ↔ q) and r, by means of this connective.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Create a syntax tree for the following formula:
(p ↔ (q → r))

A

. ↔
/ \
p →
/ \
q r

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the highest level connective in the following formula, and why?
(p ↔ (q → r))

A

↔ is the highest level connective. This is because the whole formula is formed from (q → r) and p, by means of this connective.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Paraphrase the following formula in English (give an informal interpretation):
((p ∧ q) → r) ∨ (p → (¬r))

A

if p and q are both true, then r is true, or, if p is true then r is false.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How can we give a formal meaning to a formula?

A

By means of a truth table.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the use of a Truth Table?

A

To give a formal meaning to a formula.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How do we represent ‘is true’ and ‘is false’ in a truth table?

A

T, F

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

T
What is the difference between true and T in the above table?

A

true is a syntactic object (like the keyword while in a programming language), whereas T stands for the property of being true.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

A ¬A
T F
F T
What does the above truth table tell us?

A

The truth table tells us all we need to know about the meaning of the connective ¬:
if a proposition is true, then its negation is false, and vice versa.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

The conjunction A ∧ B of A and B is true precisely when A and B are both
true. Express this formally in a truth table…

A

A B A ∧ B
T T T
T F F
F T F
F F F

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Create a truth table for the following formula:
A ∧ B

A

A B A ∧ B
T T T
T F F
F T F
F F F

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

The disjunction A ∨ B is true precisely when either one of A and B is true, or
both are true. Express this formally in a truth table…

A

A B A ∨ B
T T T
T F T
F T T
F F F

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Create a truth table for the following formula:
A ∨ B

A

A B A ∨ B
T T T
T F T
F T T
F F F

17
Q

we define A → B to be false
when A is true and B is false, and to be true in all other cases. Express this formally in a truth table…

A

A B A → B
T T T
T F F
F T T
F F T

18
Q

Create a truth table for the following formula:
A → B

A

A B A → B
T T T
T F F
F T T
F F T

19
Q

A ↔ B is true when A
and B have the same truth values.
Express this formally in a truth table…

A

A B A ↔ B
T T T
T F F
F T F
F F T

20
Q

Create a truth table for the following formula:
A ↔ B

A

A B A ↔ B
T T T
T F F
F T F
F F T

21
Q

What is the formal term used to describe the assignment of truth values to all propositional variables occurring in a formula.

A

interpretation of the formula.

22
Q

What does the formal term ‘interpret a formula’ mean?

A

It is a term used to describe the assignment of truth values to all propositional variables occurring in a formula. (AKA creating a truth table)

23
Q

How does one formally interpret a formula?

A

By creating a truth table, in which one assigns truth values to all propositional variables occuring in a formula.

24
Q

Create a truth table for the following formula:
¬(p ∧ q)

A

p q p ∧ q ¬(p ∧ q)
T T T F
T F F T
F T F T
F F F T

25
compress this truth table: p q p ∧ q ¬(p ∧ q) T T T F T F F T F T F T F F F T
p q ¬(p ∧ q) T T F T T F T F F T T F F F T F
25
reate a truth table for the following formula: (p → q) ∧ (q → p)
p q (p → q) ∧ (q → p) T T T T T T F F F T F T T F F F F T T T
26
what is a semantic turnstile?
|=
27
We say that an interpretation σ satisfies a formula A if and only if the interpretation σ makes the formula A T. How do we write this?
σ |= A
28
p q (p → q) ∧ (q → p) T T T T T T F F F T F T T F F F F T T T using the above truth table for (p → q) ∧ (q → p), interpret the truth table to satisfy the formula...
{p → F, q → F } |= (p → q) ∧ (q → p)
29
σ(p) = T and σ(q) = F How else could we write this?
σ = {p → T, q → F }
30