You are on page 1of 22

Theory of Automata

Project Presentation
Turing Machine

 Group Members:

1. Khadija Shahid- 020


2. Malaika- 025
3. Noor ul Ain- 030
4. Tahreem Irfan- 047
Background(why Turing Machine)
 The Turing machine was invented in 1936 by Alan
Turing.

 Some languages could not be accepted by other finite


automaton. So Machines with an infinite memory,
which is not restricted to LIFO access were
introduced. Our most powerful model of a computer
is the Turing Machine. This is an finite automaton
with an infinite tape for storage.
Definition

Turing Machine is a mathematical model which


consists of infinite memory viewed as tape
divided into cells that can hold one character of
a tape alphabet.
Definition
 Components of Turing Machine:
1. An infinite tape divided into cells. Each cell contains
one symbol.
2. A head that accesses one cell at a time, and which can
both read from and write on the tape, and can move
both left and right.
3. A memory that is in one of a fixed finite number of
states.
B B a b a B B
Definition
 We can define TM as 7-tuple (Q, Σ, Γ, q0, δ , B , F)
where:
1. Q is set of states.
2. Σ is input alphabet.
3. Γ is tape alphabet (more than Σ).
4. q0 is initial state ( q0 ∈ Q )
5. δ is the transition function Q × Γ → Q × Γ × {L, R}.
6. B is the Blank Symbol. ( B ∈ Γ ) • F is the set of final states .
(F⊆Q)
Execution
 Initially, the input word is on the tape, the rest of the tape is filled with
“blank” symbols, the read head is on the leftmost cell of the tape.
 At each step, the machine:
Reads the symbol from the cell that is under the read head
Replaces this symbol as specified by the transition function
Moves the read head one cell to the left or to the right, as specified by the
transition function.
Changes state as described by the transition function.
 The input word is accepted as soon as an accepting state is reached.

B B a b a B B
Comparison with other Automaton
Finite Automata Pushdown Automata Turing Machine

It is a set of states with A pushdown automaton Turing machines represent a


transitions between the states (PDA) is a machine comprised universal model of
based on an input string from of a finite number of states computation. Turing Machine
some fixed alphabet. with the addition of a stack of (TM) consists of an infinitely
Drawbacks: It is to have unlimited size. long tape (possibly in both
finite amounts of memory so, Drawbacks: The stack on the directions), a read/write head
they can’t “remember” PDA, provides infinite storage that can read and write
previous states’ inputs. capacity, (LIFO). so, the lack symbols on the tape and move
Therefore, for languages that of any sort of random or direct left and right. The Turing
need to remember and access to the memory they machine accepts all the
compare such as this language cannot be context-free languages
L={a^(n) b^(n) :n≥0} cannot languages.
be accepted by a finite state
machine.
EXAMPLE 1
Turing Machine
Tape of TM
Example 1:
TM for n=3:
EXAMPLE 2
EXAMPLE 3
Turning Machine for:

 All palindromes
 Even palindromes
 Odd palindromes
Example 3

TM for language of even palindromes


TM for language of even palindromes
TM for language of even palindromes

You might also like