Lecture 004

Ada's Lecture

Computation Intuition: finite answer to infinite number of question.

Regular Language, TM-decidable

Regular Language, TM-decidable
\text{Regular Languages} \in \text{Computable}

Turing Machine

Totally Minimal (TM): programming Language

Turing Machine:

Example of a Turing Machine in Pseudocode

switch (LETTER)
  case 'a': write 'b'; move LEFT;  GOTO STATE 2;
  case 'b': write ' '; move RIGHT; GOTO STATE 0;
  case ' ': write 'b'; move LEFT;  GOTO STATE 1;

Formal Definition of Turing Machine: M = (Q, \Sigma, \Gamma, \delta, q_0, q_{acc}, q_{rej})


DFA limitation:

TM limitation:

// TODO: Exercise (Practice with configurations) // WARNING: you must do this

Language Accepted: \mathbb{L}(M) is the set of all strings that TM M accepts (not necessarily a decider).

Language Decides: TM (must be a decider) M decides L \subseteq \Sigma^* if (\forall w \in L \land M \text{ accepts } w) \lor (\forall w \notin L \land M \text{ rejects } w)

Decider: a TM that halts on all inputs

Decidable Language: if a L is decidable, then \exists M such that L = \mathbb{L}(M) where M is a decider TM

// TODO: Exercise (A simple decidable language) // TODO: Exercise (Drawing TM state diagrams)


Property of Turing Machine:

Theorem: any language can be computed in "Python, Java, C, etc..." can be decided by a TM.

Describe TM:

Church-Turing Thesis: TM is equivalent of a person doing calculation

Universal Machine: can simulate all other machines (a human is a universal machine) by feeding in both input and instructions since all machine can be encoded

def U(⟨TM M,string x⟩):

1. Simulate M on input x (𝚒.𝚎. run M(x))
2. If it accpets, accept.
3. If i𝚝 rejects, reject.

Note on actual TM:

Is Recursive Function

Is Recursive Function
Self-referencing: feed machine with its own code can create problem by code is data, leads to undecidability.

(Physical) Church-Turining Thesis: any computational problem that can be solved by any physical process, can be solved by a (probabilistic, or quantum) TM. (Not everybody agrees with this arguments)

Strong Physical Church-Turing Thesis: What can be computed efficiently in this universe by any physical process or device, can be computed efficiently by a TM (False)

Extended Physical Church-Turing Thesis: What can be computed efficiently in this universe by any physical process or device, can be computed efficiently by a Q(Quantum)M (True)

  1. Study TMs == Study computational limit of universe
  2. computational limit of universe is everywhere
  3. You can simulate universe in universe. The universe may be simulation.

Good Paper:

Conway's Game of Life: simplest Universe that caputures full computability

// QUESTION: if a machine has n state, how much bigger can another machine simulate this machine? (This is an insteresting question because we can determinate the maximum granularity of our universe if it is a simulation)

// QUESTION: is there physical bound to simulation so that we can detect if we are in simulation?


Languages related to encodings of DFAs: (all decidable)

// TODO: Exercise (Practice with decidability through reductions)

// TODO: Check Your Understanding

Sutner's Lecture

Turing Machine

Flaw in Primitive Recursive: no interpreter for primitive recursive functions can be primitive recursive

Turing Machine: good model close to register machines or random access machines

Busy Beaver Problems

Busy Beaver Problems

Busy Beaver Problems, n-states

Busy Beaver Problems, n-states
Busy Beaver Problems: single-digit number of states TM are very hard to analyze (https://mathworld.wolfram.com/BusyBeaver.html)

Turing Computability

Configuration (Instantaneous description, ID): a word ypx where x, y \in \Sigma^* and p \in Q

Turing Machine and P.R.

Convention: placing init and halt at left of all input/output:

Computable: partial function f : \Sigma^* \nrightarrow \Sigma^* is (Turing) computable if there is TM M computes f

Partial v.s. Total

Partial v.s. Total

(transducer) TM: partial recursive (computable) function decider (acceptors) TM: total recursive functions

Different Kinds of TM:

Semidecidable Set: A \subseteq \mathbb{N}^k is simidecidable if there is a TM M that halt precisely on all x \in A, and halt on all x \notin A.

Decidable Set: A \subseteq \mathbb{N} is decidable iff A and \mathbb{N} - A are both semidecidable. (parallel running two machines that are complement of each other)

// QUESTION: understand R.E. Recursive Enumerable (R.E.): if there is a partial TM computable function f: \mathbb{N} \nrightarrow \mathbb{N} such that A is the range of f (intuitively: output that can be generated by a TM, where TM continuously spit out elements A. formally: apply all possible n \in \mathbb{N} and the output will be A)

Convert between Recognition and Generation

Convert between Recognition and Generation

So semidecidable iff recursive enumerable. (prove using dovetailing: run infinitely many computations in parallel using stages)



Comparing partial function: function \alpha = \beta is both functions are defined on input x and \alpha(x) = \beta(x) or none of them are defined on x.

Define value of looping function: f(x) = \lim_{t \rightarrow \infty} f_t(x) where f_{t}(x) = \begin{cases} y \text{ if halt and output y}\\ \uparrow \text{ otherwise}\\ \end{cases}

Convert Semidecidable -> Recursively Enumerable

Convert Semidecidable -> Recursively Enumerable

Convert Recursively Enumerable -> Semidecidable

Convert Recursively Enumerable -> Semidecidable

Hilbert's Dream: a program spit out all math theorem:

  1. enumerate all possible formula (no problem)
  2. filter out actual proofs (need a decider for checking formula, but we don't have, since may loop)
  3. output filtered result

Table of Content