1 / 10

CSCI 2670 Introduction to Theory of Computing

CSCI 2670 Introduction to Theory of Computing. August 25, 2004. Agenda. Last class Introduced deterministic finite automata Formally defined DFA’s Informally described DFA’s This class Quiz Continue Chapter 1 Goal for the week Section 1.1

jobej
Download Presentation

CSCI 2670 Introduction to Theory of Computing

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. CSCI 2670Introduction to Theory of Computing August 25, 2004

  2. Agenda • Last class • Introduced deterministic finite automata • Formally defined DFA’s • Informally described DFA’s • This class • Quiz • Continue Chapter 1 • Goal for the week • Section 1.1 • Continue reading Section 1.1 (pages 31 – 47) this week

  3. Group 1 0,1 1 0 0 q2 1 q3 0 q4 q1 1 q5 0,1 Hint: What string doesn’t this DFA accept?

  4. Group 2 0,1 q2 0,1 q3 0 q1 0,1 1 q4 0,1 q5 Hint: String length counts.

  5. Remainder of class • Formal definition of computation • Definition of a regular language • Designing finite automata

  6. Formalizing computation • Let M = (Q,,,q0,F) be a finite automaton and let w = w1w2…wn be any string over . Macceptsw if there is a sequence of states r0, r1, …, rn, of Q such that • r0 = q0 • start in the start state • ri+1=(ri, wi) • the transition function determines each step • rn F • the last state is one of the final states

  7. Regular languages • A deterministic finite automaton Mrecognizes the language A if A = { w | M accepts w } • Alternatively, we say the language of M is A L(M) = { w | M accepts w } • Any language recognized by a deterministic finite automaton is called a regular language

  8. Designing finite automata • Select states specifically to reflect some important concept • even number of 0’s • odd number of occurrences of the string 010 • Ensure this meaning is relevant to the language you are trying to define • Try to get “in the head” of the automaton

  9. Example • Design a DFA accepting all strings over {0,1,2,3} such that the sum of the symbols in the string is equivalent to 2 modulo 4 or 3 modulo 4

  10. Step 1 • What states do we need? • One state for each value modulo 4 • q1 represents 1 modulo 4 • q2 represents 2 modulo 4 • q3 represents 3 modulo 4 • q4 represents 0 modulo 4

More Related