# Douglas Hofstadter - Godel Escher Bach Chapter 05a Recursive Structures and Processes

Embed Size (px)

Citation preview

• 7/21/2019 Douglas Hofstadter - Godel Escher Bach Chapter 05a Recursive Structures and Processes

1/26

Recursive Structures

and Processes

What Is Recursion?

WHAT IS RECURSION? It is what was illustrated in the Dialogue Little HarmonicLabyrinth: nesting, and ariations on nesting! The "on"e#t is er\$ general! %Stories inside

stories, &oies inside &oies, #aintings inside #aintings, Russian dolls inside Russian

dolls %een #arentheti"al "o&&ents in! side #arentheti"al "o&&ents'()these are *ust a +ewo+ the "har&s o+ re"ursion!( Howeer, \$ou should he aware that the &eaning o+

re"ursie- in this Cha#ter is onl\$ +aintl\$ related to its &eaning in Cha#ter ...! The

relation should /e "lear /\$ the end o+ this Cha#ter!So&eti&es re"ursion see&s to /rush #arado0 er\$ "losel\$! 1or e0ale, there are

recursive definitions! Su"h a de+inition &a\$ gie the "asual iewer the iression thatso&ething is /eing de+ined in ter&s o+ itself. That would /e "ir"ular and lead to in+inite

regress, i+ not to #arado0 #ro#er! A"tuall\$, a re"ursie de+inition %when #ro#erl\$+or&ulated( neer leads to in+inite regress or #arado0! This is /e"ause a re"ursie

de+inition neer de+ines so&ething in ter&s o+ itsel+, /ut alwa\$s in ter&s o+ simpler

versionso+ itsel+! What I &ean /\$ this will /e"o&e "learer shortl\$, when - show so&ee0ales o+ re"ursie de+initions!

One o+ the &ost "o&&on wa\$s in whi"h re"ursion a##ears in dail\$ li+e is when

\$ou #ost#one "oleting a tas2 in +aor o+ a siler tas2, o+ten o the sa&e t\$#e! Here isa good e0ale! An e0e"utie has a +an"\$ tele#hone and re"eies &an\$ "alls on it! He is

tal2ing to A when 3 "alls! To A he sa\$,, Would \$ou &ind holding +or a &o&ent? O+

"ourse he doesn-t reall\$ "ar i+ A &inds4 he *ust #ushes a /utton, and swit"hes to 3! Now C"alls! The sa&e de+er&ent ha##ens to 3! This "ould go on inde+initel\$, /ut let us not gettoo /ogged down in our enthusias&! So let-s sa\$ the "all with C ter&inates! Then our

e0e"utie #o#s /a"2 u# to 3, and "ontinues! 5eanwhile A is sitting at the other end o+

the line, dru&&ing his +ingernails again so&e ta/le, and listening to so&e horri/le5u6a2 #i#ed through the #hone lines to #la"ate hi& !!! Now the easiest "ase is i+ the "all

with 3 sil\$ ter&inates, and the e0e"utie returns to A +inall\$! 3ut it couldha##en that

a+ter the "onersation with 3 is resu&ed, a new "aller)D)"alls! 3 is on"e again #ushedonto the sta"2 o+ waiting "allers, and D is ta2en "are o+! A+t D is done, /a"2 to 3, then

/a"2 to A! This e0e"utie is ho#elessl\$ &e"hani"al, to /e sure)/ut we are illustrating

re"ursion in its &ost #re"ise +or&

Re"ursie Stru"tures and 7ro"esses .89

• 7/21/2019 Douglas Hofstadter - Godel Escher Bach Chapter 05a Recursive Structures and Processes

2/26

Pushing, Popping, and Stacks

In the #re"eding e0ale, I hae introdu"ed so&e /asi" ter&inolog\$ o+ re"ursion)at leastas seen through the e\$es o+ "outer s"ientists! The ter&s are push, pop, andstack %or

push-down stack, to /e #re"ise( and the\$ are all related! The\$ were introdu"ed in the late

.;ou haealread\$ en"ountered #ush and #o# in the Dialogue! 3ut I will s#ell things out an\$wa\$!

Topush&eans to sus#end o#erations on the tas2 \$ou-re "urrentl\$ wor2ing on, without

+orgetting where \$ou are)and to ta2e u# a new tas2! The new tas2 is usuall\$ said to /e ona lower leel than the earlier tas2! To popis the reerse)it &eans to "lose o#erations on

one leel, and to resu&e o#erations e0a"tl\$ where \$ou le+t o++, one leel higher!

3ut how do \$ou re&e&/er e0a"tl\$ where \$ou were on ea"h di++erent leel? Theanswer is, \$ou store the releant in+or&ation in a stack! So a sta"2 is *ust a ta/le telling

\$ou su"h things as %.( where \$ou were in ea"h un+inished tas2 %*argon: the return

