MC 306 Theory of Computation Thursday, 92503 - PowerPoint PPT Presentation

1 / 6
About This Presentation
Title:

MC 306 Theory of Computation Thursday, 92503

Description:

More on combining regular (DFA/NFA) languages. Regular Expressions. Exam #1 next Thursday ... converting NFAs to DFAs, combining regular languages, regular ... – PowerPoint PPT presentation

Number of Views:43
Avg rating:3.0/5.0
Slides: 7
Provided by: skid
Category:

less

Transcript and Presenter's Notes

Title: MC 306 Theory of Computation Thursday, 92503


1
MC 306 Theory of ComputationThursday, 9/25/03
  • Todays Class
  • Outline of Exam 1
  • More on combining regular (DFA/NFA) languages
  • Regular Expressions
  • Exam 1 next Thursday
  • Bring questions on Tuesday!
  • Exercises
  • p. 61 2.19ab

2
Exam 1 Outline
  • Material Exam 1 covers all material through
    todays class
  • Chapter 1, Math Preliminaries Material covered
    in class and assignments (sets, relations,
    equivalence relations)
  • Chapter 2, Finite Automata 2.1-2.4 DFAs, NFAs,
    converting NFAs to DFAs, combining regular
    languages, regular expressions, equivalence of FA
    and regular expression languages, converting
    regular expressions to NFAs, e
  • Kinds of questions Stating definitions and
    theorems carefully, giving examples and
    counterexamples, doing problems similar to class
    examples, exercises, and hand-in problems
  • Reference Sheet You may bring one 8½ x 11
    sheet with any notes you wish to write on it.

3
Regular Expressions versus DFAs/NFas
  • Every DFA/NFA M determines a language L(M)
  • Every regular expression r determines a language
    L(r)
  • Theorem. The set of DFA/NFA languages exactly
    equals the set of regular expression languages.
  • Hence we call these languages regular, which can
    be interpreted either way by this theorem

4
Proving Equivalence of DFA and regular expression
languages.
  • An If and Only If Theorem is really 2 theorems
  • Theorem 1 If L L(r) is a language
    corresponding to a regular expression r, then
    there is a DFA/NFA Mr that accepts L, i.e., L
    L(Mr)
  • Proof plan Start with a regular expression r
    that corresponds to L. Show how to use r to
    design a DFA/NFA that accepts L.
  • Theorem 2 If L L(M) is a language
    corresponding to a DFA/NFA M, then there is a
    regular expression rM corresponding to L, i.e., L
    L(rM).
  • Proof plan Start with a DFA/NFA M that accepts
    L. Show how to use M to design a regular
    expression that corresponds to L.

5
Theorem 1 Convert from regular expression to NFA
  • Since definition of regular expression is
    inductive, we do a base case, and then an
    inductive case (work done on board).
  • Base case If the regular expression is a single
    symbol ?, ?, x??
  • Inductive case If r1 and r2 are regular
    expressions that weve built NFAs for, how do we
    build an NFA for (r1 ? r2), (r1r2), and r1?

6
Example
  • Find an NFA that accepts the language described
    by the regular expression
  • (a ? b) aa
  • Note Well prove other half of Theorem, and do
    an example, next time.
Write a Comment
User Comments (0)
About PowerShow.com