2.1 – Sets. Examples: Set-Builder Notation Using Set-Builder Notation to Make Domains Explicit...

Preview:

Citation preview

2.1 – Sets Definition:

Notation: • Uppercase letters A, B, S, T, etc.• Set braces, e.g. S={2, red, water, {1}}• Membership:

means means

• {2,2,4,5,4,7,2}=

Examples:

• Let S be the set of all of the people in this room.

• Standard sets:

Set-Builder Notation

• General form is { x | P(x) } for some predicate P(x).

• Examples:

• Symbol | or : in the notation means

Using Set-Builder Notation to Make Domains Explicit

• Examples

}

{𝑥∈ℤ∨𝑥2<10 }

{𝑥∈ℕ∨𝑥2<10 }

Examples:

(a) Set of all integers which are perfect squares.

(b) {2,4,6}

Venn Diagrams

• “Universal Set” U

• Picturing set as a restricted portion of the universal set

Special Kinds of Sets

• Empty set

• Question:

Subsets

• Notation • Define using the predicate calculus:

• Questions: For all sets S,.– Is ?– Is ?

Is ?

Is ?

Set Equality

if and only if

Miscellaneous

• Proper subsets

• Cardinality of a set

• Finite sets

• Infinite sets

New Sets from Old

• The power set

• Cartesian products (ordered pairs, n-tuples)

Examples: 𝐵={1,2 } ,𝐶= {𝑎 ,𝑏 ,𝑐 }

𝐵×𝐶=¿

|𝐵×𝐶|=¿

𝑃 (∅ )=¿

𝑃 ( {∅ } )=¿

𝑃 (𝐵 )=¿

2.2 Set Operations

• The union of two sets and is the set of all elements which are either in or in .

• Set-Builder notation:

• Venn Diagram:

Intersection

• The intersection of two sets and is the set of all elements common to both.

• Set-builder notation:

• Venn Diagram:

Generalized Unions and Intersections

• These are well-defined because of associativity

More Definitions

• Disjoint sets:

• Mutually Disjoint collections of sets:

More Definitions

• Principle of Inclusion-Exclusion

• Set Difference

Set Complement

• Definition of set complement:

• Venn Diagram:

Proving Set Identities (Listed in Table 1 on page 124)

𝐴∩ ( 𝐴∪𝐵 )=𝐴 (2nd Absorption Law)

𝐴∪𝐵=𝐴∩𝐵 1st De Morgan Law

Recommended