Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> In CS/programming, if we're doing any experiments, they're

> done because we're too stupid to infer the right answer

That's the same as for physics. In theory, there is no difference between theory and practice. In practice, there is.

More specifically, for CS: what you're describing is an alternate universe where the halting problem[1] doesn't exist, or rather has been solved. In short, there is no way to predict, in the general case, whether a program will terminate or not, other than running it (= doing the experiment).

More generally, if you have a mechanism that predicts with perfect accuracy what the output of my program is, more quickly than running the program, then I will just call that new mechanism "the program", and use that instead of the original program. And then you're back to running the program to find out what it does.

UPDATE: To me, this is a (if not THE) fundamental results of theoretical computer science: a precise description of its limits. And since this is an article by Knuth: "Beware of bugs in the above code; I have only proved it correct, not tried it"[2]

[1] https://en.wikipedia.org/wiki/Halting_problem

[2] http://www-cs-faculty.stanford.edu/~uno/faq.html



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: