14

I have the problem:

Show that there exists a real number for which no program exists that runs infinitely long and writes that number's decimal digits.

I suppose it can be solved by reducing it to the Halting problem, but I have no idea how to do so.

I would also appreciate links to similar problems for further practice.

PJTraill
  • 389
  • 3
  • 13
fresheed
  • 143
  • 1
  • 6

5 Answers5

18

As Sebastian indicates, there are only (infintely but) countably many programs. List them to create a list of programs. The list is (infinitely but) countably long. Each program generates one number in R. From that we can create an (infinite but) countable list of numbers in R. Now we can apply Cantor's diagonal argument directly to prove that there still must be other numbers.

By the way if the algorithm has (finite) arguments, you can just rewrite that as a "longer" list of programs where each program doesn't have any arguments.

With regard to your comment "What if real numbers are allowed as argument", then the question's premise is wrong: all numbers in R can then be generated. If someone finds a number, say 皮 and claims it cannot be computed, we have the following "algorithm":

func(number):
    return number

and call func(皮)

Albert Hendriks
  • 2,481
  • 16
  • 35
17

It's actually much simpler. There's only a countable number of algorithms. Yet there are uncountably many real numbers. So if you try to pair them up, some real numbers will be left hanging.

Sebastian Oberhoff
  • 1,058
  • 5
  • 11
9

Consider the number whose $k$th digit is $1$ if the $k$th Turing machine halts on the empty input, and $0$ if it doesn't halt. If you could generate the digits of this real number then you could solve the halting problem.

Yuval Filmus
  • 280,205
  • 27
  • 317
  • 514
0

The number is an infinitelly long number which after decimal point encodes anyhow all the turing machines which don't halt. With this number, you would be able to solve halting problem.

You can "search" the TM in the number and run it in parallel. If TM halts, it halts. If not, you would "find its code in the number".

There are many modifications of the proof and you should be able to reproduce them after the very first complexity lesson :-)

smrt28
  • 137
  • 6
-3

A point moves in a path by the funcion y = 2x. When the abscissa is a non computable number, there is no way for the Point to compute its path, but we know it goes on. So non computable numbers can exist at all.

Valmir
  • 1