address(, %8( what the releant +a"ts to 2now were at the #oints o+ interru#tion %*argon:

the aria/le /indings(! When \$ou #o# /a"2 u# to resu&e so&e tas2, it is the sta"2

whi"h restores \$our "onte0t, so \$ou don-t +eel lost! In the tele#hone)"all e0ale, thesta"2 tells \$ou who is waiting on ea"h di++erent leel, and where \$ou were in the

"onersation when it was interru#ted!3\$ the wa\$, the ter&s #ush, #o#, and sta"2 all "o&e +ro& the isual i&age

o+ "a+eteria tra\$s in a sta"2! There is usuall\$ so&e sort o+ s#ring underneath whi"h tends

to 2ee# the to#&ost tra\$ at a "onstant height, &ore or less! So when \$ou #ush a tra\$ ontothe sta"2, it sin2s a little)and when \$ou re&oe a tra\$ +ro& the sta"2, the sta"2 #o#s u# a

little!

One &ore e0ale +ro& dail\$ li+e! When \$ou listen to a news re#ort on the radio,

o+tenti&es it ha##ens that the\$ swit"h \$ou to so&e +oreign "orres#ondent! We nowswit"h \$ou to Sall\$ Swule\$ in 7ea+og, England! Now Sall\$ has got a ta#e o+ so&e

lo"al re#orter interiewing so&eone, so a+ter giing a /it o+ /a"2ground, she #la\$s it! I-&Nigel Cadwallader, here on s"ene *ust outside o+ 7ea+og, where the great ro//er\$ too2#la"e, and I-& tal2ing with !!! Now \$ou are three leels down! It &a\$ turn out that the

interiewee also #la\$s a ta#e o+ so&e "onersation! It is not too un"o&&on to go down

three leels in real news re#orts, and sur#risingl\$ enough, we s"ar"el\$ hae an\$awareness o+ the sus#ension! It is all 2e#t tra"2 o+ uite easil\$ /\$ our su/"ons"ious &ind!

7ro/a/l\$ the reason it is so eas\$ is that ea"h leel is e0tre&el\$ di++erent in +laor +ro&

ea"h other leel! I+ the\$ were all si&ilar, we would get "on+used in no ti&e +lat!An e0ale o+ a &ore "ole0 re"ursion is, o+ "ourse, our Dialogue! There,

A"hilles and the Tortoise a##eared on all the di++erent leels! So&eti&es the\$ were

reading a stor\$ in whi"h the\$ a##eared as "hara"ters! That is when \$our &ind &a\$ get a

little ha6\$ on what-s going on, and \$ou hae to "on"entrate "are+ull\$ to get things straight!=et-s see, the real A"hilles and Tortoise are still u# there in @ood+ortune-s heli"o#ter, /ut

the

Re"ursie Stru"tures and 7ro"esses .8

• 7/21/2019 Douglas Hofstadter - Godel Escher Bach Chapter 05a Recursive Structures and Processes

3/26

secondaryones are in so&e Es"her #i"ture)and then the\$ +ound this /oo2 and are reading

in it, so it-s the tertiaryA"hilles and Tortoise who wandering around inside the grooes o+

theLittle Harmonic Labyrinth! wait a &inute)I le+t out one leel so&ewhere !!! >ou haeto ha "ons"ious &ental sta"2 li2e this in order to 2ee# tra"2 o+ the re"ursion the Dialogue!

%See 1ig! 8B!(

FIGU! "#. \$ia%ram of the structure of the \$ialo%ue =ittle Har&oni" =a/\$rinth

&ertical descents are 'pushes'( rises ore 'pops'. )otice the similarity of this dia%ram to

indentation pattern of the \$ialo%ue. From the dia%ram it is clear that the initial tensionGoodfortune*s threat-never was resolved( +chilles and the ortoise were ust left

dan%lin% the sky. ome readers mi%ht a%oni/e over this unpopped push, while others

mi%ht not ba eyelash. In the story, 0ach*s musical labyrinth likewise was cut off too soon-but +chilles d even notice anythin% funny. 1nly the ortoise was aware of the more

%lobal dan%lin% tension

Stacks in Music

While we-re tal2ing a/out the =ittle Har&oni" =a/\$rinth, we should dis"uss

so&ething whi"h is hinted at, i+ not stated e0#li"itl\$ in the Dialogue: that hear &usi"re"ursiel\$)in #arti"ular, that we &aintain a &ental sta"2 o+ 2e\$s, and that ea"h new

&odulation #ushes a new 2e\$ onto the sta"2! ili"ation is +urther that we want to hear

that seuen"e o+ 2e\$s retra"e reerse order)#o##ing the #ushed 2e\$s o++ the sta"2, one /\$one, until the toni" is rea"hed! This is an e0aggeration! There is a grain o+ truth to it

howeer!

An\$ reasona/l\$ &usi"al #erson auto&ati"all\$ &aintains a shallow with two 2e\$s!In that short sta"2, the true toni" 2e\$ is held and also &ost i&&ediate #seudotoni"

%the 2e\$ the "ooser is #retending t in(! In other words, the &ost glo/al 2e\$ and the

&ost lo"al 2e\$! That the listener 2nows when the true toni" is regained, and +eels a strong

s o+ relie+! The listener "an also distinguish %unli2e A"hilles( /etween a localeasing o+tension)+or e0ale a resolution into the #seudotoni" ))

Re"ursie Stru"tures and 7ro"esses .8

• 7/21/2019 Douglas Hofstadter - Godel Escher Bach Chapter 05a Recursive Structures and Processes

4/26

and a %lobalresolution! In +a"t, a #seudoresolution should heighten the glo/al tension,

not reliee it, /e"ause it is a #ie"e o+ iron\$)*ust li2e A"hilles- res"ue +ro& his #erilous

#er"h on the swinging la, when all the while \$ou 2now he and the Tortoise are reall\$awaiting their dire +ates at the 2ni+e o+ 5onsieur @ood+ortune!

Sin"e tension and resolution are the heart and soul o+ &usi", there are &an\$, &an\$

e0ales! 3ut let us *ust loo2 at a "ou#le in 3a"h! 3a"h wrote &an\$ #ie"es in anAA33 +or&)that is, where there are two hales, and ea"h one is re#eated! =et-s ta2e the

gigue +ro& the 1ren"h Suite no! ;, whi"h is uite t\$#i"al o+ the +or&! Its toni" 2e\$ is @,

and we hear a ga\$ dan"ing &elod\$ whi"h esta/lishes the 2e\$ o+ @ strongl\$! Soon,howeer, a &odulation in the A)se"tion leads to the "losel\$ related 2e\$ o+ D %the

do&inant(! When the A)se"tion ends, we are in the 2e\$ o+ D! In +a"t, it sounds as i+ the

#ie"e has ended in the 2e\$ o+ D' %Or at least it &ight sound that wa\$ to A"hilles!( 3ut

then a strange thing ha##ens)we a/ru#tl\$ *u /a"2 to the /eginning, /a"2 to @, andrehear the sa&e transition into D! 3ut then a strange thing ha##ens)we a/ru#tl\$ *u

/a"2 to the /eginning, /a"2 to @, and rehear the sa&e transition into D!

Then "o&es the 3)se"tion! With the inersion o+ the the&e +or our &elod\$, we

/egin in D as i+ that had alwa\$s /een the toni")/ut we &odulate /a"2 to @ a+ter all, whi"h&eans that we #o# /a"2 into the toni", and the 3)se"tion ends #ro#erl\$! Then that +unn\$

re#etition ta2es #la"e, *er2ing us without warning /a"2 into D, and letting us return to @on"e &ore! Then that +unn\$ re#etition ta2es #la"e, *er2ing us without warning

The #s\$"hologi"al e++e"t o+ all this 2e\$ shi+ting)so&e *er2\$, so&e s&ooth)is er\$di++i"ult to des"ri/e! It is #art o+ the &agi" o+ &usi" that we "an auto&ati"all\$ &a2e sense

o+ these shi+ts! Or #erha#s it is the &agi" o+ 3a"h that he "an write #ie"es with this 2ind

o+ stru"ture whi"h hae su"h a natural gra"e to the& that we are not aware o+ e0a"tl\$

what is ha##ening!The originalLittle Harmonic Labyrinthis a #ie"e /\$ 3a"h in whi"h he tries to

lose \$ou in a la/\$rinth o+ ui"2 2e\$ "hanges! 7rett\$ soon \$ou are so disoriented that \$ou

don-t hae an\$ sense o+ dire"tion le+t)\$ou don-t 2now where the true toni" is, unless \$ouhae #er+e"t #it"h, or li2e Theseus, hae a +riend li2e Ariadne who gies \$ou a thread that

