1 / 9

Intro to DFAs

Intro to DFAs. Readings: Sipser 1.1 (pages 31-44) With basic background from Sipser 0. Intuition: finite automata. Don’t hit anyone!. Front pad. Back pad. State diagram. What is accepted? 001? 000? 010? Can we come up with a description of the language accepted by this machine?.

rafe
Download Presentation

Intro to DFAs

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. Intro to DFAs Readings: Sipser 1.1 (pages 31-44) With basic background from Sipser 0

  2. Intuition: finite automata • Don’t hit anyone! Front pad Back pad

  3. State diagram • What is accepted? • 001? 000? 010? • Can we come up with a description of the language accepted by this machine?

  4. More formally… • A (deterministic) finite automaton (DFA) is a 5-tuple (Q, Σ, δ,q0, F), where • Q is a finite set called the states • Σ is a finite set called the alphabet • δ: Q × Σ → Qis the transition function • q0∈Q is the start state • F⊆Q is a set of accept states • In-class exercise:

  5. Languages • The set of all strings accepted by a DFA M is called the language of M and is denoted L(M) • We say that “M recognizes the language L(M)”

  6. What language is accepted here?

  7. Automata computation • More formally: • Let M=(Q, Σ, δ, q0, F)be a DFA and let w=w1w2w3…wn be a string over the alphabet Σ • Then Macceptsw if a sequence of states s0,s1,s2,…,sn exists in Q with the following conditions: • s0=q0 • δ(si,wi+1) = si+1fori = 0,…,n-1 • sn∈F 100

  8. Regular languages • A language is a regular language if some DFA recognizes it • Examples: • L(M1)={w | w contains at least one 1 and an even number of 0s follow the last 1} • L(M2)={w | w is a string over {a,b} that starts and ends with the same symbol}

  9. Designing your own • Is {w | wis a string of 0s and 1s containing an even number of 1s} a regular language? • Is {w | w is a string of as and bs containing the substring aba} a regular language? • How could we prove a “yes” answer?

More Related