Docsity

Discrete Structures lecture 3 - Predicates and Quantifiers, Slides of Discrete Structures and Graph Theory

Partial preview of the text

Download Discrete Structures lecture 3 - Predicates and Quantifiers and more Slides Discrete Structures and Graph Theory in PDF only on Docsity!

CSD101 - Discrete Structures

(Discrete Mathematics)

Spring 2016

Lecture - 3 Predicates and Quantifiers

Questions

Show that each of these conditional statements is a tautology or not by using logical equivalence identities.

  • ¬(𝑝 → 𝑞) → ¬𝑞
  • ¬(𝑝 → 𝑞) → 𝑝
  • (𝑝 → 𝑞) → ¬𝑞
  • [¬𝑝 ∧ 𝑝 ∨ 𝑞 ] → ¬𝑞

Bitwise Operations

• We can then do operations on these Boolean

strings

  • Each column is its own Boolean operation Operations Operator Bit String1 Bit String 2 Result Bitwise XOR  0101 1010 1011 0100 1110 1110 Bitwise OR  0101 1010 1011 0100 1111 1110 Bitwise AND  0101 1010 1011 0100 00010000

Predicate Logic

• Proposition, YES or NO?

• X + 2 = 5

• X + 2 = 5 for any choice of X in {1, 2, 3}

• X + 4 = 5 for some X in {1, 2, 3}

Yes No Yes Yes

Predicates

• A predicate is a declarative statement with at

least one variable (i.e. unknown value).

• A predicate, or propositional function, is a function

that takes some variable(s) as arguments and

returns True or False.

Propositional Functions(Example)

  • “x is greater than 3” or (x > 3)
    • The variable x: subject of the statement
    • “is greater than 3”: predicate
    • P(x): propositional function P at x
  • Let P(x) = x > 3
    • P(x) has no truth values (x is not given a value)
    • P(10) is true: The proposition 10 > 3 is true.
    • P(1) is false: The proposition 1 > 3 is false.

Propositional Functions

  • Functions with multiple variables:

• P(x,y) = x + y == 0

  • P(1,2) is false, P(1,-1) is true

• P(x,y,z) = x + y == z

  • P(3,4,5) is false, P(1,2,3) is true

• P(x

1

,x

2

,x

3

… x

n

  • Anatomy of a propositional function
  • P(x) = x + 5 > x variable predicate

Predicates

  • Suppose Q(x,y) = “x > y” Proposition, YES or NO? Q(x,y) Q(3,4) Q(x,9)

Predicate, YES or NO?

Q(x,y)

Q(3,4)

Q(x,9)

No Yes No Yes Yes No

Types of Quantifiers

• A quantifier is “an operator that limits the

variables of a proposition”.

• Two types:

• Universal

• Existential

Universal Quantifiers

  • The universal quantification of P(x) is the statement “ P(x) for all values of x in the domain.” The notation ∀ xP(x) denotes the universal quantification of P(x). Here ∀ is called the universal quantifier. We read ∀ xP(x) as “for all xP(x) ” or “for every xP(x) .” An element for which P(x) is false is called a counterexample of ∀ xP(x).

Universal Quantifiers

  • Many mathematical statements assert that a property is true for all values of a variable in a particular domain, called the domain of discourse (or the universe of discourse ), often just referred to as the domain.
  • The domain specifies the possible values of the variable x.
  • The meaning of the universal quantification of P(x) changes when we change the domain. The domain must always be specified when a universal quantifier is used; without it, the universal quantification of a statement is not defined.

Universal Quantifiers

  • Let the universe of discourse be the real numbers.
  • Let P(x) = x/2 < x
    • Not true for the negative numbers!
    • Thus, x P(x) is false
    • When the domain is all the real numbers
  • In order to prove that a universal quantification is true, it must be shown for ALL cases
  • In order to prove that a universal quantification is false, it must be shown to be false for only ONE case

Universal Quantification

  • Given some propositional function P(x) And values in the universe x 1 .. x n
  • The universal quantification x P(x) implies:
    • P(x 1 )  P(x 2 )  …  P(xn)

Existential Quantification

  • Represented by an backwards E: 

• It means “there exists”

• Let P(x) = x+1 > x

  • We can state the following:

• x P(x)

• English translation: “there exists (a value of)

x such that P(x) is true”

• English translation: “for at least one value of

x, x+1>x is true”

• English translation: “for some x, P(x)”