1 / 12

Nondeterminism

[Section 1.2]. Nondeterminism. Determinism: computation always continues in a uniquely determined way. Nondeterminism: have more (or none) choices Example: { w 2 {0,1} * | w contains 001 or 0101 as a substring }. [Section 1.2]. Nondeterminism.

smithgary
Download Presentation

Nondeterminism

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. [Section 1.2] Nondeterminism Determinism: computation always continues in a uniquely determined way. Nondeterminism: have more (or none) choices Example: { w 2 {0,1}* | w contains 001 or 0101 as a substring }

  2. [Section 1.2] Nondeterminism Determinism: computation always continues in a uniquely determined way. Nondeterminism: have more (or none) choices Example: { w 2 {0,1}* | w contains 001 or 0101 as a substring } Nondeterministic FA can also use ε-transitions:

  3. [Section 1.2] Nondeterminism Example: { w 2 {0,1}* | w contains 1 in the third position from the end } Does there exist a (deterministic) FA recognizing this language ?

  4. [Section 1.2] Nondeterminism Example: { w 2 {0}* | |w| is divisible by 2 or 3 }

  5. [Section 1.2] Nondeterminism • Formal definition: • A nondeterministic finite automaton (NFA) is a 5-tuple (Q,§,±,q0,F), where • Q is a finite set of states • § is a (finite) alphabet • ±: _____x_____ _____ is the transition function • q0 2 Q is the start state • F µ Q is the set of accept state

  6. [Section 1.2] Nondeterminism Let N=(Q,§,±,q0,F) be an NFA and let w=w1w2…wn where each wi2§. Then N accepts w if

  7. [Section 1.2] Equivalence of NFAs and DFAs • Thm 1.39: Every NFA has an equivalent DFA. • Proof idea: • for starters, no ε-transitions in the NFA • example:

  8. [Section 1.2] Equivalence of NFAs and DFAs Thm 1.39: Every NFA has an equivalent DFA. Proof idea, part 2 (getting rid of ε-transitions in the NFA): - for R µ Q let: E(R) = { q 2 Q | q can be reached from R by traveling along 0 or more ε-arrows }

  9. [Section 1.2] Equivalence of NFAs and DFAs Thm 1.39: Every NFA has an equivalent DFA. Proof idea, part 2 (getting rid of ε-transitions in the NFA): - for R µ Q let: E(R) = { q 2 Q | q can be reached from R by traveling along 0 or more ε-arrows }

  10. [Section 1.2] Closure under regular operations Thm 1.45 (revisited): The class of regular languages is closed under the union operation.

  11. [Section 1.2] Closure under regular operations Thm 1.47: The class of regular languages is closed under the concatenation operation.

  12. [Section 1.2] Closure under regular operations Thm 1.49: The class of regular languages is closed under the star operation.

More Related