MC 306 Theory of Computation Thursday, 112003 - PowerPoint PPT Presentation

1 / 7
About This Presentation
Title:

MC 306 Theory of Computation Thursday, 112003

Description:

Modify TM definition. More examples. Modular combinations of TMs. Reading: ... definition of ... decided to modify the definition of transition so that we ... – PowerPoint PPT presentation

Number of Views:29
Avg rating:3.0/5.0
Slides: 8
Provided by: skid
Category:

less

Transcript and Presenter's Notes

Title: MC 306 Theory of Computation Thursday, 112003


1
MC 306 Theory of ComputationThursday, 11/20/03
  • Last time
  • TM definitions, examples
  • Todays Class
  • Modify TM definition
  • More examples
  • Modular combinations of TMs
  • Reading 4.2
  • Exercises 4.5
  • New Hand-in 5
  • Due Tuesday, 12/2 at class time.

2
Modified definition of Turing Machine
  • To make it easier to design machines, and to use
    JFLAP, Ive decided to modify the definition of
    transition so that we read, write, and move (L,
    R, S) on each move. Hence a transition is a
    5-tuple
  • (q0, x), (q1, y, m) , where q0 and q1 are
    states, x and y are tape symbols, and m L, R,
    or S (meaning move left, move right, or stay,
    respectively).
  • Lets call this modified definition, Definition
    2

3
Modified definition of language decider
  • Also to make things easier, lets say that a
    Turing machine is a language decider if H qY,
    qN. The Turing machine always halts on any
    input. It halts in qY if and only if it accepts
    the string otherwise it halts in qN.
  • This is easier than writing 1 or 0 on the
    tape, but equivalent (if a TM can be designed to
    accept one way, then it can be modified to accept
    the other way).
  • Do remaining example from slide 8, 11/13/03.

4
TMs as transducers
  • Let f(x) be a function defined on the input
    alphabet ?0, and suppose f(?) ?, where ?
    x1xm, and ? y1yn. A Turing machine computes
    the function f(x) if for every ?,
  • (q0, ?) (q0, x1xm) ? (qf, y1yn) (qf, ?).
    (qf, f(? )),
  • Here q0 is the start state, qf is a final state,
    and the read/write head begins and ends on the
    first square of the tape.
  • We call f a Turing-computable function.
  • Example With ?0 1, design a TM that computes
    f(x,y) xy. Initial input is x, then ?, then y.
    E.g. f(111?11) 11111.

5
Modular TM design
  • We can combine TMs by adding meta-transitions
    that go from a final state of one machine to a
    start state of another
  • Permits branching and looping constructions
  • Permits function calls

6
Atomic machines and simple combinations (from
text)
  • Atomic machines
  • x Write an x
  • L, R Move left (right) one square
  • Some simple combinations
  • Read x, write y
  • On non-blank a, moveright and write a
  • R? Find first blank to rightAlso L? L? R?

7
Examples
  • From text ShL Shift left machine
  • Design a Shift right machine, using machines on
    previous page.
Write a Comment
User Comments (0)
About PowerShow.com