Regular expression to NFA (Nondeterministic Finite Automata)

NiloyBiswas13 1,318 views 10 slides Jul 03, 2019
Slide 1
Slide 1 of 10
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

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.


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

References www.jflap.org en.wikipedia.org web.stanford.edu www.stackoverflow.com www.quara.com 9

Thank You 10