Rest of class: What problems are solvable with a computer? We have seen lots of tasks that are solveable. If you want to sort a list of numbers, no problem -- we have an algorithm for that. Same goes for multiplying big numbers, finding primes, playing minesweeper, you name it. So, does every such problem have an algorithm? Are there problems for which no algorithm can possibly solve it? Today: Many kinds of infinities. little infinities, big infinities, and in between. Nash: You may have seen the movie documenting his struggle with schizophrenia; but that's nothing, compared to some other mathematicians we'll be studying this week. Georg Cantor ("I see it, but I do not believe it!"): Developed set theory. His innovative ideas sharply attacked by some other mathematicians of the time. Led to a nervous breakdown at 39, depression; spent his final years in a mental institution. Ideas now routinely accepted. Kurt Go"del: Suffered from a nervous breakdown at age 28; shortly after Hitler came to power, his mentor was murdered; eventually developed severe mental illness, became paranoid that he was being poisoned, refused to eat, and starved to death Alan Turing: Studied computer science before computers even existed! Brilliant codebreaker during WWII, helped break German Enigma (which probably shortened war by 1 year). At 40, was threatened with blackmail because of a homosexual affair; he unapologetically reported himself to police as a homosexual; was promptly arrested; given choice of prison or (quackish) injections to eliminate sex drive; took injections; lost security clearance; suffered from depression; suicided with cyanide at 42. Cantor introduced a multitude of different kinds of infinities, and how to talk about the size of infinite sets (N, R, etc.). Counting principle: If S,T can be put into one-to-one correspondence (i.e., if there exists some bijection f:S->T), then S and T should Example: S={apples,oranges} T={Ford,Toyota}; |S|=T=2: same size. Use the counting principle as our definition of `size'. Defn. Two sets are said to have the same cardinality if they can be put into a bijection. (Note that the counting principle is extremely natural: it says that if merely changing the names on the elements of the set should not affect its size. This `relabelling invariance' property seems like something we really want to keep.) Defn. A set S is countable if there is some bijective map f:N->S. Examples: S = {5,6,7,..}: countable; bijection f:N->S given by f(n)=n+5 E = {0,2,4,8,..}: countable; bijection f:N->E given by f(n)=2n Z: countable; f(2i)=i, f(2i+1)=-i-1 Principle: S is countable iff the elements of the set S can be enumerated in a (possibly infinite) list. Corollary: Every subset of a countable set is countable. Thm. {0,1}^* (set of all binary strings) is countable. Pf. It has an enumeration, namely, {-, 0, 1, 00, 01, 10, 11, 000, ...}. Now for some surprises: NxN (pairs of naturals): countable. (finding an enumeration is easy) If this looks strange and counter-intuitive, you're in good company. Cantor writes to a friend: "I see it, but I do not believe it!" Q (rationals): countable. Isomorphic to a subset of NxN, and a subset of a countable set is countable (think enumeration). Thm. U = {f : f is a function N->{0,1}} is uncountable. Pf. Cantor diagonalization. Suppose U is countable. Then there is an enumeration, say f_0, f_1, f_2, ... Define g:N->{0,1} by g(i)=1-f_i(i). Note: f_i != g, for all i, so g is not on the list. But g in U, contradicting the assumption that U can be enumerated. Thm. [0,1] (reals between 0 and 1) is uncountable. Pf #1. Can be put into bijective correspondence with a subset of U. Pf #2. Diagonalize. Suppose [0,1] is countable, and let x_0, x_1, x_2, ... be an enumeration. Define y, so that ith decimal digit of y is same as ith decimal digit of x_i except that we swap 4<->7. Note: x_i != y, for all i, so y is not on the list. Contradiction. (Be careful! Use decimal representation, not binary, and watch out for xx40000... vs xx39999...) Thm. The set of finite-length English sentences is countable. Pf. It can be viewed as a subset of {0,1}^*, which is countable. Thm. S = {x in R : x is describable by an English sentence} is countable. Pf. S can be put into bijective correspondence with (a subset of) the set of finite-length English sentences, which is countable. Corollary. There exists a real number not describable in English. Equivalently: No finite encoding scheme can represent all real numbers exactly. Idea: It's obvious that there are some real numbers we can't represent exactly: for instance 1/9 = 0.1111111... can't be represented exactly on our workstations, because our workstations have a fixed precision (20 digits or somesuch). But this is not a compelling example, because we could change our encoding scheme to represent integer fractions, and indeed, if we envision a computer that has an unbounded (but finite) amount of memory (i.e., no fixed limit on memory size), then we can represent all rational numbers: simply represent them as a pair of integers, and since Q is countable, this will fit. But what about the irrationals? Well, for sqrt(2) = 1.41421... things don't look so good, since sqrt(2) is irrational, but we could imagine further extending the encoding scheme to represent roots of rationals, and even special symbols for values like pi, and so on. Can we get all the real numbers in this way? No, because every number must fit into a finite number of bits, and hence the set of representable real numbers is countable (since {0,1}^* is countable).