cs2102: Discrete Mathematics
Class 3: Well-Ordering
David Evans
University of Virginia
Slide 2
Slide 2 text
Plan
Well-Ordering Principle
Well-Ordered Sets (and Comparators)
Well-Ordered Theorem?
Well-Ordered Data Types
Well-Ordering Principle Proofs
The Well-Ordering
Principle is the
crux of
mathematical
induction,
which is the basis
for many of the
most important
proofs in CS.
Slide 3
Slide 3 text
No content
Slide 4
Slide 4 text
There are lots of office hours!
Don’t wait to get help.
Slide 5
Slide 5 text
Well
Ordering
Principle
Slide 6
Slide 6 text
Well-Ordering Principle
Every nonempty set of non-negative integers has a smallest element.
Slide 7
Slide 7 text
Ordering Sets
Definition. A set is well-ordered with respect
to an ordering function (e.g., <), if all of its
non-empty subsets has a minimum element.
Why does this mean the whole set is well-ordered?
Slide 8
Slide 8 text
Definition. A set is well-ordered with respect
to an ordering function (e.g., <), if all of its
non-empty subsets has a minimum element.
Slide 9
Slide 9 text
Sensible Ordering Functions
Definition. A set is well-ordered with respect
to an ordering function (e.g., <), if all of its
non-empty subsets has a minimum element.
Slide 10
Slide 10 text
Java Transgression
Slide 11
Slide 11 text
Java Transgression
Slide 12
Slide 12 text
Well-Ordered Sets?
Set: the integers Comparator: a < b
Slide 13
Slide 13 text
Well-Ordered Sets?
Set: the integers Comparator: |a| < |b|
Slide 14
Slide 14 text
Well-Ordered Sets?
Set: the integers Comparator:
if | a | = | b |: a < b
else: |a| < |b|
Slide 15
Slide 15 text
Well-Ordered Sets?
Set: the non-negative rationals Comparator: <
Definition. A number is rational if it can be written as a ratio of two integers.
Slide 16
Slide 16 text
Set: the non-negative rationals Comparator: ?
Is there some comparator that makes the non-negative rationals well-ordered?
Slide 17
Slide 17 text
Well-Ordered Theorem
For every set, there is some comparator (that is transitive
and trichotomic) that makes the set well-ordered.
Is this true?
Slide 18
Slide 18 text
Slack break…
For every set, there is some comparator that is transitive
and trichotomic that makes the set well-ordered.
Slide 19
Slide 19 text
Georg Cantor
Well-ordered theorem is
a fundamental law of
thought.
(1883)
Slide 20
Slide 20 text
Gyula Kőnig
There is no comparator
that results in a well-
ordering of the real
numbers.
Slide 21
Slide 21 text
Gyula Kőnig
Claimed counter-proof:
There is no comparator
that results in a well-
ordering of the real
numbers.
Proof withdrawn as incorrect
Slide 22
Slide 22 text
Georg Cantor
Well-ordered theorem is
a fundamental law of
thought.
(1883)
What should we (mathematics)
do when there is something
that seems like it should be
true, but no one can prove?
Slide 23
Slide 23 text
Axiom of Choice
For any collection of non-empty sets, there is a choice
function that picks exactly one element from each set.
Slide 24
Slide 24 text
Bertrand Russell
(1872-1970)
To choose one sock from
each of infinitely many
pairs of socks requires
the Axiom of Choice, but
for shoes the Axiom is
not needed.
Slide 25
Slide 25 text
No content
Slide 26
Slide 26 text
No content
Slide 27
Slide 27 text
For every set, there is some comparator that is transitive
and trichotomic that makes the set well-ordered.
For any collection of non-empty sets, there is a choice
function that picks exactly one element from each set.
implies
Well-Ordered Theorem
Axiom of Choice
Slide 28
Slide 28 text
For every set, there is some comparator that is transitive
and trichotomic that makes the set well-ordered.
For any collection of non-empty sets, there is a choice
function that picks exactly one element from each set.
implies
Well-Ordered Theorem
Axiom of Choice
Slide 29
Slide 29 text
Still Controversial…
ZF Axioms: Zermelo–Fraenkel Set Theory
ZFC Axioms: ZF + Axiom of Choice
Slide 30
Slide 30 text
Well-Ordering in Programming
Is a + 1 > a always true?
Slide 31
Slide 31 text
“glitch in control unit causes
generators to shut down if left
powered on for 248 days”
Slide 32
Slide 32 text
No content
Slide 33
Slide 33 text
No content
Slide 34
Slide 34 text
Can I bet any dollar amount using just $2 and $5 chips?
Slide 35
Slide 35 text
Betable Numbers
A number is betable if it can be produced using
some combination of $2 and $5 chips.
Are all integers greater than $3 betable?
Slide 36
Slide 36 text
Betable Numbers
A number is betable if it can be produced using
some combination of $2 and $5 chips.
Slide 37
Slide 37 text
Charge
• Maintain Well Orderliness!
• If you need to enroll in the class, bring me a
course action form to sign (now, or later)
• Due Friday (6:29pm): PS1
• Read MCS Ch 2, 3 (at least through 3.5) before
Thursday’s class