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

Pages: 1-4041-

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.

Name: Anonymous 2016-09-16 9:55

>>40
create random textfile and read it out loud. with a very high probability, it won't be correct English or comprehensible English or even a collection of pronounceable words. but it doesn't mean that a set of all unique possible texts in correct (or just comprehensible) English is small. in fact, without size restrictions such a set is infinite.

Name: Anonymous 2016-09-16 11:45

>>41
without size restrictions
Where are you buying these infinite hard drives?

Name: Anonymous 2016-09-16 11:50

>>42
ok then, let's test all valid programs within a certain size restriction. HDD size could be a good, realistic constraint: we won't test programs bigger than 1TB.

Name: Anonymous 2016-09-16 11:56

>>43
Wow, that's a lot of bloat!

Name: Anonymous 2016-09-16 11:58

of course this is all pointless because even if we're able to test those programs, some of them will keep running without there being a way of determining whether they will eventually halt or not. read up about busy beaver candidates - some of them have been running for years and we still don't know if they're halting or not.

Name: Anonymous 2016-09-16 12:01

>>44
enterprise java code!

Name: Anonymous 2016-09-16 21:38

>>43
we won't test programs bigger than 1TB.
I've written Lisp macros that generated more than that!

Name: Anonymous 2016-09-16 23:42

>>47
Are you implying that you've written programs bigger than 1TB? Talk about bloat.

Name: Anonymous 2016-09-16 23:58

>>47
yeah, that's not something to be proud of. ya fatboy

Name: Anonymous 2016-09-17 0:28

That's bigger than Losedows 7!

Name: Anonymous 2016-09-17 1:57

>>50
*LoseThos

Name: Anonymous 2016-09-17 7:15

>>47
That doesn't seem to be hard
#define add_bloat(x) int x [250000000000L];

Name: Is this what OP wanted? 2016-09-19 18:08

I will prove it's impossible to know if a function will return the string "/prog/".

Suppose there is a function return_prog(P, i) that returns true if P returns "/prog/" with i as input. Consider the program:

C(P, i) := "/gorp/" if returns_prog(P, i)
"/prog/" otherwise


What about C(C)? Wait, this is a CONTRADICTION!. Ergo ur wrong asshole. This proof is flawless.

What about f(x) := "/prog/"? No. Impossible to prove. Never, ever write programs that return "/prog/".

Put more effort on your posts, OP.

Name: Anonymous 2016-09-19 18:23

What is fals lwas?

Name: Anonymous 2016-09-19 22:43

>>54
Are you blind? It clearly says fals lwes.

Name: Anonymous 2016-09-20 15:32

>>55
nice dubs

Name: Anonymous 2016-09-24 2:30

Not sure whether OP is trying to be witty here, but isn't this exactly what Rice's theorem is about?

How come this thread has 56 replies and not a single person has pointed out OP is a retarded undergrad who just failed his first Automata Theory 101 exam?

Name: Anonymous 2016-09-24 20:27

>>57
Who is OP? Do you mean >>1 chan?

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