allows \$ou to retra"e \$our ste#s! In this "ase, the thread would /e a written s"ore! This

#ie"e)another e0ale is the Endlessl\$ Rising Canon)goes to show that, as &usi"listeners, we don-t hae er\$ relia/le dee# sta"2s!

Recursion in Language

Our &ental sta"2ing #ower is #erha#s slightl\$ stronger in language! The gra&&ati"al

stru"ture o+ all languages inoles setting u# uite ela/orate #ush)down sta"2s, though, to/e sure, the di++i"ult\$ o+ understanding a senten"e in"reases shar#l\$ with the nu&/er o+

#ushes onto the sta"2! The #roer/ial @er&an #heno&enon o+ the er/)at)the)end,

a/out whi"h

Re"ursie Stru"tures and 7ro"esses .

• 7/21/2019 Douglas Hofstadter - Godel Escher Bach Chapter 05a Recursive Structures and Processes

5/26

Droll tales o+ a/sent&inded #ro+essors who would /egin a senten"e, ra&/le on +or

an entire le"ture, and then +inish u# /\$ rattling o++ a string o+ er/s /\$ whi"h their

audien"e, +or who& the sta"2 had long sin"e lost its "oheren"e, would /e totall\$non#lussed, are told, is an e0"ellent e0ale o+ linguisti" #ushing and #o##ing! The

"on+usion a&ong the audien"e out)o+)order #o##ing +ro& the sta"2 onto whi"h the

#ro+essor-s er/s /een #ushed, is a&using to i&agine, "ould engender! 3ut in nor&al 2en@er&an, su"h dee# sta"2s al&ost neer o""ur)in +a"t, natie s#ea2er o+ @er&an o+ten

un"ons"iousl\$ iolate "ertain "onentions whi"h +or"e er/ to go to the end, in order to

aoid the &ental e++ort o+ 2ee#ing tra"2 o+ the sta"2! Eer\$ language has "onstru"tionswhi"h inole sta"2s, though usuall\$ o+ a less s#e"ta"ular nature than @er&an! 3ut there

are alwa\$s o+ re#hrasing senten"es so that the de#th o+ sta"2ing is &ini&al!

Recursive Transition Networks

The s\$nta"ti"al stru"ture o+ senten"es a++ords a good #la"e to #resent a o+ des"ri/ing

re"ursie stru"tures and #ro"esses: theecursive ransition )etwork%RTN(! An RTNis

a diagra& showing arious #aths whi"h "an /e +ollowed to a""olish a #arti"ular tas2!Ea"h #ath "onsists o+ a nu&/er o+ nodes, or little /o0es with words in the&, *oined /\$

arcs, or lines with arrows! The oerall na&e +or the RTNis written se#aratel\$ at the le+t,and the and last nodes hae the words be%inand endin the&! All the other nodes "ontain

either er\$ short e0#li"it dire"tions to #er+or&, or else na&e other RTN's! Ea"h ti&e \$ou

hit a node, \$ou are to "arr\$ out the dire"t inside it, or to *u to the RTNna&ed inside it,and "arr\$ it out!

=et-s ta2e a sale RTN, "alled ORNT! NO"N, whi"h tells how to "onstru"t a

"ertain t\$#e o+ English noun #hrase! %See 1ig! 89a!( I+ traerse ORNT! NO"N#urel\$

hori6ontall\$, we be%in*, then we "reate RTI#L!, an \$%!#TI&!, and a NO"N, thenwe end! 1or instan"e, the shaoo or a than2less /run"h! 3ut the ar"s show other

#ossi/ilities su"h as s2i##ing the arti"le, or re#eating the ad*e"tie! Thus we "o "onstru"t&il2, or /ig red /lue green snee6es, et"!When \$ou hit the node NO"N, \$ou are as2ing the un2nown /la"2 I "alled NO"N

to +et"h an\$ noun +or \$ou +ro& its storehouse o+ nouns! This is 2nown as aprocedure call,

in "outer s"ien"e ter&inolog\$! It &eans \$ou teoraril\$ gie "ontrol to a procedure%here, NO"N( whi"h %.( does thing %#rodu"es a noun( and then %8( hands "ontrol /a"2 to

\$ou! In a/oe RTN, there are "alls on three su"h #ro"edures: RTI#L!, \$%!#TI&!and NO"N! Now the RTNORNT! NO"N"ould itsel+ /e "alled +ro& so other RTN)+or instan"e an RTN"alled S!NT!N#!! In this "ase, ORNT! NO"Nwould #rodu"e

a #hrase su"h as the sill\$ shaoo and d return to the #la"e inside S!NT!N#!+ro&

whi"h it had /een "alled! I uite re&inis"ent o+ the wa\$ in whi"h \$ou resu&e where \$ou

le+t o++ nested tele#hone "alls or nested news re#orts!Howeer, des#ite "alling this a re"ursie transition networ2, we hae

Re"ursie Stru"tures and 7ro"esses ..

• 7/21/2019 Douglas Hofstadter - Godel Escher Bach Chapter 05a Recursive Structures and Processes

6/26

FIGU! "2. ecursive ransition )etworks for ORNT! NO"Nand N#( NO"N.

not e0hi/ited an\$ true re"ursion so +ar! Things get re"ursie)and see&ingl\$ "ir"ular)when\$ou go to an RTNsu"h as the one in 1igure 89/, +or N#( NO"N! As \$ou "an see,

eer\$ #ossi/le #athwa\$ in 1AN#( NO"Ninoles a "all on ORNT! NO"N, so thereis no wa\$ to aoid getting a noun o+ so&e sort or other! And it is #ossi/le to /e no &ore

ornate than that, "o&ing out &erel\$ with &il2 or /ig red /lue green snee6es! 3utthree o+ the #athwa\$s inole recursive"alls on N#( NO"Nitsel+! It "ertainl\$ loo2s

as i+ so&ething is /eing de+ined in ter&s o+ itsel+! Is that what is ha##ening, or not?

The answer is \$es, /ut /enignl\$! Su##ose that, in the #ro"edure S!NT!N#!,there is a node whi"h "alls N#( NO"N, and we hit that node! This &eans that we

"o&&it to &e&or\$ %i6!, the sta"2( the lo"ation o+ that node inside S!NT!N#!, so we-ll

2now where to return to)then we trans+er our attention to the #ro"edure N#( NO"N!Now we &ust "hoose a #athwa\$ to ta2e, in order to generate a N#( NO"N! Su##ose

we "hoose the lower o+ the u##er #athwa\$s)the one whose "alling seuen"e goes:

ORNT! NO"N) R!LTI&! PRONO"N) N#( NO"N) &!R*+

Re"ursie Stru"tures and 7ro"esses .8

• 7/21/2019 Douglas Hofstadter - Godel Escher Bach Chapter 05a Recursive Structures and Processes

7/26

