CS605%20 - PowerPoint PPT Presentation

About This Presentation
Title:

CS605%20

Description:

The computation of a nondeterministic TM is a tree whose branches correspond to ... If some branch of the computation leads to an accept state the machine ... – PowerPoint PPT presentation

Number of Views:25
Avg rating:3.0/5.0
Slides: 14
Provided by: scienc
Category:
Tags: branches | cs605 | of | science

less

Transcript and Presenter's Notes

Title: CS605%20


1
CS605 The Mathematics and Theory of Computer
Science
  • Turing Machines

2
Equivalence
  • In order that we show that two models are
    equivalent we simply need to show that we can
    simulate one by the other.

3
Multitape TMs
  • A multitape TM is like an ordinary TM with
    several tapes each with its own head for reading
    and writing.
  • Initially the input appears on one tape with all
    the others blank.
  • The transition function is changed to allow for
    reading, writing and moving the heads on some or
    all of the tapes simultaneously.

4
Multitape TMs
  • Formally this transition is
  • d Q Gk ? Q G k L,R,Sk where k is the
    number of tapes.
  • d(qi, a1, , ak) (qj, b1, , bk, L, R, , L)
    means that, if the machine is in state qi and
    heads 1 through k are reading symbols a1 through
    ak, the machine goes to state qj, writes symbols
    b1 through bk, and directs each head to move
    Left, Right or Stay Put.

5
Multitape TMs
  • Multitape TMs are equivalent (recognise the same
    language) in power to ordinary TMs.
  • Every multitape TM has an equivalent single-tape
    TM.
  • Proof?

6
Turing- Recognisable
  • A language is Turing-Recognisable if and only if
    some multitape TM recognises it.
  • We stated previously that A language is Turing
    Recognisable if some Turing Machine recognises
    it.
  • This new definition does not go against this as a
    multitape TM can be simulated by an ordinary TM.

7
Nondeterministic Turing Machines
  • A nondeterministic TM is a generalisation of the
    standard TM for which every configuration may
    yield none, or one or more than one next
    configurations.
  • In contrast to a deterministic TM, for which a
    computation is a sequence of configurations, a
    computation of a nondeterministic TM is a tree of
    configurations that can be reached from the start
    configuration.

8
Nondeterministic Turing Machines
  • The transition function for a nondeterministic TM
    has the form
  • d Q G ? P(Q G L,R)
  • where P refers to the power set.
  • The computation of a nondeterministic TM is a
    tree whose branches correspond to different
    possibilities for the machine.
  • If some branch of the computation leads to an
    accept state the machine accepts the input.

9
Nondeterministic Turing Machines
  • An input to a NTM is said to be accepted if there
    exists at least one node of the computation tree
    which is an accept-configuration.
  • The path from the root to the accept-configuration
    is said to be non-deterministically selected.
  • A NTM is called a decider if all branches halt on
    all inputs.

10
Nondeterministic Turing Machines
  • Every nondeterministic TM has an equivalent
    deterministic TM.

11
Do TM always halt?
  • When can a machine not halt? There are a number
    of possibilities
  • The machine stops, but not in the halt state. We
    call this a crash.
  • No transition is specified for the current state
    and tape symbol this is also a crash.
  • The machine enters an infinite loop, and so never
    gets out of this to reach a halt state.

12
Implications of Non-Halting
  • The first sounds ominous, but it is ok. When
    machine crashes we know input was invalid.
  • The second is to be expected when we design the
    machines we dont have to specify all the
    transitions the ones we dont specify should
    naturally lead to the error state, i.e. crash.
  • The third is far more serious If the machine
    enters an infinite loop, the user is left waiting
    for an answer. As time goes on they are wondering
    Should I turn the machine odd? or If I leave
    it running maybe it will stop in the next few
    minutes. This issue is non-trivial

13
Implications of Non-Halting
  • This problem is referred to as the Halting
    Problem and we will look at it soon
Write a Comment
User Comments (0)
About PowerShow.com