while (a=b()) ... infinite sets digression

Chad Netzer chad at vision.arc.nasa.gov
Thu May 20 15:54:13 EDT 1999


Paul Duffin wrote:

> I know that the set of all lists (x y) where x and y can be any integer
> is just as large as the set of integers. Use the mapping.
>
> 0 - (0 0)
> 1 - (1 0)
> 2 - (0 1)
> 3 - (2 0)
>
> And also for lists of length 3 (x y z), 4, 5, 6 .... infinity.
>

    Ah, but does it work for the case where the list is of length infinity?
For any table you construct I can create a valid list that is NOT in the
table, simply by taking a number that is NOT the first element of the
first list, a second number that is NOT the second element of the second
list, etc. on to infinity.  This list does exist in the set you defined, and yet
it cannot be in the table you constructed (by its definition), and therefore
is not counted by the set of whole numbers you paired the list to.  This
was originally discovered by Cantor, and is where the notion of transfinite
numbers started, unless I'm mistaken.

possibly-opening-a-can-of-worms-again'ly yours.
Chad Netzer






More information about the Python-list mailing list