So we s#it out an ORNT! NO"N: the stran%e ba%els4 a R!LTI&! NO"N: that4

and now we are suddenl\$ as2ed +or a N#( NO"N! 3 are in the &iddle o+ N#(

NO"N' >es, /ut re&e&/er our e0e"utie was in the &iddle o+ one #hone "all when hegot another one! He n stored the old #hone "all-s status on a sta"2, and /egan the new one

nothing were unusual! So we shall do the sa&e!

We +irst write down in our sta"2 the node we are at in the outer "all on N#(NO"N, so that we hae a return address4 then we *u t /eginning o+ N#( NO"Nas i+ nothing were unusual! Now we h "hoose a #athwa\$ again! 1or ariet\$-s sa2e, let-s

"hoose the lower #at ORNT! NO"N) PR!POSITION) N#( NO"N! That &eanswe #rodu"e an ORNT! NO"N%sa\$ the purple cow(, then a PR!POSITION %sa\$

Fwithout(, and on"e again, we hit the re"ursion! So we hang onto our hats des"end one

&ore leel! To aoid "ole0it\$, let-s assu&e that this the #athwa\$ we ta2e is the dire"t

one *ust ORNT! NO"N+1or e0ale: we &ight get horns! We hit the node !N\$inthis "all on N#( NO"Nwhi"h a&ounts to #o##ing out, and so we go to our sta"2 to

+ind the return address! It tells us that we were in the &iddle o+ e0e"uting N#(

NO"None leel u#)and so we resu&e there! This \$ields the purple cow without horns!

On this leel, too, we hit END, and so we #o# u# on"e &ore, this +inding ourseles inneed o+ a &!R*)so let-s "hoose %obbled! This ends highest)leel "all on N#(NO"N, with the result that the #hrase

'the stran%e ba%els that the purple cow without horns %obbled'

will get #assed u#wards to the #atient S!NT!N#!, as we #o# +or the last ti&e!

As \$ou see, we didn-t get into an\$ in+inite regress! The reason is tl least one

#athwa\$ inside the RTN N#( NO"Ndoes not inole re"ursie "alls on N#(

NO"N itsel+! O+ "ourse, we "ould hae #erersel\$ insisted on alwa\$s "hoosing the/otto& #athwa\$ inside N#( NO"Nthen we would neer hae gotten +inished, *ust as

the a"ron\$& O\$G neer got +ull\$ e0#anded! 3ut i+ the #athwa\$s are "hosen at rando&,

an in+inite regress o+ that sort will not ha##en!

-*otto.ing Out- and /eterarchies

This is the "ru"ial +a"t whi"h distinguishes re"ursie de+initions +ro& "ir"ular

ones! There is alwa\$s so&e #art o+ the de+inition whi"h aoids re+eren"e, so that the

a"tion o+ "onstru"ting an o/*e"t whi"h satis+ies the de+inition will eentuall\$ /otto&out!

Now there are &ore o/liue wa\$s o+ a"hieing re"ursiit\$ in RTNs than /\$ sel+)

"alling! There is the analogue o+ !scher*s \$rawin% %1ig! .;(, where ea"h o+ two

#ro"edures "alls the other, /ut not itsel+! 1or e0ale, we "ould hae an RTN na&ed#L"S!, whi"h "alls N#( NO"Nwheneer it needs an o/*e"t +or a transitie er/,

and "onersel\$, the u #ath o+ N#( NO"N"ould "all R!LTI&! PRONO"Nand

then #L"S!

Re"ursie Stru"tures and 7ro"esses .

• 7/21/2019 Douglas Hofstadter - Godel Escher Bach Chapter 05a Recursive Structures and Processes

8/26

wheneer it wants a relatie "lause! This is an e0ale o+ indire"t re"ursion! It is

re&inis"ent also o+ the two)ste# ersion o+ the E#i&enides #arado0!

Needless to sa\$, there "an /e a trio o+ #ro"edures whi"h "all one another,"\$"li"all\$)and so on! There "an /e a whole +a&il\$ o+ RTN-s whi"h are all tangled u#,

"alling ea"h other and the&seles li2e "ra6\$! A #rogra& whi"h has su"h a stru"ture in

whi"h there is no single highest leel, or &onitor, is "alled a heterar"h\$ %asdistinguished +ro& a hierar"h\$(! The ter& is due, I /eliee, to Warren 5"Cullo"h, one o+

the +irst "\$/erneti"ists, and a reerent student o+ /rains and &inds!

!0panding Nodes

One gra#hi" wa\$ o+ thin2ing a/out RTN-s is this! Wheneer \$ou are &oing along so&e#athwa\$ and \$ou hit a node whi"h "alls on an RTN, \$ou e0#and that node, whi"h

&eans to re#la"e it /\$ a er\$ s&all "o#\$ o+ the RTN it "alls %see 1ig! 8(! Then \$ou

#ro"eed into the er\$ s&all RTN,

1I@URE 8! The N#( NO"N RTNwith one node recursively e3panded

When \$ou #o# out o+ it, \$ou are auto&ati"all\$ in the right #la"e in the /ig one! While inthe s&all one, \$ou &a\$ wind u# "onstru"ting een &ore &iniature RTN-s! 3ut /\$

e0#anding nodes onl\$ when \$ou "o&e a"ross the&, \$ou aoid the need to &a2e an

in+inite diagra&, een when an RTN"alls itsel+!E0#anding a node is a little li2e re#la"ing a letter in an a"ron\$& /\$ the word it

stands +or! The O\$ a"ron\$& is re"ursie /ut has the de+e"t)or adantage)that \$ou

&ust re#eatedl\$ e0#and the @-4 thus it neer /otto&s out! When an RTNis ile&ented

as a real "outer #rogra&, howeer, it alwa\$s has at least one #athwa\$ whi"h aoids

re"ursiit\$ %dire"t or indire"t( so that in+inite regress is not "reated! Een the &ostheterar"hi"al #rogra& stru"ture /otto&s out)otherwise it "ouldn-t run' It would *ust /e

"onstantl\$ e0#anding node a+ter node, /ut neer #er+or&ing an\$ a"tion!

Re"ursie Stru"tures and 7ro"esses .

• 7/21/2019 Douglas Hofstadter - Godel Escher Bach Chapter 05a Recursive Structures and Processes

9/26

\$iagra. and Recursive Se1uences

In+inite geo&etri"al stru"tures "an /e de+ined in *ust this wa\$)that is /\$ e0#andingnode a+ter node! 1or e0ale, let us de+ine an in+inite diagra& "alled Diagra& @! To do

so, we shall use an ili"it re#resentation! In two nodes, we shall write &erel\$ the letter

@-, whi"h, howeer, will stand +or an entire "o#\$ o+ Diagra& @! In 1igure 8a, Diagra&@ is #ortra\$ed ili"itl\$! Now i+ we wish to see Diagra& @ &ore e0#li"itl\$, we e0#and

ea"h o+ the two @-s)that is, we replace them by the same dia%ram, onl\$ redu"ed in s"ale

%see 1ig! 8/(! This se"ond)order ersion o+ Diagra& gies us an in2ling o+ what the+inal, iossi/le)to)reali6e Diagra& @ reall\$ loo2s li2e! In 1igure < is shown a larger

#ortion o+ Diagra& @, where all the nodes hae /een nu&/ered +ro& the /otto& u#, and

+ro& le+t to right! Two e0tra nodes)nu&/ers )) . and 8))) hae /een inserted at the /otto&This in+inite tree has so&e er\$ "urious &athe&ati"al #ro#erties Running u# its

