Ruka hadi maudhui
The Lumenary
Njia ya MaajabuHiari · haipewi alama kamweInaanzia Repetition and decisions

Can a computer decide?

Ukurasa huu bado haujatafsiriwa kwa Kiswahili, kwa hiyo unaonyeshwa kwa English.

Saidia kutafsiri →
1

Swali

Some programs stop and some loop forever. Could someone write one clever program that looks at any program, together with its input, and always correctly says whether it will stop?

Fanya jaribio kabla ya kuendelea kusoma. Hakuna njia mbaya ya kuchunguza.

2

Jaribio

Mashine ya mshazari

Hii ni orodha ya mifuatano isiyo na mwisho ya 0 na 1 (tunaweza kuonyesha mwanzo tu). Mfuatano wa dhahabu d unageuza mshazari.

s1…
s2…
s3…
s4…
s5…
s6…
d101001????…

Elekeza kwenye safu (au tumia Tab kuifikia) ili kuona mahali d inapotofautiana nayo. Bofya tarakimu yoyote ili kubadilisha orodha.

Ongeza d kwenye orodha na d mpya inatokea ambayo ni tofauti tena. Hakuna orodha — hata iwe ndefu kiasi gani — inayoweza kuwa na kila mfuatano.

3

Vidokezo, ukivitaka

    4

    Kinachoendelea

    Kinachoendelea

    In 1936 Alan Turing proved that no such checker can exist. The argument is short.

    Suppose a program HH could take any program PP and input xx and always answer correctly "PP stops on xx" or "PP runs for ever on xx". Build a new program DD: given a program PP, it asks HH whether PP stops when given its own text as input, and then does the opposite — if HH says "stops", DD loops for ever; if HH says "runs for ever", DD stops.

    Now run DD on its own text. If DD stops, then HH said "DD runs for ever" — wrong. If DD runs for ever, then HH said "DD stops" — wrong again. Either way HH makes a mistake, so the perfect checker HH cannot exist. This is the halting problem, and it is undecidable.

    This is the same diagonal trick Cantor used to show that some infinities are bigger than others, and Gödel used to show that no consistent formal system can prove every true statement about whole numbers. It does not say that we can never tell whether a particular program stops — often we can — only that no single program can do it for all programs. Henry Rice later showed that the same holds for every non-trivial question about what programs compute.

    Mlinganisho, si muundo rasmi: The experiment shows Cantor's diagonal argument for 0–1 sequences. The halting proof below uses the same diagonal idea, applied to programs; the experiment is an illustration of the idea, not the halting proof itself.

    Imejaribiwa kikokotoziImeandaliwa na AI · inasubiri ukaguzi wa binadamu
    5

    Hii inaelekea wapi