[bewijs] anti vastloop programma's kunnen niet bestaan

Pagina: 1
Acties:

  • p@dd0
  • Registratie: December 1999
  • Laatst online: 16-11-2025

p@dd0

psychonaut

Topicstarter
Mensen ik heb een leuk gedicht besproken gehad tijdens een college.
Het gaat over het bewijs dat het 'stop' probleem onbeslisbaar is.
En ik wilde dat met jullie delen :9
"Scooping the Loop Snooper" an elementary proof of the undecidability of the halting problem
No program can say what another will do.
Now, I won't just assert that, I'll prove it to you:
I will prove that although you might work till you drop,
you can't predict whether a program will stop.
Imagine we have a procedure called P
that will snoop in the source code of programs to see
there aren't infinite loops that go round and around;
and P prints the word "Fine!" if no looping is found.
You feed in your code, and the input it needs,
and then P takes them both and it studies and reads
and computes whether things will all end as they should
(as opposed to going loopy the way that they could).
Well, the truth is that P cannot possibly be,
because if you wrote it and gave it to me,
I could use it to set up a logical bind
that would shatter your reason and scramble your mind.
Here's the trick I would use - and it's simple to do.
I'd define a procedure - we'll name the thing Q -
that would take any program and call P (of course!)
to tell if it looped, by reading the source.
And if so, Q would simply print "Loop!" and then stop;
but if no, Q would go right back to the top,
and start off again, looping endlessly back,
till the universe dies and is frozen and black.
And this program called Q wouldn't stay on the shelf;
I would run it, and (fiendishly) feed it itself.
What behaviour results when I do this with Q?
When it reads its own source, just what will it do?
If P warns of loops, Q will print "Loop!" and quit;
yet P is supposed to speak truly of it.
So if Q's going to quit, then P should say, "Fine!" -
which will make Q go back to its very first line!
No matter what P would have done, Q will scoop it:
Q uses P's output to make P look stupid.
If P gets things right then it lies in its tooth;
and if it speaks falsely, it's telling the truth!
I've created a paradox, neat as can be -
and simply by using your putative P.
When you assumed P you stepped into a snare;
Your assumptions have led you right into my lair.
So, how to escape from this logical mess?
I don't have to tell you; I'm sure you can guess.
By reductio, there cannot possibly be
a procedure that acts like the mythical P.
You can never discover mechanical means
for predicting the acts of computing machines.
It's something that cannot be done. So we users
must find our own bugs; our computers are losers!
En, ...... leuk?

Amantes amentes
--
Be inspired!


  • Soultaker
  • Registratie: September 2000
  • Laatst online: 04:43
Pff, ik had pas bij de laatste paar regels door dat het zou moeten rijmen. Overigens valt uit het halting problem alleen af te leiden dat je nooit een programma kan maken dat van ALLE programma's kan zeggen of ze ooit klaar zijn. Je kan heel goed een programma schrijven dat voor 1% van de beschikbare programma's meldt of ze ooit afgelopen zijn. Met wat goede wil kun je dat percentage aardig omhoog krikken; je kan zelfs oneindig dicht bij 100% komen, maar de 100% zelf redt je niet (omdat er altijd zo'n case als Q bestaat, die niet op te lossen is).

  • Yoozer
  • Registratie: Februari 2001
  • Laatst online: 21-12-2025

Yoozer

minimoog

je stelling is? dit idee is aardig dr. seuss-achtig uitgevoerd, maar ik zie het discussiepunt niet echt, tenzij je bedoelt dat er zo iets als een perfecte computer niet bestaat. maar dat is al redelijk "common knowledge". niet iedereen houdt vast aan dhr. dijkstra's regeltjes, en zolang intel nog lekker met hun oude back-ass-wards 8086-compatibility blijft klooien zie ik er ook nog niet veel verbetering in optreden.

toch meer iets voor hardware algemeen? :P

teveel zooi, te weinig tijd


  • p@dd0
  • Registratie: December 1999
  • Laatst online: 16-11-2025

p@dd0

psychonaut

Topicstarter
Yoozer schreef op 11 december 2002 @ 00:24:
je stelling is? dit idee is aardig dr. seuss-achtig uitgevoerd, maar ik zie het discussiepunt niet echt, tenzij je bedoelt dat er zo iets als een perfecte computer niet bestaat. maar dat is al redelijk "common knowledge". niet iedereen houdt vast aan dhr. dijkstra's regeltjes, en zolang intel nog lekker met hun oude back-ass-wards 8086-compatibility blijft klooien zie ik er ook nog niet veel verbetering in optreden.

toch meer iets voor hardware algemeen? :P
Ik heb ook niet gemeld dat ik een dicussie wil.

Ik wilde dit wetenschappelijkbewijs met jullie delen ;)

Discussie mag altijd!

[ Voor 4% gewijzigd door p@dd0 op 11-12-2002 00:28 ]

Amantes amentes
--
Be inspired!


Verwijderd

die heb ik 4 weken geleden gehad :)
hey misschien wel bij etzelfde college. hij is leuk maar een flinke kluif om te bevatten