I'm just learning about Turing Machines, and I'm a bit confused by the difference in formal description between Wikipedia and my textbook.
My textbook says the following:
$$M=\langle Q,\Sigma,\Gamma,\delta,q_{0},q_{accept}, q_{reject} \rangle$$
where:
- $Q$ is the set of states,
- $\Sigma$ is the input alphabet not containing the blank symbol $\sqcup$,
- $\Gamma$ is the tape alphabet, where $\sqcup\in\Gamma$ and $\Sigma\subseteq\Gamma$,
- $\delta: Q\times\Gamma\to Q\times\Gamma\times\{L,R\}$ is the transition function,
- $q_0\in Q$ is the start state,
- $q_{accept},q_{reject}\in Q$ are the accepting and rejecting states, respectively, and $q_{accept}\neq q_{reject}$
While Wikipedia states
Hopcroft and Ullman (1979, p. 148) formally define a (one-tape) Turing machine as a 7-tuple $M= \langle Q, \Gamma, b, \Sigma, \delta, q_0, F \rangle$ where
- $Q$ is a finite, non-empty set of states
- $\Gamma$ is a finite, non-empty set of the tape alphabet/symbols
- $b \in \Gamma$ is the blank symbol (the only symbol allowed to occur on the tape infinitely often at any step during the computation)
- $\Sigma\subseteq\Gamma\setminus\{b\}$ is the set of input symbols
- $q_0 \in Q$ is the initial state
- $F \subseteq Q$ is the set of final or accepting states.
- $\delta: Q \setminus F \times \Gamma \rightarrow Q \times \Gamma \times \{L,R\}$ is a partial function called the transition function, where L is left shift, R is right shift. (A relatively uncommon variant allows "no shift", say N, as a third element of the latter set.)
There are obviously a few similarities, but there are a few differences as well. Namely the ordering of the items in the 7-tuple $M$. Also, my textbook has three entries for separate special states, and the Wikipedia entry has only two - My book doesn't have a special element just for the blank character.