Download presentation
Presentation is loading. Please wait.
1
Costas Busch - RPI1 Single Final State for NFAs
2
Costas Busch - RPI2 Any NFA can be converted to an equivalent NFA with a single final state
3
Costas Busch - RPI3 NFA Equivalent NFA Example
4
Costas Busch - RPI4 NFA In General Equivalent NFA Single final state
5
Costas Busch - RPI5 Extreme Case NFA without final state Add a final state Without transitions
6
Costas Busch - RPI6 Properties of Regular Languages
7
Costas Busch - RPI7 Concatenation: Star: Union: Are regular Languages For regular languages and we will prove that: Complement: Intersection: Reversal:
8
Costas Busch - RPI8 We say: Regular languages are closed under Concatenation: Star: Union: Complement: Intersection: Reversal:
9
Costas Busch - RPI9 Regular language Single final state NFA Single final state Regular language NFA
10
Costas Busch - RPI10 Example
11
Costas Busch - RPI11 Union NFA for
12
Costas Busch - RPI12 Example NFA for
13
Costas Busch - RPI13 Concatenation NFA for
14
Costas Busch - RPI14 Example NFA for
15
Costas Busch - RPI15 Star Operation NFA for
16
Costas Busch - RPI16 Example NFA for
17
Costas Busch - RPI17 Reverse NFA for 1. Reverse all transitions 2. Make initial state final state and vice versa
18
Costas Busch - RPI18 Example
19
Costas Busch - RPI19 Complement 1. Take the DFA that accepts 2. Make final states non-final, and vice-versa
20
Costas Busch - RPI20 Example
21
Costas Busch - RPI21 Intersection DeMorgan’s Law: regular
22
Costas Busch - RPI22 Example regular
23
Costas Busch - RPI23 Regular Expressions
24
Costas Busch - RPI24 Regular Expressions Regular expressions describe regular languages Example: describes the language
25
Costas Busch - RPI25 Recursive Definition Are regular expressions Primitive regular expressions: Given regular expressions and
26
Costas Busch - RPI26 Examples A regular expression: Not a regular expression:
27
Costas Busch - RPI27 Languages of Regular Expressions : language of regular expression Example
28
Costas Busch - RPI28 Definition For primitive regular expressions:
29
Costas Busch - RPI29 Definition (continued) For regular expressions and
30
Costas Busch - RPI30 Example Regular expression:
31
Costas Busch - RPI31 Example Regular expression
32
Costas Busch - RPI32 Example Regular expression
33
Costas Busch - RPI33 Example Regular expression = { all strings with at least two consecutive 0 }
34
Costas Busch - RPI34 Example Regular expression = { all strings without two consecutive 0 }
35
Costas Busch - RPI35 Equivalent Regular Expressions Definition: Regular expressions and are equivalent if
36
Costas Busch - RPI36 Example = { all strings without two consecutive 0 } and are equivalent regular expr.
37
Costas Busch - RPI37 Regular Expressions and Regular Languages
38
Costas Busch - RPI38 Theorem Languages Generated by Regular Expressions Regular Languages
39
Costas Busch - RPI39 Theorem - Part 1 1. For any regular expression the language is regular Languages Generated by Regular Expressions Regular Languages
40
Costas Busch - RPI40 Theorem - Part 2 Languages Generated by Regular Expressions Regular Languages 2. For any regular language there is a regular expression with
41
Costas Busch - RPI41 Proof - Part 1 1. For any regular expression the language is regular Proof by induction on the size of
42
Costas Busch - RPI42 Induction Basis Primitive Regular Expressions: NFAs regular languages
43
Costas Busch - RPI43 Inductive Hypothesis Assume for regular expressions and that and are regular languages
44
Costas Busch - RPI44 Inductive Step We will prove: Are regular Languages
45
Costas Busch - RPI45 By definition of regular expressions:
46
Costas Busch - RPI46 By inductive hypothesis we know: and are regular languages Regular languages are closed under: Union Concatenation Star We also know:
47
Costas Busch - RPI47 Therefore: Are regular languages
48
Costas Busch - RPI48 And trivially: is a regular language
49
Costas Busch - RPI49 Proof – Part 2 2. For any regular language there is a regular expression with Proof by construction of regular expression
50
Costas Busch - RPI50 Since is regular take the NFA that accepts it Single final state
51
Costas Busch - RPI51 From construct the equivalent Generalized Transition Graph in which transition labels are regular expressions Example:
52
Costas Busch - RPI52 Another Example:
53
Costas Busch - RPI53 Reducing the states:
54
Costas Busch - RPI54 Resulting Regular Expression:
55
Costas Busch - RPI55 In General Removing states:
56
Costas Busch - RPI56 The final transition graph: The resulting regular expression:
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.