# To what extent is my interpretation of computable numbers correct?

Interpretation: Consider the comic strip below, where a person tries to prevent a robot from dismembering them by asking the robot to compute $\pi$ - the robot quickly produces an algorithm to calculate all of the digits of $\pi$ and begins dismembering the person. This is possible because $\pi$ is a computable number.

In contrast, if the person had asked the robot to calculate Chaitin's constant (assuming the robot didn't say something like "which Chaitin's constant?" or "insufficient parameters") or some other non-computable number, would the people have been able to escape the robot's dismembering?

As far as I understand (1)(2), the robot could make an algorithm to calculate the first $n$ digits for any $n$, but to attempt to compute "all" of Chaitin's constant would take an infinite amount of time, because each new digit would require a new program, or something like this.

Question: Is this interpretation at all correct or am I completely off the mark here? To what extent could one describe computable numbers as numbers which "prevent a robot in this specific situation from dismembering people"?

I.e., do all non-computable numbers have algorithmically random (decimal, binary, etc.) expansions?

Source. • Bah, $\pi$ is not infinite; what is that even supposed to mean? FWIW, see here for my favorite wrong-computability-intuition-buster around $\pi$. – Raphael Apr 15 '17 at 11:40
• @Raphael OK. So is the set of digits of a Chaitin's constant not even semi-decidable, so the robot couldn't even understand the query, much less waste infinite time attempting to complete it? cs.stackexchange.com/questions/5006/… I guess I have difficulty understanding how $\pi$ and Chaitin's constant are practically different, other than $\pi$ has closed-form expressions making its digits easier to calculate, but the digits of Chaitin's constant can still be deduced via computation. – Chill2Macht Apr 15 '17 at 11:45
• Also I am assuming that semi-decidable/semi-computable and decidable/computable are the same things (respectively/pairwise) but I don't actually know whether that's true. – Chill2Macht Apr 15 '17 at 11:46
• 1) I have not looked into this constant, so I can't comment on that. I don't think it's really relevant here. You are probably reading too much into what was clearly supposed to deliver a punchline to non-computer-scientists. 2) Yes, for the purposes of this discussion you can use the terms exchangeably. – Raphael Apr 15 '17 at 11:49

## 3 Answers

This is exactly the incorrect interpretation of "computable", resulting of trying to replace the precise definition with (possibly misplaced) intuition.

$\pi$ or any other irrational number also has an infinite digit representation, so according to your logic, it shouldn't be computable. This just shows that it is meaningless to require all of the digits as output, and we actually need a "better" definition.

To fix this issue, we say a number $p$ is computable, if we can approximate $p$ up to any given precision. One way of formalizing this is requiring the existence of a program $M_p(n)$, which upon receiving a number $n$ outputs (in finite time) a number $\hat{p}$ such that $|\hat{p}-p|\le\frac{1}{n}$. The comic actually refers to this definition, as $\pi$ having an infinite expansion does not prevent the robot from dismembering the guy.

If your goal is to avoid dismembering, then it is not clear how to use uncomputable numbers. What exactly is the meaning of calculate $x$? If i ask for some fixed approximation of an uncomputable number, then the robot can give me one (sure, it has no way of algorithmically producing the approximation, but perhaps this is some weird robot with a table of all approximations to any natural constant up to $10^{-100}$). You would probably stand more chance with incompleteness issues, rather than with computability issues. I would ask the robot for a proof in $ZFC$ of its consistency. If it is consistent, he wont find any, and if it isn't, who wants to live anyway.

• To be clear I didn't write the comic. When I say "calculate", it seems like the choice that best goes with the comic would be "produce the entire decimal expansion, if possible a rule for doing so". With $\pi$ or another computable the number, as you say, the computer can come up with a program to calculate its decimal expansion up to finite precision in finite time. – Chill2Macht Apr 15 '17 at 13:52
• Wikipedia says that the first $N$ bits of Chaitin's constant $\Omega_F$ for a given prefix-free universal computable function $F$ can be calculated using a dovetailing procedure, even though it's related to the halting problems, because if certain programs don't halt after enough time, then they can't contribute to the first $N$ bits, so it doesn't matter if they ever halt. en.wikipedia.org/wiki/… – Chill2Macht Apr 15 '17 at 13:54
• "Knowing the first N bits of Ω, one could calculate the halting problem for all programs of a size up to N. Let the program p for which the halting problem is to be solved be N bits long. In dovetailing fashion, all programs of all lengths are run, until enough have halted to jointly contribute enough probability to match these first N bits. If the program p hasn't halted yet, then it never will, since its contribution to the halting probability would affect the first N bits. Thus, the halting problem would be solved for p." – Chill2Macht Apr 15 '17 at 13:55
• What do you mean by "calculate the first N bits for all N"? If you refer to the task of given $n$ as input, output the first $n$ bits of Chaitin's constant, then it can't be done. You can't however formulate this as a single question (as I can always hardcode the first $n$ digits for fixed $n$ in my machine, however I provably can't handle arbitrary $n$ given as input) – Ariel Apr 15 '17 at 14:27
• Its completely fine, I didn't mean to sound mad or anything, just to emphasize the importance of working with precise definitions (intuition is very useful, but i think true understanding can be achieved when you see why the formal definition reflects your intuition). – Ariel Apr 15 '17 at 17:09