right)hand edge is the +a&ous seuen"e o+Fibonacci numbers!

., ., 8, , ;, , ., 8., , ;;, , ., 8,

dis"oered around the \$ear .8

• 7/21/2019 Douglas Hofstadter - Godel Escher Bach Chapter 05a Recursive Structures and Processes

10/26

FIGU! 45. \$ia%ram G, further e3panded and with numbered nodes.

de+ined re"ursiel\$ /\$ the #air o+ +or&ulas

I*O%n( J I*O%n) .( K I*O%n)8( +or n L 8

I*O%l( J I*O%8( J .

Noti"e how new 1i/ona""i nu&/ers are de+ined in ter&s o+ #reious 1i/ona""i nu&/ers!We "ould re#resent this #air o+ +or&ulas in an RTN%see 1ig! .(!

FIGU! 46. +n RTNfor Fibonacci numbers.

Thus \$ou "an "al"ulate I*O%.;( /\$ a seuen"e o+ re"ursie "alls on the #ro"edure

de+ined /\$ the RTNa/oe! This re"ursie de+inition /otto&s out when \$ou hit I*O%.(or I*O%8( %whi"h are gien e0#li"itl\$( a+ter \$ou hae wor2ed \$our wa\$ /a"2wards

through des"ending alues o+ n! It is slightl\$ aw2ward to wor2 \$our wa\$ /a"2wards,

when \$ou "ould *ust as well wor2 \$our wa\$ +orwards, starting with I*O%l( and I*O%8(

and alwa\$s adding the &ost re"ent two alues, until \$ou rea"h I*O%.;(! That wa\$ \$oudon-t need to 2ee# tra"2 o+ a sta"2!

Now Diagra& @ has so&e een &ore sur#rising #ro#erties than this! Its entire

stru"ture "an /e "oded u# in a single re"ursie de+inition, as +ollows:

Re"ursie Stru"tures and 7ro"esses .B

• 7/21/2019 Douglas Hofstadter - Godel Escher Bach Chapter 05a Recursive Structures and Processes

11/26

%n( J n ) %%n) .(( +or n L ou &ight well wonder whether su"h an intri"ate stru"ture would eer show u# in

an e0#eri&ent! 1ran2l\$, I would /e the &ost sur#rised #erson in the world i+ @#lot "a&e

out o+ an\$ e0#eri&ent! The #h\$si"alit\$ o+ @#lot lies in the +a"t that it #oints the wa\$ tothe #ro#er &athe&ati"al treat&ent o+ less ideali6ed #ro/le&s o+ this sort! In other words,

@#lot is #urel\$ a "ontri/ution to theoreti"al #h\$si"s, not a hint to e0#eri&entalists as to

what to e0#e"t to see' An agnosti" +riend o+ &ine on"e was so stru"2 /\$ @#lot-s in+initel\$

&an\$ in+inities that he "alled it a #i"ture o+ @od, whi"h I don-t thin2 is /las#he&ous atall!

Recursion at the Lowest Leve5 o6 Matter

We hae seen re"ursion in the gra&&ars o+ languages, we hae seen re"ursiegeo&etri"al trees whi"h grow u#wards +oreer, and we hae seen one wa\$ in whi"h

re"ursion enters the theor\$ o+ solid state #h\$si"s! Now we are going to see \$et another

wa\$ in whi"h the whole world is /uilt out o+ re"ursion! This has to do with the stru"ture

o+ ele&entar\$ #arti"les: ele"trons, #rotons, neutrons, and the tin\$ uanta o+ele"tro&agneti" radiation "alled #hotons! We are going to see that #arti"les are)in a

"ertain sense whi"h "an onl\$ /e de+ined rigorousl\$ in relatiisti" uantu& &e"hani"s ))nested inside ea"h other in a wa\$ whi"h "an /e des"ri/ed re"ursiel\$, #erha#s een /\$so&e sort o+ gra&&ar!

We /egin with the o/seration that i+ #arti"les didn-t intera"t with ea"h other,

things would /e in"redi/l\$ sile! 7h\$si"ists would li2e su"h a world /e"ause then the\$"ould "al"ulate the /ehaior o+ all #arti"les easil\$ %i+ #h\$si"ists in su"h a world e0isted,

whi"h is a dou/t+ul #ro#osition(! 7arti"les without intera"tions are "alled bare particles,

and the\$ are #urel\$ h\$#otheti"al "reations4 the\$ don-t e0ist!Now when \$ou turn on the intera"tions, then #arti"les get tangled u# together in

the wa\$ that +un"tions 1 and 5 are tangled together, or &arried #eo#le are tangled

together! These real #arti"les are said to /e renormali/ed)an ugl\$ /ut intriguing ter&!

What ha##ens is that no #arti"le "an een /e de+ined without re+erring to all other#arti"les, whose de+initions in turn de#end on the +irst #arti"les, et"! Round and round, in

a neer)ending loo#!

Re"ursie Stru"tures and 7ro"esses .8

• 7/21/2019 Douglas Hofstadter - Godel Escher Bach Chapter 05a Recursive Structures and Processes

17/26

Fi%ure 4;. Gplot( a recursive %raph, showin% ener%y bands for electrons in an ideali/ed

crystal in a ma%netic field, representin% ma%netic field stren%th, runs vertically from 5

to 6. !ner%y runs hori/ontally. he hori/ontal line se%ments are bands of allowed

electron ener%ies.

Re"ursie Stru"tures and 7ro"esses .

• 7/21/2019 Douglas Hofstadter - Godel Escher Bach Chapter 05a Recursive Structures and Processes

18/26

=et us /e a little &ore "on"rete, now! =et-s li&it ourseles to onl\$ two 2inds o+

#arti"les: electronsandphotons! We-ll also hae to throw in the ele"tron-s anti#arti"le, the

positron! %7hotons are their own anti#arti"les!( I&agine +irst a dull world where a /areele"tron wishes to #ro#agate +ro& #oint A to #oint 3, as eno did in &\$ hree-

• 7/21/2019 Douglas Hofstadter - Godel Escher Bach Chapter 05a Recursive Structures and Processes

19/26

As \$ou &ight hae anti"i#ated, these irtual #ro"esses "an /e inside ea"h other to

ar/itrar\$ de#th! This "an gie rise to so&e "oli"ated)loo2ing drawings, su"h as the one

in 1igure ;! In that &an diagra&, a single ele"tron enters on the le+t at A, does so&e ana"ro/ati"s, and then a single ele"tron e&erges on the right at 3! outsider who "an-t see the

inner &ess, it loo2s as i+ one ele"tron #ea"e+ull\$ sailed +ro& A to 3! In the diagra&, \$ou

"an see how el lines "an get ar/itraril\$ e&/ellished, and so "an the #hoton lines diagra&would /e +ero"iousl\$ hard to "al"ulate!

!

FIGU! 4=. + Feynman dia%ram showin% the propa%ation of a renormali/ed electron

from + to 0. In this dia%ram, time increases to the ri%ht. herefore, in the se%ments wherethe electron>s arrow points leftwards, it is movin% 'backwards in time'. + more intuitive

way to say this is that an antielectron 7positron8 is movin% forwards in time.

• 7/21/2019 Douglas Hofstadter - Godel Escher Bach Chapter 05a Recursive Structures and Processes

20/26

the #h\$si"ist has to /e a/le to ta2e a sort o+ aerage o+ all the in+initel\$ &an\$ di++erent

#ossi/le drawings whi"h inole irtual #arti"les! This is eno with a engean"e'Thus the #oint is that a #h\$si"al #arti"le)a renor&ali6ed #arti"le inoles %.( a

/are #arti"le and %8( a huge tangle o+ irtual #arti"les, ine0tri"a/l\$ wound together in a

re"ursie &ess! Eer\$ real #arti"le-s e0isten"e there+ore inoles the e0isten"e o+in+initel\$ &an\$ other #arti"les, "ontained in a irtual "loud whi"h surrounds it as it

#ro#agates! And ea"h o+ the irtual #arti"les in the "loud, o+ "ourse, also drags along its

own irtual "loud, and so on ad in+initu&!7arti"le #h\$si"ists hae +ound that this "ole0it\$ is too &u"h to handle, and in

order to understand the /ehaior o+ ele"trons and #hotons, the\$ use a##ro0i&ations

whi"h negle"t all /ut +airl\$ sile 1e\$n&an diagra&s! 1ortunatel\$, the &ore "ole0 a

diagra&, the less iortant its "ontri/ution! There is no 2nown wa\$ o+ su&&ing u# all o+the in+initel\$ &an\$ #ossi/le diagra&s, to get an e0#ression +or the /ehaior o+ a +ull\$

renor&ali6ed, #h\$si"al ele"tron! 3ut /\$ "onsidering roughl\$ the silest hundred

diagra&s +or "ertain #ro"esses, #h\$si"ists hae /een a/le to #redi"t one alue %the so)

"alled g)+a"tor o+ the &uon( to nine de"i&al #la"es )) "orre"tl\$'Renor&ali6ation ta2es #la"e not onl\$ a&ong ele"trons and #hotons! Wheneer

an\$ t\$#es o+ #arti"le intera"t together, #h\$si"ists use the ideas o+ renor&ali6ation tounderstand the #heno&ena! Thus #rotons and neutrons, neutrinos, #i)&esons, uar2s)all

the /easts in the su/nu"lear 6oo the\$ all hae /are and renor&ali6ed ersions in #h\$si"al

theories! And +ro& /illions o+ these /u//les within /u//les are all the /easts and /au/leso+ the world "oosed!

#opies and Sa.eness

=et us now "onsider @#lot on"e again! >ou will re&e&/er that in the

Introdu"tion, we s#o2e o+ di++erent arieties o+ "anons! Ea"h t\$#e o+ "anon e0#loitedso&e &anner o+ ta2ing an original the&e and "o#\$ing it /\$ an iso&or#his&, orin+or&ation)#resering trans+or&ation! So&eti&es the "o#ies were u#side down,

so&eti&es /a"2wards, so&eti&es shrun2en or e0#anded !!! In @#lot we hae all those

t\$#es o+ trans+or&ation, and &ore! The &a##ings /etween the +ull @#lot and the "o#ieso+ itsel+ inside itsel+ inole si6e "hanges, s2ewings, re+le"tions, and &ore! And \$et there

re&ains a sort o+ s2eletal identit\$, whi"h the e\$e "an #i"2 u# with a /it o+ e++ort,

#arti"ularl\$ a+ter it has #ra"ti"ed with INT!Es"her too2 the idea o+ an o/*e"t-s #arts /eing "o#ies o+ the o/*e"t itsel+ and &ade

it into a #rint: his wood"utFishes and cales%1ig! B(! O+ "ourse these +ishes and s"ales

are the sa&e onl\$ when seen on a su++i"ientl\$ a/stra"t #lane! Now eer\$one 2nows that a

+ish-s s"ales aren-t reall\$ s&all "o#ies o+ the +ish4 and a +ish-s "ells aren-t s&all "o#ies o+the +ish4 howeer, a +ish-s \$N, sitting inside ea"h and eer\$ one o+ the +ish-s "ells, is a

er\$ "ono)

Re"ursie Stru"tures and 7ro"esses .B

• 7/21/2019 Douglas Hofstadter - Godel Escher Bach Chapter 05a Recursive Structures and Processes

21/26

1I@URE B! 1ish and S"ales, /\$ 5! C! Es"her %wood"ut, .;(!

luted "o#\$ o+ the entire +ish)and so there is &ore than a grain o+ truth to the Es"her

#i"ture!

What is there that is the sa&e a/out all /utter+lies? The &a##ing +ro& one/utter+l\$ to another does not &a# "ell onto "ell4 rather, it &4 +un"tional #art onto

+un"tional #art, and this &a\$ /e #artiall\$ on a &a"ros"o#i" s"ale, #artiall\$ on a

&i"ros"o#i" s"ale! The e0a"t #ro#ortions o+ #a are not #resered4 *ust the +un"tionalrelationshi#s /etween #arts! This is the t\$#e o+ iso&or#his& whi"h lin2s all /utter+lies in

Es"her-s wood engraing0utterflies%1ig! 9( to ea"h other! The sa&e goes +or the &ore

a/stra"t /utter+lies o+ @#lot, whi"h are all lin2ed to ea"h other /\$ &athe&ati"al &a##ings

that "arr\$ +un"tional #art onto +un"tional #art, /ut totall\$ ignore e0a"t line #ro#ortions,

angles, and so on!Ta2ing this e0#loration o+ sa&eness to a \$et higher #lane o+ a/stra"tion, we &ight

well as2, What is there that is the sa&e- a/out all Es" l drawings? It would /e uiteludi"rous to attet to &a# the& #ie"e /\$ #ie"e onto ea"h other! The a&a6ing thing is

that een a tin\$ se"tion o+ an

Re"ursie Stru"tures and 7ro"esses .9

• 7/21/2019 Douglas Hofstadter - Godel Escher Bach Chapter 05a Recursive Structures and Processes

22/26

1I@URE 9! 3utter+lies, /\$ 5! C! Es"her %wood)engraing, .;

• 7/21/2019 Douglas Hofstadter - Godel Escher Bach Chapter 05a Recursive Structures and Processes

23/26

ent leels at on"e! 3ut the eents on di++erent leels aren-t e0a"tl\$ sa&e)rather, we +ind

so&e inariant +eature in the&, des#ite &an\$ s in whi"h the\$ di++er! 1or e0ale, in the

Little Harmonic Labyrinth, all stories on di++erent leels are uite unrelated)theirsa&eness reside onl\$ two +a"ts: %.( the\$ are stories, and %8( the\$ inole the Tortoise

