Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Halting problem = undecidability of all program properties?

Name: Anonymous 2016-09-14 3:28

[i]UNDERGRAD QUALITY[/i] incoming: An old thread on /math/ got me thinking about this. We know the typical proof uses
func G(x): if Halts(x, x) then loop forever
else false

and G(G) as a counterexample. Would this
func P(x): if ReturnsOdd(x, x) then 2
else 1

mean you can't prove a program always returns odd numbers because of P(P)? What about any other simple property like ``returns alphanumeric character'' or ``returns a valid s-expression''? You can always construct a function that ends in a contradiction by just returning the opposite thing.

Name: Anonymous 2016-09-14 4:14

I don't understand what you are trying to ask >>1-kun. The halting problem is whether a magical algorithm that can decide if any algorithm terminates or not for certain domain exist or not. And the answer is no, but of course you can create an algorithm that decides if some specific algorithm terminates or not. Read IATLC (Introduction to Automata Theory, Languages, and Computation).

Name: Anonymous 2016-09-14 5:56

Wouldn't it be easier to just decide if any program will always halt within some quickly-computable number n cycles?

Name: Anonymous 2016-09-14 6:14

Or a program that calculates big O would seem feasible

Name: Anonymous 2016-09-14 6:32

Assuming those two functions signatures are F(function, arguments), then both would not halt. Let C = caller, in this case G or P. we are executing C(C)...

Assuming at some point F calls function(arguments), C(C) would be called again, resulting in non-halting. But since F is not allowed to execute function(arguments), then no matter what way you imagine it to be implemented, when the program flow forms a cycle, it would either raise an error or not halt. Basically it seems like to make ReturnsOdd(f, args) or anything of the sort, you would have to solve the halting problem; determining program flow being a subset of the halting problem--if this was your point then I agree.

Name: Anonymous 2016-09-14 6:33

>>4
You can have a O(1) program that halts.

Name: Anonymous 2016-09-14 6:36

>>6
*doesn't halt

Name: Anonymous 2016-09-14 6:55

All programs eventually halt when i shut the computer down.

Name: Anonymous 2016-09-14 13:13

But is there a point in knowing a program will take a non-infinite number of eons?

Name: Anonymous 2016-09-14 13:37

>>9
each 40 years American BMI rises 3 points.
How many years since 1960 remains until Earth becomes a neutron star?

Name: Anonymous 2016-09-14 14:09

[B][B][C][o][d][e]~PHALE~[/B][/B][/C][/o][/d][/e]

Name: Anonymous 2016-09-14 14:17

>>2
What about a magical algorithm that can decide if any algorithm returns an odd number? Why wouldn't P(P) prove the undecidability of this more specific problem?

Name: Anonymous 2016-09-14 15:51

>>12
decide if any algorithm returns
Then your magical crap doesn't exist.

Name: le segfault face !yKlKAT7mo. 2016-09-14 18:54

An algorithm to determine if any algorithm returns is actually trivial to implement.

Name: ✈▌▌ 2016-09-14 19:56

Halting problem = undecidability of all program properties?

yes

Name: Anonymous 2016-09-14 21:08

>>14
it's not because it doesn't exist

Name: Anonymous 2016-09-14 21:57

AYYO HOL UP

Yes I understand the proof. But something still bothers me--a human can figure out whether or not a small program halts (or returns odd, etc.) by looking at the source and acceptable inputs. Why can't strong AI solve the halting problem then?

Name: Anonymous 2016-09-14 22:42

Name: Anonymous 2016-09-14 23:08

>>17
a human can figure out whether or not a small program halts
you can write programs that do this too (although humans are much much better at doing it. it's an extremely difficult programming problem)

you just can't write a mathematically perfect algorithm that always tells yes or no

Name: Anonymous 2016-09-15 2:19

>>7
not logn?

Name: Anonymous 2016-09-15 7:42

>>17
both humans and algorithms can solve some specific cases but there is no possible general solution unless you have a Zeno machine.

Name: Anonymous 2016-09-15 7:44

speaking of Zeno machine, did you know that from a mathematical perspective, countably infinite (aleph zero) sets include natural numbers, integers, primes and dubs (check'em)?

Name: Anonymous 2016-09-15 16:57

Zeno machine
Zeno
IT'S ZENON YOU STUPID ANGLOS!

Name: Anonymous 2016-09-15 17:25

We might be able to solve the real-world useful version of the halting problem if it weren't for academic bullshiters who write retarded counterexamples.

Name: Anonymous 2016-09-15 17:50

>>24
What if your source code is infinitely long?

Name: Anonymous 2016-09-15 17:59

>>25
On what kind of real world do you live that infinitely long programs are possible? Do you have infinite memory?

Name: Anonymous 2016-09-15 18:12

if Halts(x, x) then loop forever
You found a program that tells you if a program halts and your first fucking idea is using it to loop forever?

How about don't write programs that do this dumb shit? This proof is retarded. Post something more believable instead.

Name: Anonymous 2016-09-15 18:49

>>26
Thanks to /prog/ I have infinite compression, which should be equivalent.

Name: Anonymous 2016-09-15 18:54

>>28
Someone give FrozenAnus a Turing prize!

Name: Anonymous 2016-09-15 18:56

>>27
The idea is that for any implementation of Halts(), you can devise a program (such as what you quoted) for which it won't work on. Therefore it cannot exist.

Name: Anonymous 2016-09-15 21:27

If we had Turing-complete hardware, we wouldn't need infinite (or any other kind of) compression.

Name: Anonymous 2016-09-15 21:34

>>30
That's like saying it's impossible to have strong materials because there will always be a nigger who tries to break it in half.

Holy shit, just restrict the problem to the space of programs that don't moronically contradict themselves and lie to the halting function, end of the goddamned fucking problem.

Name: Anonymous 2016-09-15 22:13

>>32
don't moronically contradict themselves and lie to the halting function

So you're supposed to already know whether or not the program halts before you pass it to the halting function?

Name: Anonymous 2016-09-15 23:44

>>33
No, just use the space of programs that don't call the Halts() function. Every single program in existence right now is in this space, including programs that don't halt and programs that do.

Name: Anonymous 2016-09-16 1:07

>>34
Then you'd be solving only a subset of the halting problem.

Name: Anonymous 2016-09-16 1:44

>>35
The only practically useful subset of the halting problem, which academics refuse to solve because of some stupid counterexample.

Name: Anonymous 2016-09-16 2:33

>>36
The computational power required to solve the halting problem for any non-trivial real program would still be immense. It would make brute-forcing a 32768-bit RSA key look easy.

Name: Anonymous 2016-09-16 6:53

>>37
Considering only a limited subset of sequences of assembler instructions make sense and don't crash, the number of valid programs is much smaller than you think.

Name: Anonymous 2016-09-16 8:01

>>38
you're right, that's why in the whole history of computer science we've been only able to find 3 valid programs

Name: Anonymous 2016-09-16 8:21

>>39
Try it. Create a random binary file and execute it.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List