TURING MACHINES AND COMPLEXITY By Mr.Neelamani Samal
INTRODUCING TURING MACHINES Introduced by Alan Turing in 1936. A simple mathematical model of a computer. Models the computing capability of a computer.
THE TURING MACHINE MODEL a 1 a 2 … a i … a n B B … Finite control
  T uring Machine is represented by-   M=(Q,  ,τ,δ,q0,B,F), Where Q   is the finite state of states    a set of τ not including B, is the set of input symbols, τ  is the finite state of allowable tape symbols, δ  is the next move function, a mapping from  Q × τ to Q × τ  ×{L,R} Q 0   in Q is the start state, B  a symbol of  τ is the blank, F   is the set of final states.  Representation of Turing Machine
TYPES OF TURING MACHINES Two way infinite tape Multiple Turing Machines Nondeterministic Turing machines Multidimensional Turing machines Multihead Turing Machines Off-line Turing machines
SIMULATION Theorem- If L is accepted by a two dimensional TM M 2  L is accepted by a one dimensional TM M 1 *BBB a 1 BBB*BB a 2  a 3  a 4  a 5 B* a 6  a 7 a 8 a 9 B a 10 B* a 11  a 12  a 13 B a 14  a 15 *BB a 16  a 17  BBB** simulation of two dimensions by a)Two-dimensional tape b)One dimensional simulation B B B a 1 B B B B B a 2 a 3 a 4 a 5 B a 6 a 7 a 8 a 9 B a 10 B B a 11 a 12 a 13 B a 14 a 15 B B a 17 a 16 B B B
CHURCH’S HYPOTHESIS The assumption that the intuitive notion of  “computable function” can be identified with the class of partial recursive function is known as  church’s hypothesis  or the  church –Turing thesis   Example-Random Access Memory…..
… SIMULATION OF RAM BY TURING MACHINE Contd… Theorem- A Turing machine can simulate a RAM provided that the elementary RAM instructions can themselves be simulated by a TM. The tape looks like- #0*v 0 #1*v 1 #10*v 2 #………I*v i #…… Where v i  is the contents in binary, of the ith word.
Contd … COMPUTATIONAL COMPLEXITY   Some useful worst-case complexity classes: DTIME(t(n)):  languages accepted by a deterministic Turing Machine in time O(t(n)).  NTIME(t(n)):  languages accepted by a nondeterministic Turing Machine in time O(t(n)).  DSPACE(s(n)):  languages accepted by a deterministic Turing Machine in space O(s(n)).  NSPACE(s(n)):  languages accepted by a nondeterministic Turing Machine in space O(s(n)).
P:  union of DTIME(n c ) for all c. Consists of those problems whose worst-case solution time is bounded by some polynomial.  NP:  union of NTIME(n c ) for all c. Consists of problems for which a correct solution can be verified in worst-case time bounded by a polynomial.  PSPACE:  union of DSPACE(n c ) for all c. Consists of those problems whose worst-case solution space is bounded by some polynomial. COMPUTATIONAL COMPLEXITY contd.
RELATIONS AMONG COMPLEXITY MEASURES If L is in DTIME(f(n)), then L is in DSPACE(f(n)) If L is in DSPACE(f(n)) and f(n)>log 2 n, then there is some constant c depending on L such that L is in DTIME(c f(n) ). If L is in NTIME(f(n)), then there is some constant c depending on L, such that L is in DTIME(c f(n) ).
  TAPE COMPRESSION   Theorem- If L is accepted by S(n) space-bounded Turing machine with k storage tapes, then for any c>0, L is accepted by a cS(n) space bounded TM. Corollary- If L is in NSPACE(S(n)), then L is in NSPACE(cS(n)), where c is any constant greater than zero.
    LINEAR SPEED UP   Theorem- If L is accepted by a k-tape T(n) time bounded Turing machine M 1 , then L is accepted by a k-tape cT(n) time-bounded TM M 2  for any c>0, provided that k>1 and inf n->∞ T(n)/ n->∞. Corollary-  If inf n->∞ T(n)/ n=∞. And c>0, then DTIME(T(n))=DTIME(cT(n)).
    THE UNION THEOREM Theorem-   Let {f i (n)|i=1,2,.................} be a recursively enumerable collection of recursive functions. That is there is a TM that enumerates a list of TM’s, the first computing f 1  , the second computing f 2  and so on. Also assume that for each i and n, f i (n)<f i+1 (n). Then there exists a recursive S(n) such that DSPACE(S(n))=U i>1  DSPACE(f i (n)).
CONCLUSION The Turing Machine is the most comprehensive, deep, and accessible model of computation extant, and its associated theories allow many ideas involving &quot;complexity&quot; to be profitably discussed.
THANK YOU !!

