Let T be a TM. Let Sigma be the input alphabet of T. let Gamma be the tape alphabet of T. We assume Sigma is a subset of Gamma, and that Gamma contains "_", the "blank." Let Q be the set of states of T. Let <0> be the start state of T. Let be the halt state of T. (Accept) We define a configuration of T to be a string of the form alpha q beta where q is a state of T, and alpha and beta are strings over Gamma, and beta has at least one symbol. (If the head is over a blank and there are no non-blank symbols to the right of the head, beta consists of a single blank.) The state is a halt configuration if q = . We write x |- y to mean that configuration x yields configuration y in one step. We say that M accepts a string w over Sigma if <0>w yields a halt configuration in any number of steps. We now define an unrestricted grammar G which generates L(M). The input terminal of G is Sigma. The grammar alphabet of G is Gamma + Q + {$} The start symbol of G is There are three kinds of productions of G: Starting productions: We have the production -> $$ and for each g in Gamma, we have productions -> g -> g Emulation productions: For each trasition rule of M, we have one emulation production of G. If the transition rule is a b R then the production is b -> a If the transition rule is a b L Ending productions: There is only one, namely $<0> -> emptystring