and A"hilles! Other than that, the\$ are radi"all\$ di++erent +ro& ea"h other!

Progra..ing and Recursion7 Modu5arit8, Loops, Procedures

One o+ the essential s2ills in "outer #rogra&&ing is to #er"eie wl two #ro"esses arethe sa&e in this e0tended sense, +or that leads &odulari6ation)the /rea2ing)u# o+ a tas2

into natural su/tas2s! 1or stan"e, one &ight want a seuen"e o+ &an\$ si&ilar o#erations

to /e "art out one a+ter another! Instead o+ writing the& all out, one "an write a h whi"htells the "outer to #er+or& a +i0ed set o+ o#erations and then loo# /a"2 and #er+or&

the& again, oer and oer, until so&e "ondition is satis+ied! Now the bodyo+ the loo#)the

+i0ed set o+ instru"tions to re#eated)need not a"tuall\$ /e "oletel\$ +i0ed! It &a\$ ar\$ in

so #redi"ta/le wa\$!

An e0ale is the &ost sile)&inded test +or the #ri&alit\$ o natural nu&/er N,in whi"h \$ou /egin /\$ tr\$ing to diide N /\$ 8, then , , ;, et"! until N ) .! I+ N has

suried all these tests without /e diisi/le, it-s #ri&e! Noti"e that ea"h ste# in the loo# issi&ilar to, /ut i the sa&e as, ea"h other ste#! Noti"e also that the nu&/er o+ ste#s aries

