Course Notes for WCCD

These are the notes for M1698: What computers cannot do, taught in Fall 2026 at UC Berkeley’s Splash program for high schoolers. If you are a prospective student, please instead check the course homepage.

These notes are also available as a PDF here.

Please note that this PDF is autogenerated from the same source code as this webpage, therefore it may contain unintended rendering errors.

Prelude

What can be computed? This class should really be called Computability Theory.

Classically, we conceive of the notion of “computing” something as an operation that could be done by a human computer. A reasonable mental model is a person equipped with an unlimited amount of scratch paper who could follow exact, precise instructions without mistakes (e.g. given numbers, add them, then write them in a the top left of the scratch paper), but could not parse or execute instructions requiring “insight,” e.g. “think of a proof proving is irrational.”

For simplicity, we can consider only methods of calculating functions on natural numbers, , noting that through various abstractions we can actually represent most problems we care about computing as functions from .

When we ask for a “mechanical process,” “effective process,” or “algorithm,” for computing a certain , we really mean a set of precise, well-defined instructions for the “human computer,” which when followed exactly yields the function’s value at a given input in a finite amount of steps taken. These notions of “precise,” “well-defined,” and “steps” are all quite hand-wavy, but eventually we will come up with a precise theoretical mechanism that represents the essence of what can be done “mechanically” (and, indeed, can be simulated by hand by a human given vast amounts of time, scratch paper, and patience). This device is famously known as the Turing machine and is essentially the fundamental object of analysis in computation.

In the modern age, digital computers exist, which famously are able to follow extremely precise machine instructions which we write as code. Modern computers do not implement the theoretical model of a Turing machine but are able to compute exactly the same set of functions. This is a truly miraculous phenomenon, as it means studying the theoretical properties of incredibly complicated modern programming languages can be reduced to studying just the Turing machine!

We propose the extremely imprecise notion of “Python-computability.” This is not a real term in TCS.

So for instance all basic arithmetic operations (thus all polynomials) are easily Python-computable. In fact all elementary functions are Python-computable.

Proof. As Python uses a finite alphabet for source code, there are only countably many Python programs. There are uncountably many functions . ⁠ 

The second fact you should have learned from a real analysis class. I learned the first fact in my analysis course; it’s a fun exercise otherwise.

The Church-Turing Thesis: any two reasonable notions of computability/calculability of are equivalent.

The thesis is not a formal theorem statement or anything of the sort. It’s something of a philosophical viewpoint observed by Alonzo Church and Alan Turing after finding that every early attempt at reasonably codifying “effective process,” “computability,” or “algorithm” such as Gödel’s recursive functions, Church’s -calculus, and Turing’s machine, all ended up being (provably) equivalent, i.e. they are able to solve exactly the same set of problems (that is, compute the exact same set of . To challenge the thesis, one would have to come up with a model of computation more powerful than a Turing machine, and thus far no one has come close. (Indeed, the modern von Neumann architecture digital computer is certainly not a challenge to the thesis, and neither is quantum computing.)

If you believe in the Church-Turing Thesis, then it’s no longer necessary to hold the notion of Python-computability, as anything Python-computable is also JavaScript-computable is also C-computable is also Turing-computable, so we can just drop the prefix and ask whether things are “computable.”

“Effectively calculable.”

Hilbert’s 10th problem: find a (mechanical) “process” which, given a polynomial , , “determine in a finite number of operations” whether has a root in .

Hilbert’s Program: Find a set of axioms for math and an “algorithm” to determine whether a given mathematical statement can be proven from those axioms.

-ary relations: .

Let . Defined by

Partial functions

For we write to mean and to mean . “Converges,” “Diverges.”

, .

If we say if

(Symbol soup for they agree on convergence, and value if converges. Functional extensionality for partials.)

Recursive partial functions

Some -ary partial functions are “clearly” effectively calculable (you could imagine a computer doing these easily).

  • Composition: if we already have two effectively calculable programs (functions), then composing them is trivial.

  • For , let be . Let be . ( for successor.)

  • For , let be the “-th projection”

  • For , , , let

    Here we say is defined by substitution from .

Let be the family of partial functions . An additional, very important rule:

  • Recursion: let , . Define by and .

    More generally, for , , , define . For , take , and .

    Here we say that is defined by primitive recursion from and . If

, then . Please note this is not the recursion you know and love from your intro CS class. In particular, it always terminates.

Proof. Use primitive recursion,

⁠ 

In the proof above, explicitly speaking, we chose . The choice of is also clear. Here , so given , a suitable choice is , since .

Beyond just satisfying the symbolic constraints we attempt to give an intuitive explanation for why this is a clear choice. We should interpret the -ary function as the familiar for loop. The first parameters constitute the vector , and the argument can be seen as the loop index . We should view as some immutable auxiliary data that the loop can access throughout its iterations. Indeed, notice that is passed unchanged throughout every recursive step of , , and .

The -ary function can be interpreted as an initial value at , and the -ary function is the loop body. The argument of is some value passed down from the previous iteration of the loop. The way I think about it is that at index of the loop, which is , we can pass on some value to the next iteration . We can therefore access the value passed to us by the previous iteration , which is why .

Once we digest primitive recursion from the for loop perspective, it becomes more palatable as a “primitive” form of recursion. Essentially, instead of a recursive function (in the colloquial sense) being able to arbitrarily call itself in its body, a primitive recursive function can only obtain the value of in its body, and the base case is guaranteed to be when . In this view, and are merely auxiliary functions to make the formalism work out.

Now the choice of is clear. For , we just need a for loop to add to , times. We don’t need the initial input , and we don’t need the index . So we use to choose the prior value of the “loop,” and then we add one to it (via the successor function). The initial value of the loop is clearly itself. Now the function defined by primitive recursion can be interpreted as a for loop with an accumulator variable initialized at , at each following iteration adding to the accumulator, running for a total of times. (The first iteration where is initialized is interpreted as , so the loop adds one to a total of times, computing in the end.)

Primitive recursion for partials: for partial functions , , the function defined by primitive recursion from and is given by

Just means that when working with partials we need to take care of convergence.

Here is the last rule, called minimization.

  • Let , . Define by

    If , we’ll put . Notation: .

    We say that is defined from by minimization.

    In the partial case, for , define by

Equivalently, is recursive iff it can be defined from , , , using finitely many applications of substitution, primitive recursion, and minimization.

Non-mathematical claim: recursive functions are effectively calculable. If you believe in the Church-Turing Thesis, then recursive functions are exactly the functions which can be computed by effective methods (e.g. Python-computation).

Note that it’s not clear that this is true yet! We should at least prove the equivalency of languages decidable by Turing machines and to convince ourselves.

Proof.

  1. Use primitive recursion:

  2. Use primitive recursion:

    Check: . Then and if then already bottoms out at 0.

⁠ 

Proof.

  1. Use primitive recursion,
  1. Similar.

⁠ 

Recursive relations

Note is always total.

Proof.

⁠ 

Proof.

  • .
  • .
  • .
  • .

⁠ 

Proof.

  • .
  • .
  • .
  • .
  • etc.

⁠ 

Proof.

⁠ 

Proof. . ⁠ 

Bounded quantification.

Proof.

  1. .
  2. .

⁠