First off, I'm not sure what the intuition you're proposing is, so I'll make some general remarks.

In the comic, the problem given to the robot was ill-posed; the interpretation of the request is not clear, and for any reasonable interpretation it is very obviously impossible.

Then, the robot cheated by not giving the answer but a recipe to find the answer (arguably).

I'm not sure what you would expect the robot to do if you asked: "Compute this incomputable function!". It could not even start. You'd have to get it into an actual computation that does not terminate. For instance: "Find the smallest $i$ for which $f(i)≠i$ with $f:i↦i$!" Of course, the robot may perform elementary static analysis and conclude that there is no such $i$, at which point it will happily start dismembering you.

So it'll have to be a semi-computable problem whose answer is not immediately obvious, and the actual instance needs to loop -- good luck making that up on the spot!

In robocalypse-preventing practice, I'd just give the robot a (hopefully) hard instance of an NP-hard problem and hope that I run fast enough. "What is the shortest route to visit every Starbucks in the world (once)?" That should keep it busy for a while. Of course, if I built the robot any individual on its kill list would also be on the black-list of its spam filter.

• “good look making that up on the spot” → “Find a counterexample to the Collatz conjecture !” – Evpok Apr 15 '17 at 21:16
• @Evpok Risky -- this is a trivially decidable problem, even though we don't know the answer. So it may say immediately "there is none" or "$16^{77^{42}}-1$". (You want to read this and this.) – Raphael Apr 15 '17 at 21:38
• If it can prove it, I can die happy. – Evpok Apr 15 '17 at 22:28

I think there are too many kinds of sort-of uncomputability involved here:

• Uncomputable because ill-defined. "The smallest rational larger than 1.0" would be an example.
• Uncomputable because of assumptions that contradict known theorems. Example: "Largest prime number.".
• Uncomputable because of assumptions that contradict axioms (this is a trivially degenerate case of the previous point). Example: "Largest integer."
• Uncomputable because undecidable. Chaitin Numbers (percentage of randomly generated programs that will not terminate) is a particularly nasty version.
• Uncomputable but any correct answer could be checked computably. It would be hardest to justify a non-answer.
• Uncomputable because algorithm is known to exist but not discovered yet. I think unsolved mathematical problems can fall in that category. Maybe "what's the lower bound for sorting algorithms" - we believe it's O(N log N), but there was never a proof for that, and there should either be an O(N) algorithm or a proof that nothing faster than O(N log N) is possible.
• Uncomputable because insufficient data. "How old is the oldest living field mouse?"
• Uncomputable because subjective. "What's the nicest mathematical theorem in literature?"

In other words, computability, decidability and all that hard-math stuff is only marginally related to the topic of the comic.

There's also your assumption that a better understanding of computability would have somehow improved the scientist's situation.
However, that's entirely arbitrary, because the robot could have likewise answered "I don't mind about your questions or orders", or said "impossible to calculate, I'll rend your limbs anyway", or whatever else the author's whims dictate. For that reason, your question does not have a good answer.

• It's probably best not to use the word "uncomputability" unless you mean actual uncomputability, in the sense of "no Turing machine does this and halts for all inputs." For example, in the formal sense of the term "uncomputability", there is no such thing as "Uncomputable because algorithm is known to exist but not discovered yet." – David Richerby Apr 16 '17 at 0:02
• Maybe "what's the lower bound for sorting algorithms" - we believe it's O(N log N), but there was never a proof for that Here's one: model the behaviour of a comparison sorting algorithm as a binary tree, with a branch for the result of each comparison performed. The algorithm must behave differently for each of the $n!$ possible permutations, therefore it has at least $n!$ leaves. Therefore the height is at least $\lg(n!)$. – Tavian Barnes May 4 '17 at 17:58
• David Richerby I'm well aware that computability is a technical term, that's why I wrote "sort-of un-computability". – toolforger May 7 '17 at 20:25
• Seems like a lower bound on sorting was proven between when I first read about the question and today. I stand corrected. – toolforger May 7 '17 at 20:41