with N)hen"e a loo# o+ +i0ed length "ould neer wor2 as a general test #ri&alit\$! There

are two "riteria +or a/orting the loo#: %.( i+ so nu&/er diides N e0a"tl\$, uit withanswer NO4 %8( i+ N ) . is rea"t as a test diisor and N suries, uit with answer

>ES!

The general idea o+ loo#s, then, is this: #er+or& so&e series o+ related ste#s oer

and oer, and a/ort the #ro"ess when s#e"i+i" "onditions are n Now so&eti&es, the&a0i&u& nu&/er o+ ste#s in a loo# will /e 2nown adan"e4 other ti&es, \$ou *ust /egin,

and wait until it is a/orted! The se"ond t\$#e o+ loo# )) whi"h I "all a free loo# )) isdangerous, /e"ause "riterion +or a/ortion &a\$ neer o""ur, leaing the "outer in a so)"al in+inite loo#! This distin"tion /etween bounded loopsandfree loopsis one the &ost

iortant "on"e#ts in all o+ "outer s"ien"e, and we shall de an entire Cha#ter to it:

3loo7 and 1loo7 and @.oo7!Now loo#s &a\$ /e nested inside ea"h other! 1or instan"e, su##ose t we wish to

test all the nu&/ers /etween . and ;

2nitting or "ro"heting)in whi"h er\$ s&all loo#s are

Re"ursie Stru"tures and 7ro"esses .

• 7/21/2019 Douglas Hofstadter - Godel Escher Bach Chapter 05a Recursive Structures and Processes

24/26

re#eated seeral ti&es in larger loo#s, whi"h in turn are "arried out re#eatedl\$ !!! While

the result o+ a low)leel loo# &ight /e no &ore than "ou#le o+ stit"hes, the result o+ a

high)leel loo# &ight /e a su/stantial #ortion o+ a #ie"e o+ "lothing!In &usi", too, nested loo#s o+ten o""ur)as, +or instan"e, when a s"ale %a s&all

loo#( is #la\$ed seeral ti&es in a row, #erha#s dis#la"ed in #it"h ea"h new ti&e! 1or

e0ale, the last &oe&ents o+ /oth the 7ro2o+ie +i+th #iano "on"erto and theRa"h&anino++ se"ond s\$hon\$ "ontain e0tended #assages in whi"h +ast, &ediu&, and

slow s"ale)loo#s are #la\$ed si&ultaneousl\$ /\$ di++erent grou#s o+ instru&ents, to great

e++e"t! The 7ro2o+ie s"ales go u#4 the Ra"h&anino++)s"ales, down! Ta2e \$our #i"2!A &ore general notion than loo# is that o+ su/routine, or #ro"edure, whi"h we

hae alread\$ dis"ussed so&ewhat! The /asi" idea here is that a grou# o+ o#erations are

lued together and "onsidered a single unit with a na&e)su"h as the #ro"edure

ORNT! NO"N! As we saw in RTN-s, #ro"edures "an "all ea"h other /\$ na&e, andthere/\$ e0#ress er\$ "on"isel\$ seuen"es o+ o#erations whi"h are to /e "arried out! This

is the essen"e o+ &odularit\$ in #rogra&&ing! 5odularit\$ e0ists, o+ "ourse, in hi)+i

s\$ste&s, +urniture, liing "ells, hu&an so"iet\$)whereer there is hierar"hi"al

organi6ation!5ore o+ten than not, one wants a #ro"edure whi"h will a"t aria/l\$, a""ording to

"onte0t! Su"h a #ro"edure "an either /e gien a wa\$ o+ #eering out at what is stored in&e&or\$ and sele"ting its a"tions a""ordingl\$, or it "an /e e0#li"itl\$ +ed a list o+

#ara&eters whi"h guide its "hoi"e o+ what a"tions to ta2e! So&eti&es /oth o+ these

&ethods are used! In RTNter&inolog\$, "hoosing the seuen"e o+ a"tions to "arr\$ outa&ounts to "hoosing which pathway to follow! An RTNwhi"h has /een sou#ed u# with

#ara&eters and "onditions that "ontrol the "hoi"e o+ #athwa\$s inside it is "alled an

