Skip to main content

Common destinations

    柊東雲
    Library / Books & Studies /Gödel, Escher, Bach: A Deep Study of Structure, Meaning, and the Self

    ChapterPage 5 of 22

    III. Recursion Is Not a Mysterious Circle

    An In-Depth Study of Hofstadter’s Gödel, Escher, BachHiiragi Shinonomeabout 4,338 words · 19 minLong-Form Study · Full Text

    Reading Settings
    Font Size
    Line Spacing
    Paragraphs
    Background
    Line Width
    My Reading

    Save Highlight

    Gödel, Escher, Bach: A Deep Study of Structure, Meaning, and the Self · Chapter · III. Recursion Is Not a Mysterious Circle

    Quote Share Card

    Your thought is not included

    III. Recursion Is Not a Mysterious Circle

    Recursion is often described as mysterious: a thing contains itself, a path returns to its starting point, a system generates itself out of itself. GEB offers plainer and more forceful material as well: calls, saving, returning, interpreters, search, and chunking. The key to recursion lies in how the same rule is used again with new parameters or in a new context, and how the system manages these different uses; the circle is only its surface shape.

    This chapter separates three things: definitions form loops, a single run passes through several levels, and an observer compresses these runs with higher-level concepts. The three can work together, but the conditions under which each holds differ. Once they are distinguished, recursion is first of all a technique and an interpretive method for organizing complex activity. Whether it is unbounded, whether it terminates, and whether it brings understanding all depend on specific conditions.

    3.1 One Procedure, with Different Parameters and Waiting Contexts in Each Call

    “The same function” refers to reuse of one rule; “different calls” refers to different parameters and waiting contexts. Recursion can run because each level saves the work it has not yet finished.

    Here is an original factorial example, with the domain restricted to natural numbers:

    f(0)=1,f(n)=n f(n−1)(n≥1). f(0)=1,\qquad f(n)=n\,f(n-1)\quad(n\geq1).

    To compute f(3), we invoke the same definition without letting three different values of n become mixed together. The outer level waits to multiply 3 by a result not yet obtained; the next level waits to multiply 2 by another result; the level below that waits to multiply 1 by the base case. Only on reaching f(0) are the unfinished tasks completed, in the reverse direction.

    Current actionContext still pendingValue obtained
    Entering f(3)After getting f(2), multiply by 3None yet
    Entering f(2)After getting f(1), multiply by 2, then return to the outer level to multiply by 3None yet
    Entering f(1)After getting f(0), multiply by 1, then return level by levelNone yet
    Computing f(0)Three items still pending outside1
    Returning to f(1)Outside still waiting to multiply by 2 and by 31
    Returning to f(2)Outside still waiting to multiply by 32
    Returning to f(3)No unfinished calls6

    In an actual run, stack frames can save each level’s parameters, return location, and local state. An implementation need not look like the pile of paper slips we imagine, but under this method of recursive evaluation the corresponding information must be retained in some form. If one switches to accumulators, optimization, or recomputation, one must separately explain how the same result is obtained. To confuse the sameness of a rule with the sameness of a running state is to make recursion resemble a demand that something finish itself in the same instant.

    For this reason, a returned value must be understood together with the calling environment. Suppose a subprocedure returns the number 2. In one outer context, it is next to be multiplied by 3; in another, it is next to have 3 added. Two systems may show the same local value at this moment, yet the next results are 6 and 5 respectively. Recording only “the current value is 2” merges differences needed to predict the next step. The trouble is that the representation omits the pending operation, while the number 2 itself is definite.

    Similar utterances falling at different narrative levels in A Little Harmonic Labyrinth are a literary counterpart of the same structural difficulty: remembering a sentence also requires remembering who says it, and in what situation. A stack can be used to explain what context must be kept; whether a reader’s memory is actually implemented by a stack is another question. (GEB, pp. 103–129.)

    Original figure: factorial calls save their context and complete pending work in turn on return

    3.2 Termination in Recursion Requires Provable Grounds

    Termination must be proved by three conditions: the domain, the decreasing quantity, and the base case. It concerns how a single run descends, not whether the code contains recursion or the call graph contains a cycle.

    For the factorial above, termination can be proved. The parameter starts as a natural number; each recursive call reduces it by 1; a natural number cannot descend forever along a strictly decreasing sequence; and at 0 the base case is used, which no longer recurses. Hence every legal input returns after finitely many calls.

    None of these three conditions can be dropped. If negative integers are also fed in while the recursion still stops only at 0, then starting from −1 it proceeds to −2, −3, and never reaches 0 automatically. If the recursive call is written as f(n), so that the parameter does not decrease, or if calls continue at 0, the base case effectively disappears.

    Mutual recursion can also terminate. Define two procedures E and O that decide the parity of a natural number: E(0) is true and O(0) is false; when n > 0, E(n) calls O(n−1), and O(n) calls E(n−1). The call graph has the circle E to O to E, yet each step of a specific run reduces n, so it eventually reaches 0. A static call graph may contain a cycle while dynamic execution is still of finite length.

    Conversely, a procedure may never call its own name directly, yet by calling several functions in turn it may never return. Whether it terminates is a matter of running, not of whether “itself” appears on the surface of the source code. For general programs, there is no algorithm that always correctly decides, for all inputs, whether the program halts; this limit is proved in Chapter six, while the termination of many specific programs can still be rigorously proved.

    The book lists many recurrence sequences and nested functions, letting very simple rules generate sequences that the naked eye cannot easily foresee. (Chapter V, around pp. 137–143.) This is instructive for understanding complexity. But to claim that something is chaotic, random, or uncomputable requires proof; a long irregular string of digits is only an observation. A short definition must also be shown separately to be well defined for every parameter: if a later call needs a value not yet obtained, one must prove that it does point to a smaller problem that can be handled.

    “Not terminating” is also not always failure. A service that keeps receiving messages, periodically outputs status, or responds to requests may run indefinitely by design. To evaluate it, ask whether each request eventually receives a response, not whether the whole process ends. The totality of a recursive function, the continuous availability of a service, and the completion condition of a stage each need different specifications. To treat “all processes must eventually stop” as a universal requirement of intelligence would exclude many systems that are meant to keep acting.

    3.3 Merging Repeated Computation Saves Resources, Provided the Subproblems Are Truly Equivalent

    The same structure may appear many times at the level of “each occurrence,” yet occupy only one node at the level of “kinds of subproblems.” Only subproblems that are equivalent under the stated conditions may share results.

    Consider another original example: F(0)=0, F(1)=1, and F(n)=F(n−1)+F(n−2). Computing F(4) naively expands F(3) and F(2), and F(3) in turn expands F(2) and F(1). The same numerical subproblem F(2) is computed more than once. Counting each call instance, there are nine calls in all; counting only distinct parameter states, there are just five, F(0) through F(4).

    This distinguishes the call tree from the dependency graph. The tree records every event of entering a procedure during a run; the graph merges identical subproblems. The memoization method, which saves computed results, exploits exactly this merging to avoid repeated work. It changes resource consumption, while the mathematical value of the function remains unchanged.

    Merging requires conditions. If the procedure reads, besides n, external state that may change, then “the same n” may no longer be the same problem. Omitting a random seed, the current time, or modifiable memory can make a cache return wrong results. Sameness of name is not enough; equivalence must hold under the stated conditions.

    This matters for interpreting mind. Forming a concept or a practiced skill often means not having to re-expand all underlying details each time. But compressing many experiences into one callable structure must preserve the differences relevant to the current task. Economy is not the only criterion: premature merging treats different objects as one, while overly fine distinctions prevent any transfer from happening. Recursion and chunking thus lead us to a question with more content than “are there rules?”: how does a system decide which structures are reusable, and which contexts must be kept?

    Internal state can also carry the results of past computation. When a cache has already fully retained the result of some computation, an earlier complete execution history may no longer add predictive information about the present; the present cache is still a product of past computation. Historical formation, current retention, and additional historical increment are three different things. When we later use Xikari’s history interface, which distinguishes how a stretch of history produced the present from what the present still retains, this distinction will be kept.

    3.4 Search Trees Propagate Results Upward, Bringing the Consequences of Many Steps Back to the Present Choice

    Game-tree search carries the results of subproblems back up level by level, making the choice sensitive to many-step consequences. What it selects is the best move under the given evaluation, opponent model, and search scope.

    GEB uses the search of board games to explain how recursion organizes anticipated actions and opponent replies. (End of Chapter V; Chapter XVIII.) A minimal original example is enough to show the mechanism. Suppose that we first choose left or right, and the opponent then chooses from the two outcomes of that branch. Higher final scores are better for us. This is a zero-sum situation: we try to raise the score, the opponent tries to lower it, and both sides choose ideally.

    • After choosing left, the possible scores are 3 and 5; the opponent will choose 3.
    • After choosing right, the possible scores are 2 and 9; the opponent will choose 2.
    • We should therefore choose left, which guarantees 3, rather than being drawn in by the tempting 9 in the right branch.

    Put recursively: our nodes take the maximum of their successors’ values, and the opponent’s nodes take the minimum. The computation carries subproblem results upward level by level; there is no need to “understand” the whole tree at once as a single picture. This mechanism can be run explicitly, and it also explains why a greedy choice that ignores the opponent goes wrong.

    The conclusion depends on the conditions just stated: the score adequately expresses the goal, the opponent really aims to lower our score, and the endgames have been evaluated accurately. In reality, cooperation, differing preferences, hidden information, and resource limits change the problem. When the tree is expanded only to a fixed depth and the leaf scores are merely heuristic evaluations, what is propagated upward is the choice under that evaluation and that search scope.

    Accordingly, deepening the search and improving the evaluation function are two different tasks. A deeper search sometimes makes up for short-sightedness; sometimes investing more computation under a faulty evaluation only prolongs the bias. Learning the evaluation function is a third task: it changes the judgments that later searches depend on. When the book later discusses Samuel’s program, it is worth separating these three stages rather than saying only that the machine “learned to play chess.”

    This example also changes our understanding of “seeing far.” Local computation, through explicit data and control relations, can produce choices sensitive to many-step consequences, with no local unit needing to hold a miniature of the whole future. This is a positive constitutive explanation: it shows how an apparently overall capability can be organized from checkable local steps. Whether the system has subjective anticipation is another question.

    3.5 Interpreters, Compilers, and Bootstrapping: When Changing Language Levels, Say What Is Preserved

    Interpretation, translation, and implementation are three different relations, each with its own correctness question. The circular dependency of bootstrapping always has a runnable starting point and can be analyzed entirely in technical terms.

    Chapter 10 turns attention to the several levels of description in a computer. (pp. 285–310.) A high-level program may be executed step by step by an interpreter, or first compiled into another representation and then executed by lower-level mechanisms. For the user, a high-level language makes certain structures easier to express; for the machine as a whole, a set of actually operating low-level processes is still required.

    There are at least three relations here. The interpretation relation states how a program representation is executed under a given interpreter; the translation relation states how one program is transformed into another representation; the implementation relation states which physical processes carry these states and operations. Drawing all three as a single “lower-level” arrow would conceal their different correctness questions.

    For example, judging whether a compiler is correct usually asks whether the target program, under the specified conditions, preserves the behavior the source program requires. It does not require the two programs to have identical states at every step. Two representations may have different intermediate states and different resource consumption, even different internal orders, yet be equivalent under the target observation. When the observed target expands to include time, memory, or exceptional behavior, the original equivalence may need to be checked again. A so-called “same program” always requires specifying which set of properties is preserved.

    Bootstrapping can be explained directly from this. A compiler for a language can be written in that language, but that source code initially needs some executable starting point: an existing compiler, a simpler implementation, or another explicit translation path. Once completed, the new version can process its own source; yet the first runnable mechanism still has its origin. The final structure of the circular dependency and the way that structure was established are two separate questions.

    Programs and data must also be distinguished in this way. The same bits may be treated as material to be processed in one place and as executable instructions in another. Roles are determined by the actual way they are interpreted and called; the bits themselves carry no permanent category label. One program processing another does not require understanding the full meaning of that other program, and once a program is treated as data, it can still take part in execution.

    These distinctions provide the foundation for the later discussion of self-reproduction. Copying a representation, executing that representation, and establishing the environment needed to execute it are three different tasks. A clever self-copying text can arrange the first two roles at once, but the interpreter and the physical carrier cannot be dispensed with. To describe “a program that can write programs” as “a system that creates itself without any external conditions” is to rewrite an analyzable technical structure as a myth.

    3.6 Whether a High-Level Description Is Accurate Depends on Dynamics and Task

    Whether compression applies depends on the dynamics and the task. If source states merged under one representation still yield the same target representation after updating, the high-level description is exact; otherwise it omits a key condition.

    Chunking can often save understanding and computation, and it can be entirely exact. A simple example is the integer process x → x+1, which records only the remainder of x on division by 3. The next state of the remainder is always 0 → 1 → 2 → 0, with no need to know the full numerical value of x. For this fixed dynamics, the macro update is completely determined; the compression does not make the next remainder random.

    By contrast, a representation like the one in section 3.1, which records only the returned value 2 and omits the outer operation, cannot predict whether the next step gives 6 or 5. The difference lies in whether, after updating, the source states merged under the same representation still yield the same target representation. This is independent of how high the level is. This problem will be rewritten with precise conditions in Chapter 15.

    When the book discusses the chunking of computing systems, it acknowledges both inter-level leakage and loss of predictability, and it also gives examples of stable macro regularities. (pp. 305–307.) So the book’s position is this: a good high-level representation spares us from expanding every detail each time, but we must state the domain over which it applies. A high-level description can also be entirely exact.

    Descriptive convenience and causal independence must also be kept apart. A subroutine can be named separately, yet in operation still depend on other subroutines; a melodic line may sound convincing when heard alone, yet still coordinate with other voices. Local analysis carries stronger guarantees only when the corresponding weak coupling, time-scale separation, or interface conditions actually exist. Simon’s argument about nearly decomposable systems will be developed in the chapter on ant colonies and the brain. The mere fact that “a system has levels” does not by itself license all of its conclusions.

    For mind, a concept may be a real and effective unit of explanation without needing to be located as the unique, fixed, and isolated neural component. That a concept is useful in everyday explanation does not settle whether the macro model that uses it stays closed under new situations and new interventions; this must be tested separately.

    3.7 Changing Interpretation Requires Checking, Axiom by Axiom, Which Axioms the New Model Satisfies

    “Changing the interpretation” means finding a model that satisfies, one by one, the requirements placed on a given set of relations, and thereby obtaining a relative consistency warrant.

    The book relates the interpretation problem of formal systems to geometry. (Chapter IV, pp. 82–102.) Its methodological point is this: the meanings of undefined terms are constrained by the relations and axioms. By finding a model in which all relevant axioms hold for these terms, one obtains a relative consistency warrant. If the model construction itself depends on another body of mathematics, this warrant carries that mathematics’ presuppositions along with it.

    So when changing the interpretation, one must check whether the new objects and new relations really satisfy the axioms to be preserved. The familiar sphere intuition calls for particular caution. If one directly treats great circles on a sphere as straight lines in a plane, conditions such as intersection and uniqueness change, and one cannot claim that all the original geometric assumptions are retained without adjustment. An illuminating model picture is not yet a complete verification of the axioms.

    To make the “model” concrete, first construct a very small original incidence geometry. Three rules are required: any two distinct points lie on exactly one line; each line contains at least two points; and there exist three points not on one line. Let the points be A, B, C, D, and the lines be all the two-point sets, six in all: AB, AC, AD, BC, BD, CD. The first rule holds, since each pair of points corresponds to exactly one of the listed lines; the second holds by definition; A, B, and C are not collinear, because no line contains three points. Here a “line” is an incidence set, not a continuous stroke drawn on paper.

    Next define parallel as distinct and disjoint. For line AB and the point C outside it, the only line through C parallel to AB is CD; AC and BC both meet AB. For any other line and any point outside it, the same check holds. Therefore this four-point model satisfies “through a point outside a line there is exactly one parallel line.” Now delete D, keeping only A, B, C and the three lines AB, AC, BC. The first three incidence rules still hold, but for C outside AB, both lines through C meet AB, and no parallel line exists. It follows that the parallel condition is independent of those three incidence rules: the four-point model satisfies it, and the three-point model violates it. The two interpretations are different models, each verifiable item by item, for requirements placed on the same basic relations.

    This demonstration lets us know precisely which rules are preserved and what changes, and why an additional condition cannot be determined by the three listed rules. Neither of the two finite models carries continuity, order on lines, length, or angle axioms; once these are added, they may no longer be models. The complete proof of the independence of Euclid’s fifth postulate must be undertaken separately.

    Escher’s impossible constructions are a different kind of work. Staircases, supports, and perspective relations that look familiar locally are hard to fit into ordinary three-dimensional space when combined as a whole. The reader’s difficulty arises from insisting on several local interpretations at once and requiring them to hold in one overall model. The drawing does exist on paper, of course; the contradiction lies in the solid interpretation we assign to the relations depicted.

    This can be compared with the descriptive levels of computer systems: each local interface may look reasonable, yet together they may fail to satisfy a global constraint. The impossible building in a picture, an axiom set with no model, and a conflict between software interfaces remain different problems. The similarities help us ask whether local and global parts are compatible; specific conclusions must be reached within each domain of objects.

    For mind research, the gain is this: a “cannot understand” in experience sometimes arises from insisting on an unsuitable interpretation, while the object itself has another workable account. For a change of framework to count, it must supply a new preservation of relations and a new test; otherwise it becomes a way of evading counterexamples.

    3.8 Returns in Graphics and Music Share the Reuse of Rules, and Music Adds Time That Cannot Be Undone

    Geometric generation, musical return, and function calls share “the reuse of material or rules,” but their conditions of realization differ; musical return happens in real time, and the listener has already been changed by the intervening material.

    Recursive structure can appear in geometric generation and in musical organization. A graphic rule used repeatedly at different scales can produce shapes rich in detail; a piece of music returning to a theme or key can give earlier material a new relational position.

    A finite image can suggest infinite extension without actually containing infinite resolution; a listener who recognizes the return of a theme within a finite time has not completed an infinite number of levels of state recovery either. Some mathematical recursive definitions can describe an ideal limit, but whether the limit exists and what properties it has must be settled by the specific definition and proof. That an image looks “nested layer within layer” does not imply that all scales in nature obey the same mechanism.

    Return in music, even more, must not be treated as merely a stack operation. When the theme reappears, the listener has already been through the intervening material; the same sequence of notes may therefore carry different expectations, tension, and sense of ending. Explaining it as “recovering the original state” misses the fact that time cannot simply be undone. The book’s labyrinths and canons let us see structural correspondences and also expose their limits: formal transformations can be exact, while experiential effects are still constrained by performance, memory, style, and context.

    The later chapter on art will develop this difference further. Here one principle is established first: a cross-domain comparison need not be a complete identity to be valuable; to transfer a conclusion from one domain to another, one must state item by item which shared structures it depends on.

    3.9 From Recursive Organization to Cognitive Capability: Recursion Supplies a Set of Specific Conditions

    The role of recursion in GEB is to break down the distance between simple rules and complex organization: it gives a set of specific constitutive conditions that show how local steps organize into what looks like a capability of the whole.

    The conditions are these: repeated calls require management of parameters and context; termination requires descent or some other provable ground; sharing results requires the equivalence of subproblems under the relevant conditions; multistep choice requires evaluation, models of opponents, and mechanisms for passing results back; high-level representations must fit the task and the dynamics; bootstrapping requires a runnable starting point.

    With these conditions, certain capabilities of the whole can be understood directly. A system can use local steps to remember work not yet finished, reuse structures it has already mastered in new situations, make conditional choices about multistep consequences, and maintain certain goal relations with a smaller description of state. No local component needs to know every result of the whole in advance. This says more about what rule organization can do than the slogan “machines can only follow rules.”

    The next difficulties are thereby located more precisely: How are structures worth reusing selected? How does a system discover that its current macro-level representation has missed a key difference? When should evaluation be revised rather than simply spending more on search? How can a description of one’s own process enter actual control? These questions have to be answered by specific mechanisms; adding a “higher level” label does not solve them, and the need for reconstruction does not show that they exceed mechanical realization.

    Recursion lets us see how complexity is built step by step, and it also requires asking, at every “return to itself,” whether what is returned to is the same definition, the same representation, the same state, or an object already changed by time and context. This question leads directly to the next chapter’s coding and self-reference.


    Player

    Listening Room

    Only By Chasing the Wind

    唯有追赶风的方向Robin / HOYO-MiX / Chevy

    0:00 2:03