| ||||||||||||||
| ||||||||||||||
|
||||||||||||||
|
We will be looking at Turing Machine from a much more theoretical point of view. This essay will assume you have basic knowledge of computational theory - i.e., (non-)deterministic finite automata, regular expressions, and simple set theory.
Turing Machines: The DefinitionIn general, while computer scientists like to look at TMs from the perspective of input and output, we will look at them from a more theoretical perspective - input is put in, and the TM outputs "yes" or "no" depending on whether it accepts the input or not. Incidentally, all computations can be reduced to this sort of scenario. With this in mind, Turing Machines can be represented using a 7-tuple:
Visualizing Turing MachinesA Turing Machine can be represented as a deterministic finite automaton. For example, below is an NFA representation of a Turing Machine that accepts the regular expression 'aba*'. Note that for x/y, z x is the input symbol, y is the output symbol, and z is movement of the tape. Additionally, in the diagram, B implies a blank and S implies no movement of the tape.
Enumerating Turing MachinesThere are many ways to encode a Turing Machine, only one of which will be covered here. Assume that the TM (T) the tape alphabet consists of {0, 1, B} where B is the Blank symbol. Rename all states in the TM as q1...qk, the tape alphabet as X1...Xm, tape directions as D1 (left) and D2 (right).Now, for each transition rule in the TM, we redefine it as:
01000100100010 001010001010 0001001000010010 000010100001010 00001000100000100010To simplify things, for the final transition rule, the Stop symbol has been replaced by a Left, for purposes of encoding since it doesn't affect the outcome of the Turing Machine. Finally, we can sort the encoded transition rules. Encoding is intuitively done; if the length of x is shorter than y, x is less than y. Failing that, x is less than y, is the first differing symbol in x is a 0. Now, sorting our rules gives us: 001010001010 01000100100010 000010100001010 0001001000010010 00001000100000100010One way of enumerating TMs from this point, is to append all rule transitions together, and calculate the binary value. Doing this for our TM, makes it the 23,990,643,778,458,216,335,394th in our encoding scheme! ...and why?Probably the question on your mind at this point is quite why we want to be doing this. Encoding TMs like this allows them to be decoded and run using a Universal Turing Machine. This will hopefully be discussed in a later article.
Submitted: 10/04/2003 Article content copyright © James Matthews, 2003.
|
|
|||||||||||||
All content copyright © 1998-2007, Generation5 unless otherwise noted.
- Privacy Policy - Legal - Terms of Use -