+u%mented ransition )etwork%TN(! A #la"e where \$ou &ight #re+er TN-s toRTN's

is in #rodu"ing sensi/le)as distinguished +ro& nonsensi"al)English senten"es out o+ rawwords, a""ording to a gra&&ar re#resented in a set o+ TN-s! The #ara&eters and

"onditions would allow \$ou to insert arious se&anti" "onstraints, so that rando&

*u0ta#ositions li2e a than2less /run"h would /e #rohi/ited! 5ore on this in Cha#terQIII, howeer!

Recursion in #hess Progra.s

A "lassi" e0ale o+ a re"ursie #ro"edure with #ara&eters is one +or "hoosing the /est&oe in "hess! The /est &oe would see& to /e the one whi"h leaes \$our o##onent in

the toughest situation! There+ore, a test +or goodness o+ a &oe is sil\$ this: #retend

\$ou-e &ade the &oe, and now ealuate the /oard +ro& the #oint o+ iew o+ \$our

o##onent! 3ut how does \$our o##onent ealuate the #osition? Well, he loo2s +or his/est&oe! That is, he &entall\$ runs through all #ossi/le &oes and ealuates the& +ro& what

he thin2s is \$our #oint o+ iew, ho#ing the\$ will loo2 /ad to \$ou! 3ut

Re"ursie Stru"tures and 7ro"esses .;

• 7/21/2019 Douglas Hofstadter - Godel Escher Bach Chapter 05a Recursive Structures and Processes

25/26

noti"e that we hae now de+ined /est &oe re"ursiel\$, sil\$ &a0i& that what is /est

+or one side is worst +or the other! The #ro"edure whi"h loo2s +or the /est &oe o#erates

/\$ tr\$ing a &oe and then callin% on itself in the role of opponent' As su"h, it triesanother n "alls on itsel+ in the role o+ its o##onent-s o##onent)that is, its

This re"ursion "an go seeral leels dee#)/ut it-s got to /otto& out so&ewhere'

How do \$ou ealuate a /oard #osition withoutloo2ing There are a nu&/er o+ use+ul"riteria +or this #ur#ose, su"h as si nu&/er o+ #ie"es on ea"h side, the nu&/er and t\$#e o+

#ie"es undo the "ontrol o+ the "enter, and so on! 3\$ using this 2ind o+ ealuation at the

/otto&, the re"ursie &oe)generator "an #o# /a"2 u#wards an% ealuation at the to#leel o+ ea"h di++erent &oe! One o+ the #ara&eters in the sel+)"alling, then, &ust tell

how &an\$ &oes to loo2 ahead! TI &ost "all on the #ro"edure will use so&e e0ternall\$

set alue #ara&eter! Therea+ter, ea"h ti&e the #ro"edure re"ursiel\$ "alls &ust de"rease

this loo2)ahead #ara&eter /\$ .! That wa\$, w #ara&eter rea"hes 6ero, the #ro"edure will+ollow the alternate #athwa\$ )) the non)re"ursie ealuation!

In this 2ind o+ ga&e)#la\$ing #rogra&, ea"h &oe inestigate the generation o+ a

so)"alled loo2)ahead tree, with the &oe trun2, res#onses as &ain /ran"hes, "ounter)

res#onses as su/sidiar\$ /ran"hes, and so on! In 1igure I hae shown a sile loo2)ahead tree de#i"ting the start o+ a ti")tar)toe ga&e! There is an art to +iguring to aoid

e0#loring eer\$ /ran"h o+ a loo2)ahead tree out to its ti#! trees, #eo#le)not "outers)see& to e0"el at this art4 it is 2nown that to#)leel #la\$ers loo2 ahead relatiel\$ little,

"oared to &ost "hess #rogra&s P \$et the #eo#le are +ar /etter' In the earl\$ da\$s o+

"oute #eo#le used to esti&ate that it would /e ten \$ears until a "outer %or

FIGU! 4?. he branchin% tree of moves and countermoves at the start of c tic-tac-toe.

Re"ursie Stru"tures and 7ro"esses .;.

• 7/21/2019 Douglas Hofstadter - Godel Escher Bach Chapter 05a Recursive Structures and Processes

26/26

#rogra&( was world "haion! 3ut a+ter ten \$ears had #assed, it see&ed that the da\$ a

"outer would /e"o&e world "haion was still &ore than ten \$ears awa\$ !!! This is

*ust one &ore #ie"e o+ eiden"e +or the rather re"ursie

Hofstadter*s Law: It alwa\$s ta2es longer than \$ou e0#e"t, een when \$ou ta2e into

Recursion and "npredicta9i5it8

Now what is the "onne"tion /etween the re"ursie #ro"esses o+ this Cha#ter, and the

re"ursie sets o+ the #re"eding Cha#ter? The answer inoles the notion o+ a recursively

enumerable set! 1or a set to /e r!e! &eans that it "an /e generated +ro& a set o+ starting#oints %a0io&s(, /\$ the re#eated a##li"ation o+ rules o+ in+eren"e! Thus, the set grows and

grows, ea"h new ele&ent /eing "oounded so&ehow out o+ #reious ele&ents, in a sort

o+ &athe&ati"al snow/all! 3ut this is the essen"e o+ re"ursion)so&ething /eing de+ined

in ter&s o+ siler ersions o+ itsel+, instead o+ e0#li"itl\$! The 1i/ona""i nu&/ers and the

=u"as nu&/ers are #er+e"t e0ales o+ r!e! sets)snow/alling +ro& two ele&ents /\$ are"ursie rule into in+inite sets! It is *ust a &atter o+ "onention to "all an r!e! set whose

"ole&ent is also r!e! re"ursie!Re"ursie enu&eration is a #ro"ess in whi"h new things e&erge +ro& old things

/\$ +i0ed rules! There see& to /e &an\$ sur#rises in su"h #ro"esses)+or e0ale the

un#redi"ta/ilit\$ o+ the M)seuen"e! It &ight see& that re"ursiel\$ de+ined seuen"es o+that t\$#e #ossess so&e sort o+ inherentl\$ in"reasing "ole0it\$ o+ /ehaior, so that the

+urther out \$ou go, the less #redi"ta/le the\$ get! This 2ind o+ thought "arried a little

+urther suggests that suita/l\$ "oli"ated re"ursie s\$ste&s &ight /e strong enough to

/rea2 out o+ an\$ #redeter&ined #atterns! And isn-t this one o+ the de+ining #ro#erties o+intelligen"e? Instead o+ *ust "onsidering #rogra&s "oosed o+ #ro"edures whi"h "an

re"ursiel\$ callthe&seles, wh\$ not get reall\$ so#histi"ated, and inent #rogra&s whi"h"an modifythe&seles)#rogra&s whi"h "an a"t on #rogra&s, e0tending the&, iroingthe&, generali6ing the&, +i0ing the&, and so on? This 2ind o+ tangled re"ursion

#ro/a/l\$ lies at the heart o+ intelligen"e!