Docsity

Understanding Logic: Propositions, Statements, and Operators, Slides of Discrete Structures and Graph Theory

Partial preview of the text

Download Understanding Logic: Propositions, Statements, and Operators and more Slides Discrete Structures and Graph Theory in PDF only on Docsity!

Let’s get started with...

• Logic!

Logic

  • Crucial for mathematical reasoning
  • Used for designing electronic circuitry
  • Logic is a system based on propositions.
  • A proposition is a statement that is either true or false (not both).
  • We say that the truth value of a proposition is either true (T) or false (F).
  • Corresponds to 1 and 0 in digital circuits

The Statement/Proposition Game

Is this a statement? yes

Is this a proposition? yes

What is the truth value

of the proposition? false

The Statement/Proposition Game

  • “y > 5”

Is this a statement? yes

Is this a proposition? no

Its truth value depends on the value of y, but this value is not specified.

We call this type of statement a propositional function or open sentence.

The Statement/Proposition Game

  • “Please do not fall asleep.”

Is this a statement? no

Is this a proposition? no

Only statements can be propositions.

It’s a request.

The Statement/Proposition Game

  • “If elephants were red,
  • they could hide in cherry trees.”

Is this a statement? yes

Is this a proposition? yes

What is the truth value

of the proposition? probably false

Combining Propositions

  • As we have seen in the previous examples, one or more propositions can be combined to form a single compound proposition.
  • We formalize this by denoting propositions with letters such as p, q, r, s, and introducing several logical operators.

Logical Operators (Connectives)

  • We will examine the following logical operators:
  • Negation (NOT)
  • Conjunction (AND)
  • Disjunction (OR)
  • Exclusive or (XOR)
  • Implication (if – then)
  • Biconditional (if and only if)
  • Truth tables can be used to show how these operators can combine propositions to compound propositions.

Conjunction (AND)

  • Binary Operator, Symbol: ∧

P Q P∧Q

T T T

T F F

F T F

F F F

Disjunction (OR)

  • Binary Operator, Symbol: ∨

P Q P∨Q

T T T

T F T

F T T

F F F

Implication (if - then)

  • Binary Operator, Symbol: →

P Q P→Q

T T T

T F F

F T T

F F T

Biconditional (if and only if)

  • Binary Operator, Symbol: ↔

P Q P↔Q

T T T

T F F

F T F

F F T

Statements and Operations

  • Statements and operators can be combined in any way to form new statements.

P Q P∧Q ¬ (P∧Q) (¬P)∨(¬Q)

T T T F F

T F F T T

F T F T T

F F F T T

Equivalent Statements

  • The statements ¬(P∧Q) and (¬P) ∨ (¬Q) are logically equivalent, since ¬(P∧Q) ↔ (¬P) ∨ (¬Q) is always true.

P Q ¬(P∧Q) (¬P)∨(¬Q) ¬(P∧Q)↔(¬P)∨(¬Q) T T F F T T F T T T F T T T T F F T T T