Regular expression to NFA (Nondeterministic Finite Automata)
NiloyBiswas13
1,318 views
10 slides
Jul 03, 2019
Slide 1 of 10
1
2
3
4
5
6
7
8
9
10
About This Presentation
I am trying to describe here how to convert a Regular Expression to Nondeterministic Finite Automata (NFA) with example and details procedure.
Size: 376.03 KB
Language: en
Added: Jul 03, 2019
Slides: 10 pages
Slide Content
Converting regular expression to nfa 1
Daffodil International University Submitted By Niloy Biswas (171-35-225) Submitted to Bikash Kumar Paul Lecturer, Department of SWE Daffodil International University 2 DATE: 15 April 2019
regular expression A regular expression (regex) describe a set of possible input string. A sequence of characters that defines a search pattern. If you have a regular expression parsing and searching program, You can search for all string that match some patters within some text. 3
Converting regular expression to nfa Example -1 Construct Nondeterministic Finite Automata (NFA) for regular expression b* + ab Step 1 We start by drawing the diagram : S f b* + ab 4
Step 2 S f b* + ab b* ab S f b* ab Step 3 a b 5
Step 4 S f b b* a b Final step S f b b* a b ϵ ϵ 6
Example -2 An NFA that recognize the string “and” , & “any” 7
Example -3 Construct an NFA that recognize ((a | b) | cd) 8