Turing Machines - PowerPoint PPT Presentation

1 / 12
About This Presentation
Title:

Turing Machines

Description:

A Turing machine T = (S, I, f, s0) consists of a finite set of states S, and ... that can be solved in polynomial time by nondeterministic Turing machine. ... – PowerPoint PPT presentation

Number of Views:30
Avg rating:3.0/5.0
Slides: 13
Provided by: isabellebi
Category:

less

Transcript and Presenter's Notes

Title: Turing Machines


1
Turing Machines
2
Learning Objectives
  • Understand what are Turing machines.
  • Understand how to use Turing machines to
    recognize sets, compute functions.
  • Understand what are computational complexity,
    computability, and decidability.

3
Turing Machines
  • A Turing machine T (S, I, f, s0) consists of a
    finite set of states S, and alphabet I containing
    the blank symbol B, a partial function f from S x
    I to S x I x R, L, and a starting state s0,
    where R represents right direction, and L
    represents left direction.
  • When f(s, x) is defined, it is a unique triple
    (s, x, d)f(x, s) ? (s, x, d).
  • Transition rule five-tuple (s, x, s, x, d).

4
Turing Machines
  • Control unit loop
  • Start at leftmost nonblank cell.
  • Read current tape symbol x.
  • If f(x, s) is defined, then
  • Enter state s.
  • Write symbol x in current cell, erasing x.
  • Move right or left one cell depending on d.
  • If f(x,s) is not defined, then Halt.

5
  • (s0, 0, s0, 0, R)
  • (s0, 1, s1, 1, R)
  • (s0, B, s3, B, R)
  • (s1, 0, s0, 0, R)
  • (s1, 1, s2, 0, L)
  • (s1, B, s3, B, R)
  • (s2, 1, s3, 0, R)

6
Turing Machines for Sets
  • Turing machines can be built to recognize sets.
  • If V is a subset of an alphabet UI, a Turing
    machine T (S, I, f, s0) recognizes a string x
    in V if and only if T, staring in the initial
    position when x is written on the tape, halts in
    a final state.
  • The machine can recognize a set iff it recognizes
    the strings in the set
  • The machine does not recognize the set if it does
    not halt or does not halt in a final state.
  • Examples Turing Machine to recognize the set
    0 U 1. Turing Machine to recognize the
    set (0 U 1) 1.
  • Turing Machine to recognize the set (0 U 1) 1
    (0 U 1) .

7
Turing Machines for Functions
  • Turing machines can be used to compute functions
    computer that calculates partial functions.
  • T(x) y - Turing machine that, given string x
    as input, halts with string y on tape.
  • For integer functions, we need to define Turing
    machines on k-tuples of integers.
  • Unary representation of integers
  • Integer n ? 11111 (n1 times), 0 ? 1
  • k-tuple (n1, n2, , nk) ? (n11) 1s

    (n2 1) 1s


    (nk 1) 1s
  • Example (2, 0, 1, 3) ?

1111111111
8
Turing Machines for Functions
  • Example Turing machine for adding two
    nonnegative integers
  • Different types of Turing machines
  • Move at each step, or not at all.
  • Operate on multiple tapes.
  • Multiple heads.
  • Non deterministic multiple (x, s)

9
The Church-Turing Thesis
  • Church-Turing Thesisfor any problem that can be
    solved with an effective algorithm, there is a
    Turing machine that can solve this problem.
  • Effectively solvable that can be solved using a
    computer with a program written in any language,
    eventually using an unlimited amount of memory.

10
Computational Complexity, Computability,
Decidability
  • Computational complexity can be expressed in
    varied ways, and through a Turing machine.
  • A decision problem asks whether statements from a
    particular class of statements are true
    (yes-or-no problems).
  • Example is n prime?Recognize the language
    corresponding to the input values for which the
    answer to the problem is yes.
  • Decidable / solvable problem one for which there
    is an effective algorithm that decides whether
    instances of this problem are true.
  • Otherwise undecidable / unsolvable problem.

11
Computational Complexity, Computability,
Decidability
  • The halting problem is the decision problem that
    asks whether a Turing machine T eventually halts
    when given an input string x
  • The halting problem is an unsolvable decision
    problem no Turing machine exists that, when
    given an encoding of a Turing machine T and its
    input string x as input, can determine whether T
    eventually halts when started with x written on
    its tape.

12
Computational Complexity, Computability,
Decidability
  • Computability a function that can be computed by
    a Turing machine is called computable.
  • Otherwise uncomputable.
  • Class P class of polynomial-time problems
    problems that can be solved by a deterministic
    Turing machine in polynomial time in terms of the
    size of its input.
  • Class NP class of problems that can be solved
    in polynomial time by nondeterministic Turing
    machine.
  • Problems P ? tractable (Ex prime number
    determination).
  • Problems NP ? intractable (Ex Hamilton circuit
    in graph determination).
  • All problem in P is on NP, but we do not know
    about the reverse order
Write a Comment
User Comments (0)
About PowerShow.com