Turing machine was proposed by Alan Turing in 1936.
Used as automata in computational issues:
A Turing machine can:
A Turing machine is defined by:
Where:
Transition function defines actions of :
The machine stops when it enters a halting(final) state.
The machine leaves the result in the tape.
If the transition function is not carefully designed, the machine may loop forever.
Recognition process of an input string:
Definition: A language is recursive, if it is decidable by some Turing machine.
A PDA can always be simulated by using a Turing machine, so context free language is a proper subset of recursive language class.
Definition: A language is recursively enumerable, if it is semi-decidable by some Turing machine.
Recursively Enumerable > Recursive
A language is semi-decidable by Turing machine if:
Compared with decidable carefully, "Decidable" means that Turning machine always halt in y or n state; "Semi-decidable" means halting or loop-forever.
Theorem: Recursive language class is a proper subset of recursively enumerable language class.
Because decidability is a proper subset of semi-decidability,所以說 Semi-decidable 會比 Decidable 強大。
Turing machines can be used to compute (numerical) functions.
Definition: Functions which are directly computable by using Turing machine.
Key basic functions ( and are binary number):
A function which is computable by Turing machine is called by a recursive function.
Turing machine can compute functions of parameters.
Function classes:
Definition: If the transition functions is replaced by a transition relation, the Turing machine becomes a non-deterministic Turing machine.
A NTM may:
If the language is decidable by an non-determinsitc Turing machine , then is still a recursive language.
If the language is semi-decidable by an non-determinsitc Turing machine , then is still a recursively enumerable language.
Definition: For each configuration, a deterministic Turing machine has exactly only one operation to perform.
Theorem: Every DTM is an NTM.
Non-deterministic Turing machine can be converted into deterministic Turing machines.
非常重要!!!
In the aspect of computational power:
non-deterministic Turing machines = deterministic Turing machines.
Theorem: Every DTM is an NTM.
Theoerm: Non-deterministic Turing machines can be converted into deterministic Turing machines.
Conclusion:
We can add the following facilities to a Turing machines:
These extensions may increase the efficiency of Turing machine, However, none of these facilities will increase the power of Turning mahcines.
Turing machines are the ultimate computational devices.
Turing machines = algorithms.
Never be proved or denied.
Any Turing machine solvable problems can be solved by using modern computers.
Any Tuting machine sovlable problems can be solved by using algorithms.
If a problem is unsolvable by using Turing machine, it's unsolvable for modern computer either.
Therefore, no algorithm for solving such problem.
Define a Turing machine by using the mathematical model is inconvenient.
Understanding a Turing machine via its formal definition is not easy.
Design Turing machine by using machine schema.
A computational device which can simulate Turing machine is called Turing Equivalence or Turing Complete.
For finite automata, transition diagrams are easier to understand than formal models of finite automata, We can use a similar methodology to design Turing machine.
Design Turing machine by using the following method:
Use simple Turing machine as basic instruction, for example:
a
in the tape represented by the symbol 'a'.R a R: Means move right, write an 'a' and move right.
Conditional branches:
if encounter an a
move right:
Unconditional branches:
just jump to there, and move right:
until encountering a certain symbol:
: move left until encountering a '#'.
: move right until encounter a non-'#' symbol
Copy machine: copy the string in the input tape and stop at the '#' between the two strings.
We can use multiple tapes to keep the input, intermediate results, or results.
Multiple tapes simplify Turing machine design.
Use superscripts to indicate tape indices.
如果有一個 Function 可以被 Turing machine 計算,就稱之為 Recursive Functions。
Turing machines can be used to compute functions. However, not all functions are computable by Turing machines!
Computable functions are divided into 3 classes:
Theorem: a function is -recursive if and only if it is computable by Turing machines.
Partial recursive functions = Recursive functions > Primitive recursive,Primitive recursive 是 Recursive functions 的一種特例。
A k-ary function takes k arguments and produce one result.
Some functions are so basic that we can design Turing machine computing them directly.
More complicated functions can be defined by using functional operators.
Functional operators:
Definition: The primitive recursive function class includes:
A function can be not only numerical but also logical.
Definition: a primitive recursive function which return 1 or 0 is a primitive recursive predicate.
Definition: The partial recursive functions class includes:
Their definitions are very similar. However, only one non-terminal appears at the left hand sides of Context Free Grammar rules:
To derive a string:
Theorem: The languages generated by unrestricted grammars are recursively enumerable languages.
計算理論