Download presentation
Presentation is loading. Please wait.
Published byJarrod Coffey Modified over 9 years ago
1
2 DFA VERSUS N ORMAL DFA Pavan Kumar Akulakrishna (M.Tech, SERC) SR No: 06-02-01-10-51-12-1-09469 Under Guidance of : Prof. Deepak D’souza.
2
F UNDAMENTAL Q UESTION Is 2 way DFA more powerful than a one way DFA? “OR” Does the ability to do multiple scans on the tape gives rise to an increase in ‘ POWER ’ of the 2DFA? Not Intuitively clear! Need to develop a formal model.
3
U NDERSTANDING THE 2DFA B EHAVIOR Consider a String w: which is broken down into two parts say x and z. Right to Left Q Left to Right P If next time Right to Left Q, then Left to Right will be P. i.e., T x (Q)=P If never emerges? Let T x (Q) = ┴ The first time it emerges from x without having been to z. Call the state T x (. ). xz
4
C ONSTRUCTING A T ABLE T x (q) depends only on x and q. Write down T x (q) for all possible states q T: (Q U {. }) (Q U {┴}) Possible such tables taking |Q| = k are, (k+1)^(k+1). Hence, a finite information can be passed. Q1Q2…….Qk┴ Q1√ Q2√ ……√…….. Qk√. √
5
U SING M YHILL N ERODE T HEOREM If there are tables T x == T y and M accepts xz. Then, yz is also said to be accepted. Let L(M) denote the language accepted by the machine. Define a Equivalence relation on strings x and y: If T x = T y, x ≡ L(M) y.
6
P ROPERTIES OF ≡ L(M) Right congruence, x ≡ L(M) y then xa ≡ L(M) ya Refines L(M) If T x = T y, either both x and y accepted or rejected. Finite Index No. of Equivalence classes = No. of Unique Tables [i.e., (k+1)^(k+1)]. Hence, by Myhill-Nerode theorem, L(M) is a Regular Language.
7
I NFERENCES D RAWN A 2DFA is NO more powerful than a normal DFA We can construct a one way DFA equivalent to a 2 DFA viz. Indentify equivalence classes. Use construction defined by ≡ M ≡
8
C ONSTRUCTING E QUIVALENT DFA Formally, a DFA equivalent to 2 DFA looks as: D=(Q’,S’,Σ U{├, ┤}, δ,F’) Q’ = { T: (Q U {. }) (Q U {┴}) } S’ = T ε δ (T x, a) = T xa F’ = {T x | x Є L(M) }
9
A DVANTAGES O F 2 DFA A 2DFA is more compact than a DFA i.e., L(M)= {x Є {a, b}* | #a(x) is multiple of 7 and #b(x) is multiple of 5} Normal DFA would have 35 states. 2 DFA can be constructed using 14 states, including the accept and reject states (t, r). A 2DFA has single accept and reject states Whereas, a DFA may have multiple final states. E.g. L(M) = {x Є {a, b}* | #a(x) is multiple of 7 or #b(x) is multiple of 5}. Normal DFA has 12 final states.
10
C ONCLUSIONS 2 way DFA is a convenient representation for some regular languages, much like NFA Converting it to a normal DFA can be tedious as it involves constructing and identifying identical tables.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.