Georg Cantor's 1878 paper "Ein Beitrag zur Mannigfaltigkeitslehre"^{1} introduced the concept of the power of a set, raising
one-to-one correspondence to its paramount importance in set theory. One of Cantor's tasks was to show that any continuous interval in the
real numbers was of equal power to any other continuous interval. The trickiest part of this was proving that open and closed intervals were
of equal power. A continuous one-to-one correspondence between an open interval and a closed one was out of the question,
since there was no where to put the endpoints. So, a discontinuous correspondence was necessary, and Cantor was up to the task.

Cantor's argument, as presented in the source, was essentially geometric, but I'd like to give an algebraic interpretation.

We start by selecting rational numbers **R**_{i} = 1-2^{-i}= (2^{i}-1)/2^{i} where **i** is a positive integer;
that is, R_{0} =0, R_{1} = 1/2, R_{2} = 3/4.

If we use the various **R**_{i} to divide the interval from 0 to 1 into segments **S**_{i}
such that **p∈ S**_{n} <-> R_{i} < p <= R_{i+1}. Each segment is a half-open interval with the closed end at the upper end of its range; the segments get shorter and shorter as **n** gets larger and larger.

Each **p** is in exactly one of these intervals. If we define **I(p) = [-ln (p)/ln(2)]**
then **p ∈ S**_{I(p)} and no other (in this case, brackets indicate the "greatest integer in" function).

We can then present a function **F(p)=R**_{I(p)+1}-p. Essentially, each half-open segment flips itself end-for-end, moving the closed end to the lower end of the range. When used on the open interval **(0, 1)**, we wind up with the half-open interval **[0,1)**. A similar function can be designed (left as an exercise to the reader) to get a closed interval.

Appearing in my principal source (see below) is a page from a letter Cantor sent to Richard Dedekind, containing an amazing
diagram illustrating this concept graphically; I reproduce it for you below. Each segment **S**_{i} appears as one of the diagonal lines with a star
at the upper end and an o at the lower end, indicating that **F(S**_{i}) contains **(R**_{i},R_{i+1})
but not **(R**_{i+1},R_{i}). This diagram indicates the true genius of the man.

o + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...1
| | : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : * •o:etc.
| | . . . . . . . . . . . . . . . . . . . . . . . . . . . . . * .`o..31/32
| | `. . ...
| | . . . . . . . . . . . . . . . . . . . . . . . . . . . * . . `o ...15/16
| | `.
| | . . . `. . . ...
| | `.
| | . . . . . . . . . . . . . . . . . . . . . . . * . . . . . `o . ...7/8
| | `.
| | . . `. . . . ...
| | `.
| | . . `. . . . ...
| | `.
| | . . `. . . . ...
| | `.
| | . . . . . . . . . . . . . . . * . . . . . . . . . . . `o . . . ...3/4
| | `.
| | . `. . . . . ...
| | `.
| | . `. . . . . ...
| | `.
| | . `. . . . . ...
| | `.
| | . `. . . . . ...
| | `.
| | . `. . . . . ...
| | `.
| | . `. . . . . ...
| | `.
| | . `. . . . . ...
| | `.
| * . . . . . . . . . . . . . . . . . . . . . . . `o . . . . . . . ...1/2
| |`.
| | `. . . . . . ...
| | `.
| | `. . . . . . ...
| | `.
| | `. . . . . . ...
| | '.
| | `. . . . . . ...
| | `.
| | `. . . . . . ...
| | `.
| | `. . . . . . ...
| | `.
| | `. . . . . . ...
| | `.
| | `. . . . . . ...
| | `.
| | `. . . . . . ...
| | `.
| | `. . . . . . ...
| | `.
| | `. . . . . . ...
| | `.
| | `. . . . . . ...
| | `.
| | `. . . . . . ...
| | `.
| | `. . . . . . ...
| | `.
| | `. . . . . . ...
| | `.
o +--------------------------------------------------------------`o---------------------------------------------------------------*
*-------------------------------------------------------------------------------------------------------------------------------o

As an aside, when I first saw this operation, I thought, for one insane moment, that it might form the basis for a wellordering of the real numbers. It should be apparent, however, that repeating the process over and over only serves up dyadic rational numbers.

Joseph Warren Dauben, *Georg Cantor: His Mathematics and Philosophy of the Infinite*, Princeton University Press, 1979,

pp. 63-64

^{1}Translates as "A contribution to multiplicity theory"