Computability and Complexity - PowerPoint PPT Presentation

About This Presentation
Title:

Computability and Complexity

Description:

At each step of operation machine is in one of the states, say q (initially ... To execute one step, the machine looks up the value of a transition function (q, ... – PowerPoint PPT presentation

Number of Views:71
Avg rating:3.0/5.0
Slides: 26
Provided by: computingl
Category:

less

Transcript and Presenter's Notes

Title: Computability and Complexity


1
Computability and Complexity
3-1
Computability and Complexity Andrei Bulatov
2
Computability and Complexity
3-2
What is a computation?
Alan Turing considered this question in 1936 He
argued that any computation can be done using
the following steps
  • Concentrate on one part of the problem
    (for
    example, one piece of paper, one arithmetic
    operation, etc.)
  • Depending on this, and present state of the
    computer
  • - Modify this part of problem
  • - Move to another part of problem
  • - Change into a new state.
  • Repeat this until finished.

3
Computability and Complexity
3-3
Implications
  • If the computation can be described in a finite
    space, then there can
  • can be only a finite number of different
    situations to deal with
  • Therefore, there can be only a finite number of
    states and a
  • finite number of symbols.
  • But note that the computation might continue
    forever and never
  • finish, and it might use (potentially)
    infinite storage space

4
Computability and Complexity
3-4
The Turing Machine
5
Computability and Complexity
3-5
Turing Machine Configuration
Tape contains a sequence (infinite to the
right) of symbols from an alphabet
? almost all of the members of this sequence
(except for a finite number) are the
blank symbol ? At the first step it
contains the input, i.e. the non-blank
symbols on the tape constitutes the input
Head reads one cell (one symbol on the tape)
at the first step it reads the leftmost
symbol on the tape
6
Computability and Complexity
3-6
Turing Machine Operation
  • At each step of operation machine is in one of
    the states, say q (initially state is )
  • The machine is reading one symbol on tape, say s
  • To execute one step, the machine looks up the
    value of a transition function ?(q,s), which is,
    say, (q,s,m)
  • The machine
  • changes to state q
  • overwrites the symbol s with
    s
  • moves the head along the tape
    according to m
  • (RRight, LLeft,
    SStatic).
  • Execution stops when a final state is reached

7
Computability and Complexity
3-7
Turing Machine Definition
Definition A Turing Machine is a 6-tuple
where
  • Q is a finite set of states
  • ? is the input alphabet not containing the
    blank symbol ?
  • ? is the tape alphabet, where ?? ? and ? ?
    ?
  • ? is a transition function
  • is the initial state
  • F ? Q is a set of final states

8
Computability and Complexity
3-8
Question
What do the following machines do?
9
Computability and Complexity
3-9
TM Example
10
Computability and Complexity
3-10
TM Example
11
Computability and Complexity
3-11
TM Diagram
e
??S
0?01LS
c
a
10L
0?R
1?R
?0S
?1S
11R
01R
b
d
00R
10R
12
Computability and Complexity
3-12
Configurations
Computation a (possibly infinite) sequence
of configurations entered by a TM
beginning with an initial configuration
13
Computability and Complexity
3-13
Acceptors and Transducers
Acceptor machines have 2 final states
  • Accept ( )
  • Reject ( )

These machines can be used to solve decision
problems input x is accepted by T if T(x)
is finite and ends in the Accept state.
Language accepted set of inputs accepted by
T, denoted by L(T)
14
Computability and Complexity
3-14
A?
R?
15
Computability and Complexity
3-15
Transducer T computes (partial) function
f if computation T(x) halts in
a final state with f(x) on the output tape
16
Computability and Complexity
3-16
O
U
T
P
U
T
H?
17
Computability and Complexity
3-17
Turings Thesis
(Also called Churchs Hypothesis, Sequential
Computing Hypothesis)
18
Computability and Complexity
3-18
k-tape TM
Transition function
Initial configuration
  • the first tape contains an input
  • the other tapes contain only blank symbols

19
Computability and Complexity
3-19
Nondeterministic TM
We can relax the definition of a TM to allow more
than one possible transition for any pair ?q,s?
of state and symbol
This gives a nondeterministic TM (i.e. it has a
choice of actions)
Nondeterministic computation a
tree of possible configurations resulting from a
start configuration For machine NT and
input x this is denoted NT(x)
20
Computability and Complexity
3-20
Nondeterministic Acceptor
Computation path is any path (finite or
infinite) from the root of NT(x)
Accepting computation is a finite computation
path ending in the Accept state
Language accepted is the set of inputs x
having some accepting computation in
NT(x), denoted L(NT).
21
Computability and Complexity
3-21
Time
R
R
R
R
R
A
R
22
Computability and Complexity
3-22
Random Access Machines
Another model of computation is the Random
Access Machine, which has
  • an infinite series of memory locations,
  • where each can contain an arbitrary
    integer
  • a processor which can perform basic
    operations, including
  • addition, subtraction, integer division by 2,
    indirect addressing,
  • conditional goto, and halt
  • a finite program specifying a sequence of
    basic operations
  • involving the contents of memory locations

23
Computability and Complexity
3-23
  • READ 1
  • STORE 1
  • STORE 5
  • READ 2
  • STORE 2
  • HALF
  • STORE 3
  • ADD 3
  • SUB 2
  • JZERO 14
  • LOAD 4
  • ADD 5
  • STORE 4
  • LOAD 5
  • ADD 5
  • STORE 5
  • LOAD 3
  • JZERO 20
  • JUMP 5

1
3556
2
21
3
4
5
6
7
8
9
H?
24
Computability and Complexity
3-24
Simulations
The following machines can all be simulated by a
TM with one tape and alphabet 0,1
  • TMs with tape infinite in both directions
  • TMs with more than one tape
  • TMs with 2-dimensional tape (or more!)
  • TMs with several read/write heads on each tape
  • Nondeterministic TMs
  • RAM Machines

25
Computability and Complexity
3-25
Other Models
The following people also proposed models of
general computation
  • Post (1936) Posts normal systems
  • Kleene (1936) recursive functions
  • Church (1941) lambda calculus
  • Markov (1954) Markovs rewriting systems

All of these have been shown to be equivalent to
Turing Machines
see Machine Models and Simulations in
the Handbook of Theoretical Computer Science,
MIT Press, 1990
Write a Comment
User Comments (0)
About PowerShow.com