1. Presentation By:
Name: Shamim Ahammad Rasel
ID: 1805033
Session: 2018
Begum Rokeya University, Rangpur
Department of Computer Science & Engineering
Faculty of Engineering & Technology
Presented To:
Prodip Kumar Sarkar,
Associate Professor,
Department of Computer Science & Engineering
Begum Rokeya University, Rangpur
Course Title: Theory of Computation and Automata
3. Introduction
Two-way finite automata is similar to finite automata, except that it can read the input in either
direction left-to-right or right-or-left.
The 2FA machines have a read head that can move in any direction from the current position to
either left or right according to state transition function.
5. Formal Definition of Two way DFA
A two way deterministic finite automaton can be defined by 8-tuple.
M = (Q, ∑, ꜔, ˧, R, δ, s, t, r) where,
Q : Finite set of non empty states
∑ : Finite non empty set of input symbols
꜔: ꜔is left endmarker
˧ : ˧ is right endmarker
δ : Q X ( ∑ ⋃ {L, R}) ➙ Q X {left, right}
s : s 𝝐 Q is the start state
t : t 𝝐 Q is the accept state
r : r 𝝐 Q is the reject state, where r ≠ t
6. An Example of 2DFA
Consider a 2DFA M that behaves as follows starting in state q₀, M repeats a cycle of moves wherein the
tape head moves right until two ones have been countered then left until encountering a zero at which
point state q₀ is re-entered and the cycle repeated. More precisely M has three states all of which are
final state, δ is given as follows:
0 1
q₀ (q₀, R) (q₁, R)
q₁ (q₁, R) (q₂, L)
q₂ (q₀, R) (q₂, L)
7. An Example of 2DFA
Here, we can define 8 tuple as
Q = {q₀, q₁, q₂}
∑ = {0 , 1}
꜔, ˧ are left endmarker and right endmarker respectively
s = q₀
t = q₁
r = q₂
And state transition defined as given table
8. An Example of 2DFA
Input string is 101001
꜔ 1 0 1 0 0 1 ˧
꜔ 1 0 1 0 0 1 ˧
q₀
q₁
13. Conclusion
As we can notice the two way finite automata can read input in either right or left side so the automaton
is not same as 1DFA and automaton is like Turing machine but in read only manner so we can say that
The Two way finite automata works like read only Turing Machine.