Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Informal def.
Alan Turing invented TM in 1936. A Turing machine is a theoretical device that manipulates symbols on a strip of tape according to a table of rules. Despite its simplicity, a Turing machine can be adapted to simulate the logic of any computer algo , and is particularly useful in explaining the functions of a CPU inside a computer. A model that can compute anything that a human can compute. Before invention of electronic computers the term computer actually referred to a person whos line of work is to calculate numerical quantities. Turings Thesis: Any algorithm can be carried out by one of his machines Turings machine is actually easily programmable, if you really get into it. Not practically useful.. Infinite storage coz tape is of infinite length.
TM model
Formal definition
A Turing Machine is a 7-tuple, M = (Q, , , , q0, B, F), where Q = Finite non-empty set of states. q0 = initial state F = set of Final states (if M ever enters a final state, M accepts its input) = input alphabet; B is blank. = tape alphabet; {B} : fxn mapping Q x Q y {D} where x,y:tape alphabets,D is direction L or R.
Working
If read 1, write 0, go right, repeat. If read 0, write 1, HALT!
1 1
0 0
0 0
TM
No
Representation of TM
By instantaneous descriptions By transition table By transition diagram
By TT
Consider M where Q ={ q1,q2,q3,q4,q5 } = { 0, 1,b } b = 0 = "blank" =see state-table q1= initial state q4= final state
P.S B Tape symbol 0 1
q1
q2 q3 q4 q5
1Lq2
BRq3
0Rq1
0Lq2 BRq4 1Lq2 BRq5 1Rq4
0Rq5 0Lq2
0Rq4
By TD
Let the move of TM: (q,a) = (q1,,R) (a, ,R)
q
q1
Language acceptabilty by TM
Let M=(Q, , , , q0, b, F). L(M) = {w /w * and q0w qf} Where , * When we start TM on an input, three outcomes are possible: 1. ACCEPT: TM accepts I/P if starting from initial state and halts on final state after reading last symbol of I/P string. 2. REJECT: TM rejects I/P if starting from initial state and halts on non- final state after reading last symbol of I/P string. 3. LOOP: if m/c does not Halt .