Discrete Mathematics
This is a preserved file from cs2102 Fall 2016. An updated version may exist at https://uvacs2102.github.io/

Class 3: Well-Ordering Principle


Schedule

This week, you should read MCS Chapter 2 and MCS Chapter 3 (at least through the end of Section 3.4).

Problem Set 1 is due Friday at 6:29pm.

Office hours started Monday. There are upcoming office hours: today (Tuesday) 3:30-5pm and 7:30-9:30pm; Wednesday 10am-1pm, 2:30-4pm, 6:30-9:30pm (all of these are in Rice 436), and Dave has office hours Wednesday 1-2pm (in Rice 507). See the course calendar for the full office hours schedule.

Challenge Problem Opportunity. It is trivial to show that numbers in Java or C are not we-ordered, but quite challenging to show this for Python. Write a Python program that demonstrates the fact that numbers in Python are not well-ordered.

The Well-Ordering Theorem: one of the Greatest Mathematical Controversies of All Time, Kathryn Mann.
US aviation authority: Boeing 787 bug could cause ‘loss of control’ (Nigel Jones’ explanation)
Basic Integer Overflows, blexim, Phrak (Volume 0x0b, Issue 0x3c).
Never need an excuse to watch Gangnam Style.

Notes and Questions

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.

What properties must a sensible ordering function have?

Trichotomy. A relation, $\prec$, satisfies the axiom of trichotomy if exactly one of these is true for all elements $a$ and $b$: $a \prec b$, $b \prec a$ or $a = b$.

Which of these are well-ordered?

  • The set of non-negative integers, comparator $<$.
  • The set of integers, comparator $<$.
  • The set of integers, comparator $|a| < |b|$.
  • The set of integers, comparator if |a| = |b|: $a < b$, else: $|a| < |b|$.
  • The set of national soccer teams, comparator winning games.

Prove the set of positive rationals is not well-ordered under $<$.

#

Provide a comparison function that can be used to well-order the positive rationals.

Template for Well-Ordering Proofs (Section 2.2)

To prove that $P(n)$ is true for all $n \in \mathbb{N}$:

  1. Define the set of counterexamples, $C ::= { n \in \mathbb{N} | NOT(P(n)) }$.
  2. Assume for contradiction that $C$ is ______________.
  3. By the well-ordering principle, there must be __________________ , $m \in C$.
  4. Reach a contradiction (this is the creative part!). One way to reach a contradiction would be to show $P(m)$. Another way is to show there must be an element $m’ \in C$ where $m’ < m$.
  5. Conclude that $C$ must be empty, hence there are no counter-examples and $P(n)$ always holds.

Example: Betable Numbers. A number is betable if it can be produced using some combination of \$2 and \$5 chips. Prove that all integer values greater than \$3 are betable.

# # # **Example: Division Property.** Given integer $a$ and positive integer $b$, there exist integers $q$ and $r$ such that: $a = qb + r$ and $0 \le r < b$.
# # _The whole problem with the world is that fools and fanatics are always so certain of themselves, and wiser people so full of doubts._ Bertrand Russell