Docsity

Nested Quantifiers - Discrete Mathematics and its Applications - Lecture Slides, Slides of Discrete Mathematics

Partial preview of the text

Download Nested Quantifiers - Discrete Mathematics and its Applications - Lecture Slides and more Slides Discrete Mathematics in PDF only on Docsity!

Discrete Math 6A

Recap

  1. Proposition: statement that is true or false.
  2. Logical operators: NOT, AND, OR, XOR, ๏ƒ , ๏ƒŸ๏ƒ 
  3. Compound proposition: a new proposition by combining old ones using operators.
  4. Logical equivalences: p๏ƒŸ๏ƒ q always true.
  5. Predicate: property of a statement with variables (>3).
  6. Quantifier: โ€œthere isโ€ , โ€œfor allโ€. These turn statements

with variables into propositions.

1.4 Order of Quantifiers

Important: The order in which quantifiers occur can be very important!

i.e not always true.

Example: x,y real.

Is this proposition true?

โˆƒ y โˆ€ x ( x + y = 0 ) โ†”โˆ€ x โˆƒ y ( x + y = 0 )

left: There is a y such that for all x (x+y=0). (F)

right: For all x there is a y such that x+y=0 (T)

Proposition is therefore False.

What do we learn? The order is important!

โˆƒ y โˆ€ xP ( x , y )โ†”โˆ€ x โˆƒ yP ( x , y )

However the following compound propositions are always true.

Left and right are equivalent.

( , ) ( , )

( , ) ( , )

x yP x y y xP x y

x yP x y y xP x y

โˆƒ โˆƒ โ†”โˆƒ โˆƒ

โˆ€ โˆ€ โ†”โˆ€ โˆ€

1.4 Nested Quantifiers

Tip: You can think of expression with quantifiers as executing โ€œloopsโ€ in

a computer program:

Example:

First loop over y and and for every y loop over x.

For every value of y, check if P(x,y) is true for all x.

If you found one, the proposition must be true.

โˆƒ y โˆ€ xP ( x , y )

1.6 Sets

Famous sets in math: N = {0,1,2,3,...}

Z = {...,-2,-1,0,1,2,...}

Z+ = {1,2,3,...}

Q = {p/q | p in Z, q in Z, q is not 0}

R = {x | x is a real number}.

{,...} is used to indicate the the rest of the sequence once itโ€™s clear how to

proceed {1,2,3,...}

set builder notation : {x | conditions(x) }.

This could be read as โ€œall x such that the conditions hold trueโ€.

Definition: Two sets are equal iff they contain the same elements.

Example: {1 2 2 3 3 3 3 4 6 } = {1 2 3 4 6} = {6 4 1 3 2}

A = B โ†” โˆ€ x x ( โˆˆ A โ†” x โˆˆ B )

notation for โ€œx is an

element of Bโ€.

1.6 Sets

Subset : A is a subset of B iff every element of A is an element of B.

A โІ B = โˆ€ x x ( โˆˆ A โ†’ x โˆˆ B )

notation for:

โ€œA is a subset

of Bโ€

Example: all even integers are a subset of all integers.

all Math6A students are a subset of all students.

1.6 Sets

Empty set: Set that contains no elemenst. โˆ… ={}

Proposition: For any nonempty set S :

Attention:

โˆ… โ‰  โˆ…{ }

( ) i โˆ… โІ S ( ) ii S โІ S

Is this true?

(i) โˆ… โІ S โ†” โˆ€ x x ( โˆˆโˆ… โ†’ x โˆˆ S )

Thus: if the right is true, the left must be true.

However, the premises: is false, and thus the implication is tue.

x โˆˆโˆ…

(ii) S โІ S โ†” โˆ€ x x ( โˆˆ S โ†’ x โˆˆ S )

Clearly the right is true, so the left must be true.

1.6 Sets.

Proper Subset: A is a proper subset of B iff A is a subset of B and A is not equal to B

A โŠ‚ B = ( A โІ B ) โˆง ( A โ‰  B )

Sets may contain other sets as members!

Example: {0, {a},{b}, {a,b}} = {x|x is a subset of {a,b}}

Note โ€œaโ€ is not โ€œ{a}โ€.

Cardinality: The cardinality of A is the number of distinct elements in A: |A|.

Also: S is finite in this case.

Infinite set: a set that is not finite. (e.g. all integers, real numbers).

countable uncountable

Docsity.com

1.6 sets

Cartesian product: The set of all ordered pairs (a,b) where a in A and b in B.

A ร— B = {( , a b ) | a โˆˆ A โˆง b โˆˆ B }

Note: we have mapped two sets to a new set.

Example: A={1,2,3} B={a,b}

AXB = {(1,a),(1,b),(2,a),(2,b),(3,a),(3,b)}.

Note that order in (.) is important, but order in {.} is not important.

AXB is not the same as BXA! (unless A=B).

Relation: A relation between A and B is a subset of AXB.