Discrete Structures

# Lecture Notes, 27 Oct 2010

 Last Update: 27 October 2010 Note: or material is highlighted

## §§2.1–2.2: Sets & Set Operations

1. Cardinality:

1. Def:

Let S = {e1, …, en}.

• I.e., S is a finite set!

Then the cardinality of S =def n

• I.e., the cardinality of a set is the number of elements that it has.

2. Notation: |S| for: the cardinality of S

3. E.g.:

1. Let Alpha = {A,B,…,Z}.
Then |Alpha| = 26.

2. || = 0.
3. |{0,1,2}| = 3.
4. |℘({0,1,2})| = 8

• Note: 8 = 23. Coincidence? I don't think so!
• In general, |℘(S)| = 2|S|

2. Cartesian Product:

1. Def:

Let A,B be sets.
Then the Cartesian product of A,B =def {(a, b) | (a ∈ A) ∧ (b ∈ B)}

2. Note: (a, b) is an "ordered pair" with a first element & a second element

• So, (a, b) ≠ (b, a)

3. Notation: A × B for: the Cartesian product of A,B

4. E.g.:

1. Let S = {a, b}
and T = {0,1,2}.

Then S × T = {(s, t) | (s ∈ S) ∧ (t ∈ T)}
= {(a,0), (a,1), (a,2), (b,0), (b,1), (b,2)}

• Note: |S × T| = 6 = |S| * |T| (!)

2. T × S = {(t, s) | (s ∈ S) ∧ (t ∈ T)}
= {(0,a), (1,a), (2,a), (0,b), (1,b), (2,b)}
≠ S × T

• But: |T × S| = |S × T|

3. S × S = {(a,a), (a,b), (b,a), (b,b)}

5. Def:

Let A1, …, An be sets.
Then A1 × … × An =def {(a1, …, an) | ∀i[ai ∈ Ai]}

• Note the quantification over the subscript!

3. Ordered n-Tuples:

1. Def: (Kuratowski's Def of Ordered Pair)

The ordered pair (a, b) =def { {a}, {a, b} }

2. Axiom governing this definition:

(∀a,b,c,d)[(a, b) = (c, d) ↔ [(a = c) ∧ (b = d)]]

• Note the abbreviation of ∀abcd as (∀a,b,c,d)

3. Def:

• The ordered triple (a,b,c) =def the ordered pair (a, (b, c))
= { {a}, (b, c) }
= { {a}, { {b}, {b, c} } }
• The ordered quadruple (a,b,c,d) =def the ordered pair (a, (b, (c, d)))
• The ordered quintuple (a,b,c,d,e) =def the ordered pair (a, (b, (c, (d, e))))
• The ordered n-tuple or sequence (a1, … an)
=def the ordered pair (a1, (a2, (a3, … (an–1, an)…)))

1. E.g.: Ordered-Alpha = (A,B,C,…,Z) is an ordered 26-tuple.

• Ordered-Alpha ≠ Alpha = {A,B,C,…,Z} = {Z,Y,X,…A}, etc.

2. Let POTUS2010 = {GW, JA, TJ, …, GWB, BO}.
Then |POTUS2010| = 43.
But BO is the 44th President! How can that be?

• Ordered-POTUS2010 = (GW, JA, TJ, …, CAA, GC, BH, GC, WMcK, …, GWB, BO),
where GW was the 1st President,
…,
Chester Alan Arthur was the 21st,
Grover Cleveland (from Buffalo) was the 22nd,
Benjamin Harrison was the 23rd,
Grover Cleveland was re-elected as the 24th(!)
William McKinley (assassinated in Buffalo!) was the 25th,

and Barack Obama is the 44th.

• Ordered n-tuples can have duplicate "members".

4. Set Operations:

1. Defs:

Let A,B be sets.
Then:

1. A ∪ B (the union of A,B) =def {x | (x ∈ A) ∨ (x ∈ B)}

2. A ∩ B (the intersection of A,B) =def {x | (x ∈ A) ∧ (x ∈ B)}

3. A and B are disjoint =def A ∩ B = ∅

4. A – B (the set difference of A,B) =def {x | (x ∈ A) ∧ (x ∉ B)}

5. Let U be the universal set
(i.e., the universe, or domain of discourse)

Then ‾A (the complement of A)

=def U – A
= (see note (b), below) {x | (x ∈ U) ∧ (x ∉ A)}
≈ (see note (c), below) {x | x ∉ A}

1. HTML limitations make it impossible, as far as I know,
to draw the set-complement symbol, i.e., the overline, over the name of the set.

It should really look something like this:

A

2. The equality above is a theorem requiring proof.
3. The wavy, "sort of" equality above is true assuming that the domain is the universe;
i.e., that everything is, by default, a member of U.

4. Thm:

A – B = A ∩ (‾B)

2. Note:
∪ corresponds to ∨
∩ corresponds to ∧
‾ corresponds to ¬
Question: What set operation would correspond to →?
Hint: (pq) ≡ (¬pq)

3. Here's an example I didn't get to cover in lecture:

Let Alpha = {a,b,…z}.
Let VOWELS = {a,e,i,o,u,y}.
Then:
CONSONANTS = Alpha – V
VOWELS ∪ CONSONANTS = Alpha.
VOWELS ∩ CONSONANTS = ∅

4. On Venn diagrams, see Kosara 2009