Turing machine

  • 1.
    TURING MACHINES ANDCOMPLEXITY By Mr.Neelamani Samal
  • 2.
    INTRODUCING TURING MACHINESIntroduced by Alan Turing in 1936. A simple mathematical model of a computer. Models the computing capability of a computer.
  • 3.
    THE TURING MACHINEMODEL a 1 a 2 … a i … a n B B … Finite control
  • 4.
    Turing Machine is represented by- M=(Q,  ,τ,δ,q0,B,F), Where Q is the finite state of states  a set of τ not including B, is the set of input symbols, τ is the finite state of allowable tape symbols, δ is the next move function, a mapping from Q × τ to Q × τ ×{L,R} Q 0 in Q is the start state, B a symbol of τ is the blank, F is the set of final states. Representation of Turing Machine
  • 5.
    TYPES OF TURINGMACHINES Two way infinite tape Multiple Turing Machines Nondeterministic Turing machines Multidimensional Turing machines Multihead Turing Machines Off-line Turing machines
  • 6.
    SIMULATION Theorem- IfL is accepted by a two dimensional TM M 2 L is accepted by a one dimensional TM M 1 *BBB a 1 BBB*BB a 2 a 3 a 4 a 5 B* a 6 a 7 a 8 a 9 B a 10 B* a 11 a 12 a 13 B a 14 a 15 *BB a 16 a 17 BBB** simulation of two dimensions by a)Two-dimensional tape b)One dimensional simulation B B B a 1 B B B B B a 2 a 3 a 4 a 5 B a 6 a 7 a 8 a 9 B a 10 B B a 11 a 12 a 13 B a 14 a 15 B B a 17 a 16 B B B
  • 7.
    CHURCH’S HYPOTHESIS Theassumption that the intuitive notion of “computable function” can be identified with the class of partial recursive function is known as church’s hypothesis or the church –Turing thesis Example-Random Access Memory…..
  • 8.
    … SIMULATION OFRAM BY TURING MACHINE Contd… Theorem- A Turing machine can simulate a RAM provided that the elementary RAM instructions can themselves be simulated by a TM. The tape looks like- #0*v 0 #1*v 1 #10*v 2 #………I*v i #…… Where v i is the contents in binary, of the ith word.
  • 9.
    Contd … COMPUTATIONALCOMPLEXITY Some useful worst-case complexity classes: DTIME(t(n)): languages accepted by a deterministic Turing Machine in time O(t(n)). NTIME(t(n)): languages accepted by a nondeterministic Turing Machine in time O(t(n)). DSPACE(s(n)): languages accepted by a deterministic Turing Machine in space O(s(n)). NSPACE(s(n)): languages accepted by a nondeterministic Turing Machine in space O(s(n)).
  • 10.
    P: unionof DTIME(n c ) for all c. Consists of those problems whose worst-case solution time is bounded by some polynomial. NP: union of NTIME(n c ) for all c. Consists of problems for which a correct solution can be verified in worst-case time bounded by a polynomial. PSPACE: union of DSPACE(n c ) for all c. Consists of those problems whose worst-case solution space is bounded by some polynomial. COMPUTATIONAL COMPLEXITY contd.
  • 11.
    RELATIONS AMONG COMPLEXITYMEASURES If L is in DTIME(f(n)), then L is in DSPACE(f(n)) If L is in DSPACE(f(n)) and f(n)>log 2 n, then there is some constant c depending on L such that L is in DTIME(c f(n) ). If L is in NTIME(f(n)), then there is some constant c depending on L, such that L is in DTIME(c f(n) ).
  • 12.
      TAPE COMPRESSION Theorem- If L is accepted by S(n) space-bounded Turing machine with k storage tapes, then for any c>0, L is accepted by a cS(n) space bounded TM. Corollary- If L is in NSPACE(S(n)), then L is in NSPACE(cS(n)), where c is any constant greater than zero.
  • 13.
        LINEARSPEED UP Theorem- If L is accepted by a k-tape T(n) time bounded Turing machine M 1 , then L is accepted by a k-tape cT(n) time-bounded TM M 2 for any c>0, provided that k>1 and inf n->∞ T(n)/ n->∞. Corollary- If inf n->∞ T(n)/ n=∞. And c>0, then DTIME(T(n))=DTIME(cT(n)).
  • 14.
        THEUNION THEOREM Theorem- Let {f i (n)|i=1,2,.................} be a recursively enumerable collection of recursive functions. That is there is a TM that enumerates a list of TM’s, the first computing f 1 , the second computing f 2 and so on. Also assume that for each i and n, f i (n)<f i+1 (n). Then there exists a recursive S(n) such that DSPACE(S(n))=U i>1 DSPACE(f i (n)).
  • 15.
    CONCLUSION The TuringMachine is the most comprehensive, deep, and accessible model of computation extant, and its associated theories allow many ideas involving &quot;complexity&quot; to be profitably discussed.
  • 16.