Skip to content
The Lumenary

Practice · Advanced undergraduate

Computability

Computability

Warm-upHuman

The one-state binary incrementer of the lesson starts on the least significant bit of 1011110111 (twenty-three). How many steps does it take before it halts?

Computability

Warm-upHuman

A Turing machine has 33 states and the two symbols 0,10, 1. Each of its 3×2=63 \times 2 = 6 table entries chooses a symbol to write, a direction (L or R) and a next state, which is one of the 33 states or halt. How many different tables are there?

Computability

CoreHuman

Which of these sets are recursively enumerable? (Select all that apply.)

Choose all that apply

Computability

CoreHuman

In the proof that KK is undecidable we assumed a machine computing the total function hh. Suppose instead we only had a semi-decider ss for KK: it halts with output 11 when φe(e) ⁣↓\varphi_e(e)\!\downarrow and runs forever otherwise. Build DD as before (on input xx: run s(x)s(x); if it outputs 11, loop forever; otherwise halt). What happens?

Choose one

Computability

CoreHuman

You want to prove that a new set BB is undecidable, using the undecidability of KK. Which do you need to show?

Choose one

Computability

StretchHuman

For which of these properties of an index ee does Rice's theorem show that the set of ee with the property is undecidable? (Select all that apply.)

Choose all that apply

Computability

CoreFormal

In Mathlib, c.eval n is the (partial) result of running program c : Nat.Partrec.Code on input n, and (c.eval n).Dom says that it halts. Which Lean statement says that halting on input n is undecidable?

Choose one

Computability

CoreComputational

Write run(machine, max_steps) that simulates a two-symbol Turing machine started in state 0 on a blank tape. machine is a dict mapping (state, symbol) to (write, move, next_state), with move in (-1, 1) and next_state equal to None for halt. Return ("halt", steps, ones) if it halts within max_steps steps (counting the halting step) and ("running", max_steps, ones) otherwise, where ones is the number of 1s on the tape at that moment.

Runs entirely in your browser, in an isolated worker. Nothing is sent to a server.

Computability

StretchHuman

We want to prove for all n≥0n \ge 0 that the incrementer, started on the binary expansion of nn with the head on the last bit, halts with n+1n + 1 on the tape after t(n)+1t(n) + 1 steps, where t(n)t(n) is the number of trailing 11s. Which induction works?

Choose one