1 / 11

2 DFA versus Normal DFA

2 DFA versus Normal DFA. Pavan Kumar Akulakrishna ( M.Tech , SERC) SR No: 06-02-01-10-51-12-1-09469 Under Guidance of : Prof. Deepak D’souza . Fundamental Question . Is 2 way DFA more powerful than a one way DFA? “OR”

shiro
Download Presentation

2 DFA versus Normal DFA

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 2 DFA versus Normal 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. Fundamental Question • 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. Understanding the 2DFA Behavior • 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., Tx (Q)=P • If never emerges? Let Tx (Q) = ┴ • The first time it emerges from x without having been to z. Call the state Tx(.). P x z Q

  4. Constructing a Table • Tx (q) depends only on x and q. • Write down Tx(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.

  5. Using MyhillNerode Theorem • If there are tables Tx == Ty 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 Tx = Ty, x ≡L(M)y.

  6. Properties of ≡L(M) • Right congruence, • x≡L(M) y then xa ≡L(M)ya • Refines L(M) • If Tx = Ty , 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. Inferences Drawn • 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. Constructing Equivalent DFA • Formally, a DFA equivalent to 2 DFA looks as: • D=(Q’,S’,Σ U{├, ┤}, δ,F’) • Q’ = { T: (Q U {.})  (Q U {┴}) } • S’ = Tε • δ(Tx, a) = Txa • F’ = {Tx | x ЄL(M) }

  9. Advantages Of 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. Conclusions • 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.

  11. Thank Q

More Related