Title: Single Final State for NFAs and DFAs
1Single Final State for NFAs and DFAs
2Observation
- Any Finite Automaton (NFA or DFA)
- can be converted to an equivalent NFA
- with a single final state
3Example
NFA
4In General
NFA
5Extreme Case
NFA without final state
6Some Properties of Regular Languages
7Properties
For regular languages and we will
prove that
8We Say
Regular languages are closed under
9(No Transcript)
10Example
11Union
12Example
NFA for
13Concatenation
14Example
15Star Operation
16Example
17Regular Expressions
18Regular Expressions
- Regular expressions
- describe regular languages
- Example
- describes the language
19Recursive Definition
Primitive regular expressions
20Examples
A regular expression
21Languages of Regular Expressions
-
- language of regular expression
- Example
-
22Definition
- For primitive regular expressions
23Definition (continued)
- For regular expressions and
-
24Example
25Example
26Example
27Example
28Example
29Equivalent Regular Expressions
- Definition
- Regular expressions and
- are equivalent if
30Example
all strings with at least two
consecutive 0
31Regular ExpressionsandRegular Languages
32Theorem
Languages Generated by Regular Expressions
Regular Languages
33Theorem - Part 1
Languages Generated by Regular Expressions
Regular Languages
34Theorem - Part 2
Languages Generated by Regular Expressions
Regular Languages
35Proof - Part 1
36Induction Basis
- Primitive Regular Expressions
37Inductive Hypothesis
- Assume
- for regular expressions and
- that
- and are regular languages
-
38Inductive Step
Are regular Languages
39- By definition of regular expressions
40By inductive hypothesis we know and
are regular languages
41Are regular languages
42is a regular language
43Proof Part 2
2. For any regular language there is
a regular expression with
Proof by construction of regular expression
44- Since is regular take the
- NFA that accepts it
-
Single final state
45- From construct the equivalent
- Generalized Transition Graph
- transition labels
- are regular expressions
Example
46 47 48- Resulting Regular Expression
49In General
50- Obtaining the final regular expression