4. What is 2DFA? 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.
5. 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.
8. 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.
9. Example: 2DFAs can be seen as read-only Turing machines with no work tape, only a read-only input tape 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.
10. 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.
11. 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.
12. 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.