Docsity

Logic - Discrete Structures - Slides | CSE 2813, Study notes of Discrete Structures and Graph Theory

Partial preview of the text

Download Logic - Discrete Structures - Slides | CSE 2813 and more Study notes Discrete Structures and Graph Theory in PDF only on Docsity!

Logic

Section 1.

Proposition

  • (^) Statement that is true or false.
  • (^) Examples
    • (^) The capital of New York is Albany.
    • (^) The moon is made of green cheese.
    • (^) Go to town.
    • (^) What time is it?
    • (^) x + 1 = 2.

Negation (NOT)

  • (^) p : I am going to town.
  • (^) ~ p : I am not going to town.
  • (^) Truth table: p ~ p T F F T

Truth Tables

  • (^) A truth table lists ALL possible values of a (compound) proposition - (^) one column for each propositional variable - (^) one column for the compound proposition - 2 n^ rows for n propositional variables

Disjunction (OR)

  • (^) p : I am going to town.
  • (^) q : It is raining.
  • (^) p ๏ƒš q : I am going to town or it is raining.
  • (^) Inclusive or - only one proposition needs to be true for the disjunction to be true.

Exclusive OR

  • (^) p : I am going to town.
  • (^) q : It is raining.
  • (^) p ๏ƒ… q : Either I am going to town or it is raining.
  • (^) Only one of p and q are true. (not both)

Implication -

Equivalent Forms

  • (^) If p , then q
  • (^) p implies q
  • (^) If p , q
  • (^) q if p
  • (^) q whenever p
  • (^) p is a sufficient condition for q
  • (^) q is a necessary condition for p
  • (^) p only if q

Converse of an

Implication

  • (^) Implication: p ๏‚ฎ q
  • (^) Converse: q ๏‚ฎ p
  • (^) Implication:
    • (^) If I am going to town, it is raining.
  • (^) Converse:
    • (^) If it is raining, then I am going to town.

Inverse of an

Implication

  • (^) Implication: p ๏‚ฎ q
  • (^) Inverse: ๏ƒ˜ p ๏‚ฎ ๏ƒ˜ q
  • (^) Implication:
    • (^) If I am going to town, it is raining.
  • (^) Inverse:
    • (^) If I am not going to town, then it is not raining.

Biconditional

  • (^) โ€œif and only ifโ€, โ€œiffโ€
  • (^) p ๏‚ซ q
  • (^) I am going to town if and only if it is raining.
  • (^) Both p and q must have the same truth value for the assertion to be true.

Constructing complex

truth tables

  • (^) Add intermediate columns for smaller (compound) propositions
  • (^) ( p ๏ƒš q ) ๏‚ฎ ๏ƒ˜ r

Precedence of Logical

Operators

  • (^) Parentheses gets the highest precedence
  • (^) Then ๏ƒ˜ ๏ƒ™ ๏ƒš ๏‚ฎ ๏‚ซ
  • (^) Example: p ๏ƒ™ q ๏ƒš r means ( p ๏ƒ™ q ) ๏ƒš r , not p ๏ƒ™ ( q ๏ƒš r ) p ๏ƒš q ๏‚ฎ r means ( p ๏ƒš q ) ๏‚ฎ r

Next Lecture

  • (^) Section 1.2 Propositional Equivalences