DS Lec 11
DS Lec 11
STRUCTURES
Lecture 11
Quantifiers
2
Basic Logic Gates
x
• Not x where x = ¬x
x xy
• And y where xy = x y
x x+y
• Or y where x+y = x y
x xy
• Nand y where ¬(xy)= xy
x x+y
• Nor y
xÅy
• Xor x
y
Constructing Circuits
Here is the circuit of the statement
(p q) (~p q) (p ~q)
Cont...
Following is the circuit output of the following
statement
(x + y) ¬ y
x
y
Constructing Circuits
Truth Set
If P(x) is a predicate and x has domain D, the truth set of
P(x) is the set of all elements of D that make P(x) true
when substituted for x. The truth set of P(x) is denoted by
{x D | P( x)}
The truth set of the above predicate is x R + x 0
Cont…
Example
Let P(x) = x is a factor of 8, Q(x)= x is a factor of 4
and R(x)= x < 5 and x 3 . The domain of x is
assumed to be Z .+ Use symbols , to indicate
true relationships among P(x), Q(x) and R(x).
12 1 32 3
52 5
22 2 42 4
Hence x D, x x. is true.
2
Hence x R, x 2 x. is false.
Existential Quantifier
Let Q(x) be a predicate and D the domain of
x. An existential statement is of the form.
x D such that Q(x)
It is true if and only if Q(x) is true for at least
one x in D.
Ex.2:
Let G={5,6,7,8,9,10} and consider the
statement ∃𝑚 ∈ 𝐺 𝑠. 𝑡. 𝑚2 = 𝑚
Show that this statement is false.
Sol: the statement is not true for every value of
the G. Thus ∃𝑚 ∈ 𝐺 𝑠. 𝑡. 𝑚2 = 𝑚 is false.
Translating from formal to informal language
Homework:
Q 1-8,11,12,13,37,38.
Discrete Structures 19