Automata Theory: CS411 & CS675 2015F-01 Set Theory & Proof Techniques
Automata Theory: CS411 & CS675 2015F-01 Set Theory & Proof Techniques
Π ⊂ 2S
{} 6∈ Π
∀(X, Y ∈ Π), X 6= Y =⇒ X ∩ Y = {}
Π=S
S
{1, 2} × {3, 4} = {(1, 3), (1, 4), (2, 3), (2, 4)}
{1, 2} × {1, 2} = ?
2{a}×{b} = ?
2{a} × 2{b} = ?
01-27: Cartesian Product
A × B = {(x, y) : x ∈ A ∧ y ∈ B}
{1, 2} × {3, 4} = {(1, 3), (1, 4), (2, 3), (2, 4)}
{1, 2} × {1, 2} = {(1, 1), (1, 2), (2, 1), (2, 2)}
2{a}×{b} = {{(a, b)}, {}}
2{a} × 2{b} =
{({a}, {b}), ({a}, {}), ({}, {b}), ({}, {})}
01-28: Cartesian Product
Which of the following is true:
(example on chalkboard)
01-41: Relations
Q and R are two relations
The composition of Q and R, Q ◦ R is:
{(a, b) : (a, c) ∈ Q, (c, b) ∈ R for some c}
R = {(a, b), (a, c), (c, a), (b, b), (b, d)}
a c
b d
01-43: Relation Types
A relation R ⊆ A × A is reflexive if
(a, a) ∈ R for each a ∈ A
∀(a ∈ A), (a, a) ∈ R
Each node has a self loop
a b a b
c d c d
Reflexive Not Reflexive
01-44: Relation Types
A relation R ⊆ A × A is symmetric if
(a, b) ∈ R whenever (b, a) ∈ R
(a, b) ∈ R =⇒ (b, a) ∈ R
Every edge goes “both ways”
a b a b
c d c d
Symmetric Not Symmeteric
01-45: Relation Types
A relation R ⊆ A × A is antisymmetric if
whenever (a, b) ∈ R, a, b are distinct (b, a) 6∈ R
(a, b) ∈ R ∧ a 6= b =⇒ (b, a) 6∈ R
No edge goes “both ways”
a b a b
c d c d
Antisymmetric Not Antisymmeteric
a b a b
c d c d
Antisymmetric Not Antisymmeteric
a b a b
c d c d
(examples on board)
01-53: Relation Types
Equivalence Relation
Symmetric, Transitive, Reflexive
Examples:
Equality (=)
A is the set of English words, (w1 , w2 ) ∈ R if w1
and w2 start with the same letter
(example graphs)
01-54: Relation Types
Equivalence Relation
Symmetric, Transitive, Reflexive
Separates set into equivalence classes (all words
that start with a, for example
If a ∈ A, then [a] represents equivalence class that
contains a.
01-55: Relation Types
Partial Order
Antisymmetric, Transitive, Reflexive
Examples:
≤ for integers
A is the set of integers, (a, b) ∈ R if a ≤ b
Ancestor
R ⊆ A × A = {(x, y) : x is an ancestor of y ,
or x = y }
(example graphs)
01-56: Relation Types
Total Order
R ⊆ A × A is a total order if:
R is a partial order
For all a, b ∈ A, either (a, b) ∈ R or (b, a) ∈ R
Is ≤ a total order?
Is Ancestor a total order?
(example graphs)
01-57: Cardinality
How can we tell if two sets A and B have the same
cardinality?
01-58: Cardinality
How can we tell if two sets A and B have the same
cardinality?
Calculate |A| and |B|, make sure numbers are
the same
Match each element in A to an element in B
Create a bijection f : A 7→ B
(or f : B 7→ A)
01-59: Cardinality
What about infinite sets? Are they all
equinumerous (that is, have the same cardinality)?
A set is countable infinite (or just countable) if
it is equinumerous with N.
01-60: Countable Sets
A set is countable infinite (or just countable) if
it is equinumerous with N.
Even elements of N?
01-61: Countable Sets
A set is countable infinite (or just countable) if
it is equinumerous with N.
Even elements of N?
f (x) = 2x
01-62: Countable Sets
A set is countable infinite (or just countable) if
it is equinumerous with N.
Integers (Z)?
01-63: Countable Sets
A set is countable infinite (or just countable) if
it is equinumerous with N.
Integers (Z)?
f (x) = ⌈ x2 ⌉ ∗ (−1)x
-4 -3 -2 -1 0 1 2 3 4
...
01-64: Countable Sets
A set is countable infinite (or just countable) if
it is equinumerous with N.
Union of 3 (disjoint) countable sets A, B, C?
01-65: Countable Sets
A set is countable infinite (or just countable) if
it is equinumerous with N.
Union of 3 (disjoint) countable sets A, B, C?
a0 a1 a2 a3 a4 ...
b0 b1 b2 b3 b4 ...
c0 c1 c2 c3 c4 ...
a x3
if x mod 3 = 0
f (x) = b x−1
3
if x mod 3 = 1
c x−2 if x mod 3 = 2
3
01-66: Countable Sets
A set is countable infinite (or just countable) if
it is equinumerous with N.
N × N?
(0,0) (0,1) (0,2) (0,3) (0,4) ...
...
...
...
...
...
01-67: Countable Sets
A set is countable infinite (or just countable) if
it is equinumerous with N.
N × N?
(0,0) (0,1) (0,2) (0,3) (0,4) ...
...
...
...
...
...
(x+y)∗(x+y+1)
f ((x, y)) = 2
+x
01-68: Countable Sets
A set is countable infinite (or just countable) if
it is equinumerous with N.
Real numbers between 0 and 1 (exclusive)?
01-69: Uncountable R
Proof by contradiction
Assume that R between 0 and 1 (exclusive) is
countable
(that is, assume that there is some bijection
from N to R between 0 and 1)
Show that this leads to a contradiction
Find some element of R between 0 and 1
that is not mapped to by any element in N
01-70: Uncountable R
Assume that there is some bijection from N to R
between 0 and 1
0 0.3412315569...
1 0.0123506541...
2 0.1143216751...
3 0.2839143215...
4 0.2311459412...
5 0.8381441234...
6 0.7415296413...
...
...
01-71: Uncountable R
Assume that there is some bijection from N to R
between 0 and 1
0 0.3412315569...
1 0.0123506541...
2 0.1143216751...
3 0.2839143215...
4 0.2311459412...
5 0.8381441234...
6 0.7415296413...
...
...
...
Consider: 0.425055...
01-72: Proof Techniques
Three basic proof techniques used in this class
Induction
Diagonalization
Pigeonhole Principle
01-73: Induction
Can create exact postage for any amount ≥ $0.08
using only 3 cent and 5 cent stamps
01-74: Induction
Can create exact postage for any amount ≥ $0.08
using only 3 cent and 5 cent stamps
Base case
Can create postage for 0.08 using one 5-cent and one
3-cent stamp
01-75: Induction
Can create exact postage for any amount ≥ $0.08
using only 3 cent and 5 cent stamps
Inductive case
To show: if we can create exact postage for $x
using only 3-cent and 5-cent stamps, we can
create exact postage for $x + $0.01 using
3-cent and 5-cent stamps
Two cases:
Exact postage for $x uses at least one 5-cent
stamp
Exact postage for $x uses no 5-cent stamps
01-76: Induction
To show: if we can create exact postage for $x
using only 3-cent and 5-cent stamps, we can
create exact postage for $x + $0.01 using 3-cent
and 5-cent stamps
Exact postage for $x uses at least one 5-cent
stamp
Replace a 5-cent stamp with two 3-cent
stamps to get $x + $0.01
Exact postage for $x uses no 5-cent stamps
Replace three 3-cent stamps with two 5-cent
stamps to get $ + $0.01
01-77: Pigeonhole Principle
A, B are finite sets, with |A| > |B|, then there is
no one-to-one function from A to B
If you have n pigeonholes, and > n pigeons, and
every pigeon is in a pigeonhole, there must be at
least one hole with > 1 pigeon.
01-78: Pigeonhole Principle
Show that in a relation R over a set A, if there is a
path from ai to aj in R, then there is a path from a
to b whose length is at most |A|.
01-79: Pigeonhole Principle
Proof by Contradiction