Lecture 08

Turing Machine

Definition A Turing Machine is a 7-tuple ($$Q, \Sigma, \Gamma, \delta, q_0, q_{acc}, q_{rej}$$), where

• $$Q$$ - finite set of states
• $$\Sigma$$ - input alphabet (does not contain $$\_$$)
• $$\Gamma\subseteq\Sigma\cup \{\_\}$$ - tape alphabet
• $$\delta$$: $$Q\times\Gamma\rightarrow Q\times\Gamma\times\{L,R\}$$
• $$q_0$$ - initial state
• $$q_{acc}$$ - accepting state/halting state
• $$q_{rej}$$ - rejecting state/halting state

Definition A configuration of a Turing Machine is a pair ($$q,w$$) where $$q\in Q$$ is the current state and $$w\in (\Gamma\cup\bar{\Gamma})^*$$ such that $$\bar{\Gamma}=\{\hat{\alpha}:\alpha\in\Gamma\}$$ and $$w$$ contains exactly one character from $$\bar{\Gamma}$$.

Definition A configuration is a triple ($$q,w,m$$) where $$q\in Q$$, $$w\in\Gamma^*$$, $$m\in\mathbb{Z}$$.

Definition A configuration is a string $$w\in(\Gamma\cup Q)^*$$ that contains exactly one value from $$Q$$.

Definition The configuration ($$q,w$$) yields the configuration ($$q',w'$$) in the Turing Machine $$M$$ if $$w=xa\hat{b}cy$$ for some strings $$x,y\in\Gamma^*$$, $$a,b,c\in\Gamma$$ and $$q\not\in\{q_{acc}, q_{rej}\}$$

1. $$w'=x\hat{a}dcy$$ where $$\delta(a,b)=(q',d,L)$$
2. $$w'=xad\hat{c}y$$ where $$\delta(a,b)=(q',d,R)$$

Definition The configuration $$(q,w)$$ derives $$(q',w')$$ ($$(q,w)\vdash(q',w')$$) if there is a sequence of configurations $$C_1,...,C_k,k\geq 0$$ such that $$(q,w)\vdash C_1\vdash...\vdash C_k\vdash(q',w')$$

Definition Turning Machine $$M$$ accepts $$x\in\Sigma^*$$ if $$(q_0, \bar{x})$$ derives $$(q_{acc}, y)$$ for some $$y\in(\Gamma\cup\bar{\Gamma})^*$$ where $$\bar{x}=\hat{a}x'$$ if $$x=ax'$$.

Definition Turning Machine $$M$$ rejects $$x\in\Sigma^*$$ if $$(q_0, \bar{x})$$ derives $$(q_{rej}, y)$$ for some $$y\in(\Gamma\cup\bar{\Gamma})^*$$ where $$\bar{x}=\hat{a}x'$$ if $$x=ax'$$.

Definition The Turning Machine $$M$$ halts on $$x\in\Sigma^*$$ if it accepts or rejects $$x$$.

Definition The Turing Machine decides the language $$L\subseteq\Sigma^*$$ if it accepts every $$x\in L$$ and rejects every $$x\in\Sigma^*-L$$.

Definition The Turing Machine recognizes $$L\subseteq\Sigma^*$$ if $$\{x\in\Sigma^*:M$$ accepts $$x\}$$.

Church-Turing Thesis

Thesis Every problem that can be solved by any kind of algorithm corresponds to a decidable language.

E.g. Design a Turing Machine that decides $$L=\{x\#x:x\in\{0,1\}\}$$

E.g. What does this Turing Machine do on empty input (Busy beaver 3-state) 