Two-way Deterministic Finite Automata

21,357 views 13 slides May 09, 2011
Slide 1
Slide 1 of 13
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13

About This Presentation

No description available for this slideshow.


Slide Content

T wo -way Deterministic Finite Automata Presented By: Hafsa Naseem (2DFA)

DFA Input is processed once from left to right. After an input has been read, the DFA decides whether the input is accepted or rejected. 2DFA C an read the input back and forth with no limit on how many times an input symbol can be read. As in the case of DFA, the 2DFA decides whether a given input is accepted or rejected.

Why not 2DFA? Are 2DFA unrealistic? Consumes more memory and time than DFA? Problems that can be solved by DFA cannot be solved by 2DFA? Complex to implement?

The concept of 2DFA was originated by Rabin and Scott in 1997 2DFA is a generalized version of the DFA which can revisit characters already processed. What is 2DFA?

How 2DFA works? Two-way Finite Automata have a read head, which can move left or right over the input string. Consists of the symbols of the input string as occupying cells of a finite tape, one symbol per cell. The input string is enclosed in left and right endmarkers ⊣ and ⊢, which are not elements of the input alphabet Σ. The read head may not move outside of the endmarkers .

Structure of 2DFA

Formal Definition of 2DFA

Function δ takes a state and a symbol as arguments and returns a new state and a direction to move the head. If δ(p, b) = (q, d), then whenever the machine is in state p and scanning a tape cell containing symbol b, it moves its head one cell in the direction d and enters state q.

Turing machine Move back and forth in the working tape while reading and/or writing. Has no limit to the amount of memory that it can use. As input becomes more complicated, it may use more memory to compute. 2DFAs can be seen as read-only Turing machines with no work tape, only a read-only input tape Example:

Informal description of a 2DFA accepting the set A = {x ∈ {a, b}∗ | #a(x) is a multiple of 3 and #b(x) is even}. counting the number of a’s mod 3 and ignoring the b’s . counting the number of b’s mod 2 and ignoring the a’s .

How does DFA compare to 2DFA? The equivalent DFA for a 2DFA may have exponentially more states. 2DFA can solve any problems that are solvable by DFA. Next, are there problems that can be solved by 2DFA but cannot be solved by DFA It turns out that 2DFA can be significantly simpler in design for solving the same problem than DFA.

Why not 2DFA? Yes! 2DFA are realistic. Consumes less memory and time than DFA. Problems that can be solved by DFA can be solved by 2DFA Easy to implement/ much more powerful than DFA.

Thank You