Properties of Regular Expressions

Shiraz316 10,303 views 37 slides Dec 09, 2016
Slide 1
Slide 1 of 37
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37

About This Presentation

xnnfcf frefnrfnk dfrefnr


Slide Content

Costas Busch - LSU 1 Properties of Regular Languages

Costas Busch - LSU 2 Concatenation: Star: Union: Are regular Languages For regular languages and we will prove that: Complement: Intersection: Reversal:

Costas Busch - LSU 3 We say Regular languages are closed under Concatenation: Star: Union: Complement: Intersection: Reversal:

Costas Busch - LSU 4 NFA Equivalent NFA A useful transformation: use one accept state 2 accept states 1 accept state

Costas Busch - LSU 5 NFA Equivalent NFA Single accepting state In General

Costas Busch - LSU 6 NFA without accepting state Add an accepting state without transitions Extreme case

Costas Busch - LSU 7 Regular language Single accepting state NFA Single accepting state Regular language NFA Take two languages

Costas Busch - LSU 8 Example

Costas Busch - LSU 9 Union NFA for

Costas Busch - LSU 10 NFA for Example

Costas Busch - LSU 11 Concatenation NFA for change to regular state

Costas Busch - LSU 12 NFA for Example

Costas Busch - LSU 13 Star Operation NFA for or

Costas Busch - LSU 14 Example NFA for

Costas Busch - LSU 15 Reverse NFA for 1. Reverse all transitions 2. Make the initial state accept state and the accept state initial state

Costas Busch - LSU 16 Example

Costas Busch - LSU 17 Complement 1. Take the DFA that accepts 2. Make accept states regular and vice-versa

Costas Busch - LSU 18 Example

Costas Busch - LSU 19 NFAs cannot be used for complement Make accept states regular and vice-versa NFA NFA it is not the complement

Costas Busch - LSU 20 Same example with DFAs Make accept states regular and vice-versa DFA DFA it is the complement

Costas Busch - LSU 21 Intersection regular regular We show regular

Costas Busch - LSU 22 DeMorgan’s Law: regular, regular regular, regular regular regular regular

Costas Busch - LSU 23 Example regular regular regular

Costas Busch - LSU 24 for for DFA DFA Construct a new DFA that accepts Machine Machine simulates in parallel and Another Proof for Intersection Closure

Costas Busch - LSU 25 States in State in State in

Costas Busch - LSU 26 transition transition DFA DFA New transition DFA

Costas Busch - LSU 27 initial state initial state New initial state DFA DFA DFA

Costas Busch - LSU 28 accept state accept states New accept states DFA DFA DFA Both constituents must be accepting states

Costas Busch - LSU 29 Example:

Costas Busch - LSU 30 DFA for intersection

Costas Busch - LSU 31 Construction procedure for intersection 1. Build Initial State 2. For each new state and for each symbol add transition to either an existing state or create a new state and point to it 3. Repeat step 3 until no new states are added 4. Designate accept states

Costas Busch - LSU 32 Automaton for intersection initial state

Costas Busch - LSU 33 Automaton for intersection add transition and new state for symbol a

Costas Busch - LSU 34 Automaton for intersection add transition and new state for symbol b

Costas Busch - LSU 35 Automaton for intersection Repeat until no new states can be added

Costas Busch - LSU 36 Automaton for intersection add Accept state accept state for accept state for

Costas Busch - LSU 37 simulates in parallel and accepts string if and only if: accepts string and accepts string Intersection DFA :