-1

Are non halting programs not computable? How are these two sets of programs related: is a non halting program just a specific example of a type of program that is not computable or is it technically computable just not in finite time (the computation can be defined it just goes on forever). Im just not sure about the goes on forever part -- does that circle back and make it not computable?

Thanks!

DeeDee
  • 345
  • 1
  • 9
  • Determining that a program is halting or not is uncomputable. Some nonhalting programs are still used to approximate certain computable entities like constants and pi. – Ṃųỻịgǻňạcểơửṩ Jan 28 '20 at 01:08
  • 3
    Computability is a property of a language, not of a program. You might find this reference helpful: https://cs.stackexchange.com/questions/13669/what-is-the-difference-between-an-algorithm-a-language-and-a-problem – Joey Eremondi Jan 28 '20 at 01:09
  • I've explained previously that it makes no sense to ask whether a program is computable or not (https://cs.stackexchange.com/q/119693/755, https://cs.stackexchange.com/q/119701/755). I'm a bit puzzled to see that appear here in the question again. At this point I'm not sure how to help. Should we post that same answer again? – D.W. Jan 28 '20 at 01:21

1 Answers1

0

A language (set of strings) can be computable or not (also called decidable), which means that given a string $\sigma$ there is a Turing machine (more generally speaking, a program) that is guaranteed to halt in a finite time, telling correctly whether $\sigma$ belongs to the language or not.

You can consider e.g. the language of all valid C programs that eventually halt (don't get into some sort of infinite loop). That language is non-computable (no program can take a program and tell correctly in all cases whether it halts or not). To call a C program "non-computable" makes no sense, it is just an element of the language. For any particular example C program you can perhaps answer the question (given enough ingenuity), the point is that you can't solve it in general.

vonbrand
  • 14,004
  • 3
  • 40
  • 50