Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.

Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.

Successfully reported this slideshow.

Like this presentation? Why not share!

- Deterministic Finite Automata by Mohammad jawad khan 11793 views
- Finite Automata by Mukesh Tekwani 35911 views
- Introduction to fa and dfa by deepinderbedi 13537 views
- NFA or Non deterministic finite aut... by deepinderbedi 35737 views
- Deterministic Finite Automata by Shiraz316 1051 views
- Regular expressions by Raj Gupta 1826 views

12,161 views

Published on

No Downloads

Total views

12,161

On SlideShare

0

From Embeds

0

Number of Embeds

5

Shares

0

Downloads

250

Comments

0

Likes

2

No embeds

No notes for slide

- 1. Two-way DeterministicFinite Automata<br />(2DFA)<br />Presented By: HafsaNaseem<br />
- 2. DFA<br />Input is processed once from left to right. After an input has been read, the DFA decides whether the input is accepted or rejected.<br />2DFA<br /><ul><li>Can read the input back and forth with no limit on how many times an input symbol can be read.
- 3. As in the case of DFA, the 2DFA decides whether a given input is accepted or rejected.</li></li></ul><li>Why not 2DFA?<br />Are 2DFA unrealistic?<br />Consumes more memory and time than DFA?<br />Problems that can be solved by DFA cannot be solved by 2DFA?<br />Complex to implement?<br />
- 4. What is 2DFA?<br />The concept of 2DFA was originated by Rabin and Scott in 1997 <br />2DFA is a generalized version of the DFA which can revisit characters already processed. <br />
- 5. How 2DFA works?<br />Two-way Finite Automata have a read head, which can move left or right over the input string. <br />Consists of the symbols of the input string as occupying cells of a ﬁnite tape, one symbol per cell. <br />The input string is enclosed in left and right endmarkers ⊣ and ⊢, which are not elements of the input alphabet Σ.<br />The read head may not move outside of the endmarkers.<br />
- 6. Structure of 2DFA <br />
- 7. Formal Definition of 2DFA<br />
- 8. Function δ takes a state and a symbol as arguments and returns a new state and a direction to move the head. <br />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.<br />
- 9. Example:<br />2DFAs can be seen as read-only Turing machines with no work tape, only a read-only input tape<br />Turing machine<br />Move back and forth in the working tape while reading and/or writing.<br />Has no limit to the amount of memory that it can use.<br />As input becomes more complicated, it may use more memory to compute.<br />
- 10. Informal description of a 2DFA accepting the set<br /> A = {x ∈ {a, b}∗ | #a(x) is a multiple of 3 and #b(x) is even}. <br />counting the number of a’s mod 3 and ignoring the b’s. <br />counting the number of b’s mod 2 and ignoring the a’s. <br />
- 11. How does DFA compare to 2DFA?<br />The equivalent DFA for a 2DFA may have exponentially more states.<br />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<br />It turns out that 2DFA can be significantly simpler in design for solving the same problem than DFA.<br />
- 12. Why not 2DFA?<br />Yes! 2DFA are realistic.<br />Consumes less memory and time than DFA.<br />Problems that can be solved by DFA can be solved by 2DFA<br />Easy to implement/ much more powerful than DFA.<br />
- 13. Thank You<br />

No public clipboards found for this slide

Be the first to comment