CSCI 301 L26 Notes

Lecture 26 - Notes

Goals

Announcements

Closure of Regular Languages under Regular Operations

We’re finally ready to do the (actually quite straightforward, now!) proof of the closure of regular operations.

Theorem: The set of regular languages is closed under the regular operations.

Regular Operations

Proof:

Case: AB - proof by construction:

Let MA=(QA,Σ,δA,qA,FA) be a DFA accepting A and MB=(QB,Σ,δB,qB,FB) be a DFA accepting B.

Construct an NFA N=(Q,Σ,δ,q,F) as follows:

  1. Let QB be a set containing QB’s elements, but renamed to ensure that QAQB=; also let s be a new state that is not a member of QA or QB.
  2. The NFA’s alphabet is Σ=Σ{ϵ}.
  3. The NFA’s transition function δ=δ{((s,ϵ),qA),((s,ϵ),qB)}.
  4. The NFA’s start state is q=s.
  5. The NFA’s accept states are F=FAFB.

This machine accepts AB because at the start of processing, it may nondeterministically decide to make an ϵ-transition to either A’s start state or B’s start state, then proceed to process the string exactly as MA or MB would. Therefore, if the string is in A or B, then there is a way that N can process the string and end in an accept state.

Regular Expressions

Regular expressions are a meta-language for describing regular languages. They are defined based on the properties of regular languages that we’ve now explored thoroughly, so a lot of what follows will probably be unsurprising.

Definition: A regular expression over an alphabet Σ is defined as follows:

Examples:

What language does (01)01 describe?

{00,001,0011,,10,101,1011,}

What regular expression describes {w:w has 1011 as a substring}?

(01)1011(01)