1 / 10

Myhill-Nerode Thm

[Problem 1.52, pages 91, 97-8]. Myhill-Nerode Thm. Def: Let x,y be strings and L be a language. We say that x and y are indistinguishable by L if there for every z the following holds: xz 2 L iff yz 2 L. We write x ´ L y. Note: this is an equivalence relation.

mkilroy
Télécharger la présentation

Myhill-Nerode Thm

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. [Problem 1.52, pages 91, 97-8] Myhill-Nerode Thm Def: Let x,y be strings and L be a language. We say that x and y are indistinguishable by L if there for every z the following holds: xz 2 L iff yz 2 L. We write x ´L y. Note: this is an equivalence relation. Examples: find the equivalence classes of ´L: L1 = { 0w | w2{0,1}* } L2 = { w2{0,1}* | sum of digits of w is divisible by 3 } L3 = { 0k1k | k > 0 }

  2. [Problem 1.52, pages 91, 97-8] Myhill-Nerode Thm Consider a DFA accepting L. Suppose that x and y end in the same state q. What can we say about x,y? Claim: If L is accepted by a DFA with · k states, then ´L has ___________ equivalence classes.

  3. [Problem 1.52, pages 91, 97-8] Myhill-Nerode Thm Claim: If ´L has k equivalence classes, then L can be accepted by a DFA with k states.

  4. [Problem 1.52, pages 91, 97-8] Myhill-Nerode Thm Thm [Myhill-Nerode]: L is regular iff the number of equivalence classes of ´L is finite. Using Myhill-Nerode to prove nonregularity: L3 = { 0k1k | k > 0 } L4 = { wwR | w2{0,1}* }

  5. [Problem 7.40, page 299] Minimimal DFA Claim: a DFA is minimal iff its number of states is the same as the number of equivalence classes of its language.

  6. [Problem 7.40, page 299] a b b b a b b a a a a a b a a b b b Minimimal DFA Suppose we have a DFA – how to construct a corresponding minimal DFA ?

  7. [Problem 7.40, page 299] Minimimal DFA Suppose we have a DFA – how to construct a corresponding minimal DFA ? • Remove unreachable states. b b a a a a b a a b b b

  8. [Problem 7.40, page 299] Minimimal DFA • Remove unreachable states. • Identify equivalent states (and merge them): • construct graph with vertices = states • place edges between every accept and nonaccept state b b a a a a b a a b b b

  9. [Problem 7.40, page 299] Minimimal DFA • Remove unreachable states. • Identify equivalent states (and merge them): • construct graph with vertices = states • place edges between every accept and nonaccept state • continue placing edges as follows while can: for q,r2 Q, qr, place edge (q,r) if there exists a2§ s.t. (±(q,a),±(r,a)) is an edge. b b a a a a b a a b b b

  10. [Problem 7.40, page 299] Minimimal DFA • Remove unreachable states. • Identify equivalent states (and merge them): • construct graph with vertices = states • place edges between every accept and nonaccept state • continue placing edges as follows while can: • merge all states that do not have edges between them into a single state for q,r2 Q, qr, place edge (q,r) if there exists a2§ s.t. (±(q,a),±(r,a)) is an edge. b b a a a a b a a b b b

More Related