On Enumerability
What do we mean by countable?
So, what is countable? A finite collection of items definitely seems to be a countable collection. What about infinite set? Can we count the set of natural numbers? I think so. Let me try:
Wait a minute! That’s only 4. What about 5? I am sure there are even more after. There are in fact infinite number of them! YOU CANNOT COUNT THEM ALL.
However, we seem to have this nice property: give me any natural number it will come up eventually if I continue counting as above (it will be at the position to be exact). Did you think I was going to count every element? No but I can count to any element using the “same process”. This property turns out to be useful, that is, given a set of elements, I can list them down one by one in a way that every element eventually shows up after a finite number of steps.
Let’s now consider the set of even natural numbers. Is this set countable? It certainly seems so: Surely, we are not going to miss anything this way. Give me any even natural number and it will show up after finite number of elements. Looks good.
What about the set of all integers? Let us see.
Hmmm. Where is the starting point of this listing? Given a integer, say 5, we are hoping it would occur eventually, that is, after a finite number of steps. But this list expands infinitely in both directions! So integers are not countable? But for the integers to be countable, we just need a listing that works. We obviously need a starting element. Maybe, start with 0. And?
Is the listing a valid listing (i.e., captures our notion of countable) for the set of integers?
Consider some integer -100. Does it occur after some finite number of steps (however large)? No. Any negative integer simply occurs after all the positive integers which are infinite. Therefore this listing doesn’t prove that integers are countable. Here’s a listing that works for the set of integers:
Formalising countability
Little more formally, we say a set is enumerable or countable if its members can be arranged in a single list with a first entry, second entry and so on such that every member of the set occurs sooner or later in the list.
Even more formally, a set is enumerable if there is a function such that for every , there is some such that . ( is basically a surjection between and ), where is the set of positive integers.
Is the list a proper enumeration of positive integers?
Yes, because every positive integer occurs at some finite position in the listing. Don’t let the repetitions throw you off!
Why is the above definition equivalent to the notion of having a list that lists every element eventually? Suppose we have such a function . effectively determines the list. Suppose were the set of even integers. And let be some even integer. Then by existence of we know there is some such that . So, we know occurs at position in the listing defined by . It’s possible there are multiple choices in that map to a given . But we know there is at least one choice. There must also be one that is smallest, since nothing in the set can be smaller than .
Looking the other way, if we have a valid listing, then we can get such an by simply defining as follows: where occurs at the position in the given list.
We now see why the two (informal and formal) definitions are the same.
Enumerability Gym
Are the following sets enumerable? Definitely try these yourself before you look at the answers!
The set of ordered pairs of positive integers.
The set of positive rational numbers.
(similar to the enumeration of ordered pairs of positive integers).
The set of rational numbers.
(similar to the enumeration of integers using enumeration of positive integers).
The set of finite sets of positive integers.
Consider the enumeration:
First, we list all sets that sum to 1. Next, all such sets that sum to 2. Any finite set of positive integers has some sum n, and will occur at a some finite position in this enumeration.
Any subset of an enumerable set.
Suppose is an enumerable set. Let .
Since is enumerable, there exists a function from (set of positive integers) onto .
We define a partial function that is onto as follows. is surjective because is surjective. Therefore, any subset of a enumerable set is enumerable.
The union of any two enumerable sets.
Let and be two enumerable sets whose enumerations are and
Say . Then is an enumeration of .
The set of finite strings over a finite or enumerable alphabet of symbols.
Suppose is an enumerable alphabet. Since, is enumerable, there is a surjection .
Define an injection as such that . We know such always exists since is a surjection.
It follows that implies .
Any finite string over is a finite sequence which can be encoded as where is prime. There are infinitely many primes so we will never run out of primes. And every positive integer has a unique prime decomposition. Together, every positive integer corresponds to a unique string and every string corresponds to a unique positive integer. Therefore, the encoding describes a surjection between the set of positive integers to finite strings.
Finally, is a set of all finite subsets of an enumerable set enumerable?