1 / 12

Non-deterministic FSA

Non-deterministic FSA. Regular Languages . A Language is called Regular iff there is a DFA acceptor that defines it. There exists some DFA M such that L = L(M). NFA. Two non-deterministic elements: Lambda transitions 2 outarcs with same symbol

asta
Download Presentation

Non-deterministic FSA

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. Non-deterministic FSA

  2. Regular Languages A Language is called Regular iff there is a DFA acceptor that defines it. There exists some DFA M such that L = L(M).

  3. NFA • Two non-deterministic elements: • Lambda transitions • 2 outarcs with same symbol • A String is accepted if there is SOME path that ends in an acceptor state.

  4. Example {ab, abc}* q1 a q0 b c,λ q2

  5. Example Is aaa accepted? ab? a? abb? b? q1 a q0 b a λ q2

  6. Intuitive NFA’s • Example: Write a DFA & NFA that accept the strings containing the substring abbab

  7. Practice - write NFAs • Strings on {a,b}* that have exactly 2 a’s or more than 2 b’s. • A string on {a,b}* that starts and ends with “ab”.

  8. Things NFA’s make easy • Practice: • Prove if L is regular, LR is regular.

  9. Equivalence • DFA’s and NFA’s are equally powerful. • That is, For every language accepted by a NFA, there exists some DFA that also accepts the language.

  10. Equivalence - Proof by construction • Idea: Take every subset of states in DFA. Those are states in NFA. Make appropriate arcs. Any state with a final state in DFA becomes final in NFA.

  11. Example b a q2 qo q1 λ a

  12. b a q2 qo q1 λ a a q1orq2 qo b a

More Related