Computability of Real Numbers

We can write a computer program that will successively print out the digits of the decimal expansion of Pi. We can also write one that will list the digits of the decimal expansion of the square root of 2. Similarly, there are computer programs that will compute the square roots of integers, ones that will compute cube roots, etc. In fact, for the numbers that you encounter in your day-to-day life, there are computer programs that will compute them as long as their defining characteristics can be “described” in some reasonable way.

So, for every given  number, does there always exist a computer program that will list the digits of that number?

Surprisingly, no! There are some numbers whose decimal expansion cannot be computed!

Presentation Suggestions:
This is a good Fun Fact to do after the Fun Facts How Many Rationals? and Cantor Diagonalization, which give background on countable and uncountable sets.

The Math Behind the Fact:
The proof of this fact is actually quite if you know the difference between countable and uncountable sets.

We first show that the set of all possible computer programs is a countable set. Why? Every computer program is a finite string of a finite set of symbols. So the set of all computer programs of length N is finite. The union over all N of such sets is the set of all computer programs, and it is therefore countable, since it can be “listed” as the countable union of finite sets.

However, the set of all numbers is uncountable, so there must be some irrational number whose decimal expansion is not computable! In fact, since only countably many irrational numbers can be computed, “most” irrational numbers are not computable!

This fact comes as a shock to students and gives a great of the importance of understanding the difference between countable and uncountable sets.

How to Cite this Page: 
Su, Francis E., et al. “Computability of Real Numbers.” Math Fun Facts. <https://www.math.hmc.edu/funfacts>.

Fun Fact suggested by:
Francis Su

Did you like this Fun Fact?

Click to rate it.

Average rating 4.7 / 5. Vote count: 19

No votes so far! Be the first to rate this Fun Fact

Share: