0 Up votes0 Down votes

6 views21 pagesMELJUN CORTES Automata Lecture Equivalence of Nfas and Dfas Part 1 2

Jun 12, 2015

© © All Rights Reserved

PDF, TXT or read online from Scribd

MELJUN CORTES Automata Lecture Equivalence of Nfas and Dfas Part 1 2

© All Rights Reserved

6 views

MELJUN CORTES Automata Lecture Equivalence of Nfas and Dfas Part 1 2

© All Rights Reserved

- Problem Set 1 (theory of automota)
- Essay 1 Are Culture and Language Separable? - 2
- Appendix B. 2-Way Finite Automata
- Harrafi_MCompSc_S2015
- MELJUN CORTES Automata Lecture Designing Finite Automata 1
- AUDIOLINGUAL METHODapril 9
- A Deter Minis Tic Finite Automaton Will Have a Single Possible Output for a Given Input
- context fre grammer
- Lecture 2
- Toc Queston Paper
- LinguaggiFormali
- 301 Lecture 23
- s30 Pumping Lemma
- sols_4
- KTH - Safe & Reliable Computer Control Systems Concepts and Methods
- bishal
- Ge Endofyeartest
- Learning Journey 25
- Capitalization Rules
- 2012 Maths H Unit 3 - Mock Paper Mark Scheme

You are on page 1of 21

DFAs

NFA and DFA Equivalence

Introduction

from the previous discussions.

0

q0

q2

q3

q1

0, 1

alphabet = {0, 1} that start

with a 0 and end with a 1.

* Property of STI

Page 1 of 21

NFA N1 also from the previous

discussions.

0, 1

q0

q1

q2

the alphabet = {0, 1} that

start with a 0 and end with 1.

NFA N1 recognize the same

language. That is:

L(M1) = L(N1) = {w w starts

with 0 and ends with 1}

* Property of STI

Page 2 of 21

if they recognize the same

language. Therefore, M1 is

equivalent to N1.

If a language is recognized by

a DFA, then there is an NFA

that will also recognize it. This

is because all DFAs are NFAs.

If a language is recognized by

an NFA, is there a DFA that

will also recognize it?

In other words, is there an

equivalent DFA for any NFA?

procedure

must

be

constructed to convert any

NFA to its equivalent DFA.

* Property of STI

Page 3 of 21

DFA

one or more states at any

given time.

three states q0, q1, and q2. At

any time, the NFA may be in:

1. state q0 only.

2. state q1 only.

3. state q2 only.

4. states q0 and q1.

5. states q0 and q2.

6. states q1 and q2.

7. states q0, q1, and q2.

8. dead state (stopped

processing).

* Property of STI

Page 4 of 21

states the NFA can be in is the

power set (set of all subsets)

of its set of states Q. The

dead state is equivalent to the

null set.

from this NFA will have a state

that will represent each of the

elements of the power set.

which the NFA is in states q0

and q1 will be represented by a

single state (that may be

called q01) in its equivalent

DFA.

the equivalent DFA will have

2n states (number of states is

finite).

* Property of STI

Page 5 of 21

DFA will then be

NFA State

DFA State

q0

q0

q1

q1

q2

q2

q0, q1

q01

q0, q2

q02

q1, q2

q12

q0, q1, q2

q012

Dead State

qdead

is q0 so the initial state of the

DFA will also be q0.

* Property of STI

Page 6 of 21

This means that the NFA will

be in a final state if q2 is

included in the subset.

Therefore, the final states for

the DFA are q2, q02, q12, and

q012.

states of the equivalent DFA

are reachable from the start

state. It is thus possible that

some of these states will

eventually be removed.

The states that will be

removed will be determined

upon the construction of the

transition function of the DFA.

* Property of STI

Page 7 of 21

function for the equivalent DFA

for NFA N1

If input = 0, the NFA will go

to state q1. For the DFA,

this will be state q1.

If input = 1, the NFA will go

to a dead state. For the

DFA, this will be state

qdead.

are states q1 and qdead (the

states reachable from q0).

* Property of STI

Page 8 of 21

If input = 0, the NFA will be

at state q1 only. For the

DFA, this will be state q1.

If input = 1, the NFA will be

in states q1 and q2. For the

DFA, this will be state q12.

From state qdead:

The NFA will stay at its

dead state regardless of

the input symbol received.

So will the DFA.

The next state to be analyzed

is state q12 since it is

reachable from state q0

(through state q1).

Equivalence of NFAs and DFAs

* Property of STI

Page 9 of 21

If input = 0, the copy of the

NFA at q1 stays at q1. The

copy at q2 will stop

processing. So the NFA

will be at state q1 only. For

the DFA, this will be state

q 1.

If input = 1, the copy of the

NFA at state q1 will go to

states q1 and q2. The the

copy at q2 will stop

processing. So the NFA

will be at states q1 and q2.

For the DFA, this will be

state q12.

* Property of STI

Page 10 of 21

from q0 have been analyzed,

the transition table will be

q0

q1

qdead

q1

q1

q12

q1

q12

qdead

qdead

q2

q01

q02

q12

q012

qdead

q02, and q012 are not reachable

from state q0.

These can

therefore be removed from the

transition table.

* Property of STI

Page 11 of 21

then be

0

q0

q1

qdead

q1

q1

q12

q12

q1

q12

qdead

qdead

qdead

equivalent DFA is

of

q0

q12

qdead

q1

the

0, 1

* Property of STI

Page 12 of 21

the following NFA N2.

0, 1

q0

0, 1

q1

q2

alphabet = {0, 1} that contain

the substring 11.

states, the possible states it

can assume are q0 only, q1

only, q2 only, q0 and q1, q0 and

q2, q1 and q2, q1 and q2, and

q3, and the dead state.

* Property of STI

Page 13 of 21

DFA will then be

NFA State

DFA State

q0

q0

q1

q1

q2

q2

q 0, q 1

q01

q0, q2

q02

q 1, q 2

q12

q 0, q 1, q 2

q012

Dead State

qdead

q0 so the initial state of the

DFA will also be q0.

* Property of STI

Page 14 of 21

q2. This means that the NFA

will be in a final state if q2 is

included in the subset.

the DFA are q2, q02, q12, and

q012.

Starting at state q0:

stay at q0. For the DFA,

this will be state q0.

If input = 1, the NFA will be

at q0 and q1. For the DFA,

this will be state q01.

The next state to be analyzed

is state q01.

Equivalence of NFAs and DFAs

* Property of STI

Page 15 of 21

If input = 0, the copy of the

NFA at state q0 will stay at

q0. The copy at q1 will stop

processing. The NFA will

then be at state q0 only.

For the DFA, this is state

q 0.

If input = 1, the copy of the

NFA at state q0 will be at

states q0 and q1. The copy

at state q1 will go to state

q2. The NFA will then be

at states q0, q1, and q2.

For the DFA, this is state

q012.

The next state to be analyzed

is state q012.

Equivalence of NFAs and DFAs

* Property of STI

Page 16 of 21

If input = 0, the copy of the

NFA at q0 will stay at q0,

the copy at q1 will stop

processing, and the copy

at q2 will stay at q2. The

NFA will then be at states

q0 and q2. For the DFA,

this is state q02.

If input = 1, the copy of the

NFA at q0 will be at state q0

and q1, the copy at q1 will

go to state q2, and the copy

of q2 will stay at q2. The

NFA will then be at states

q0, q1, and q2. For the

DFA, this is state q012.

* Property of STI

Page 17 of 21

is state q02.

From state q02:

If input = 0, the copy of the

NFA at q0 will stay at q0.

The copy at q2 will stay at

q2. The NFA will then be

at states q0 and q2. For the

DFA, this is state q02.

If input = 1, the copy of the

NFA at q0 will be at states

q0 and q1. The copy at q2

will stay at state q2. The

NFA will then be at states

q0, q1, and q2. For the

DFA, this is state q012.

* Property of STI

Page 18 of 21

from q0 had been analyzed,

the transition function will be

0

q0

q01

q01

q0

q012

q02

q02

q012

q02

q012

q0

q1

q2

q12

q012

qdead

and qdead are not reachable

from state q0.

These can

therefore be removed from the

transition table.

* Property of STI

Page 19 of 21

then be

0

q0

q0

q01

q01

q0

q012

q02

q02

q012

q012

q02

q012

equivalent DFA is

of

the

1

q0

q01

q012

0

1

q02

* Property of STI

Page 20 of 21

Additional Exercise

for the following NFA.

0, 1

q0

q1

q2

* Property of STI

Page 21 of 21

- Problem Set 1 (theory of automota)Uploaded bymahesh
- Essay 1 Are Culture and Language Separable? - 2Uploaded byBruno Braga
- Appendix B. 2-Way Finite AutomataUploaded bykims3515354178
- Harrafi_MCompSc_S2015Uploaded bybalaji vignesh.k
- MELJUN CORTES Automata Lecture Designing Finite Automata 1Uploaded byMELJUN CORTES, MBA,MPA
- AUDIOLINGUAL METHODapril 9Uploaded byWilma Villacis
- A Deter Minis Tic Finite Automaton Will Have a Single Possible Output for a Given InputUploaded byujjal_1971
- context fre grammerUploaded byKibru Gebremichael
- Lecture 2Uploaded byDj3n3rgY
- Toc Queston PaperUploaded byRajashri Sadafule
- LinguaggiFormaliUploaded bycippo14
- 301 Lecture 23Uploaded byZed Lytle
- s30 Pumping LemmaUploaded byama2amal
- sols_4Uploaded byrajpoot
- KTH - Safe & Reliable Computer Control Systems Concepts and MethodsUploaded byJuan Perez
- bishalUploaded bySunil Gupta
- Ge EndofyeartestUploaded bySol Ci
- Learning Journey 25Uploaded bykanchanabalaji
- Capitalization RulesUploaded byDaniel Villegas
- 2012 Maths H Unit 3 - Mock Paper Mark SchemeUploaded byIngrid Schwartz
- An Englishman in New YorkUploaded bymariusm13
- When Dead Tongues Speak[Uploaded byWillamy Fernandes
- The Effectiveness of Using Facebook on Developing Paragraph Writing Skills Among Al-Aqsa University English MajorsUploaded byEnal Emqis
- TranscriptUploaded byAlejandro Larios Paz
- 9-10 standardsUploaded byapi-332190133
- 4Uploaded byShweta Juneja
- Language and Knowledge in Everyday LifeUploaded byBrunoBogović
- MOE Upper-Intermediate.docxUploaded bySaile Ibarra
- TOPIC 2.pdfUploaded byJusto García Flores
- Annotated BibliographiesUploaded byNadia

- TCU 2019 Certificate Recognization SERVICE AWARD 5 YearsUploaded byMELJUN CORTES, MBA,MPA
- TCU 2018 Certificate of Recognition Outstanding FacultyUploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES TCU Evaluation Faculty TCU Taguig City 2nd Semester 2018 2019Uploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES TCU Evaluation Faculty TCU Taguig City 1st Semester 2018 2019Uploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES TCU Evaluation Faculty TCU Taguig City 2nd Semester 2017 2018Uploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES TCU Evaluation Faculty TCU Taguig City 1st Semester 2017 2018Uploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES TCU Evaluation Faculty TCU Taguig City 2nd Semester 2016 2017Uploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES TCU Evaluation Faculty TCU Taguig City 1st Semester 2016 2017Uploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES TCU Evaluation Faculty TCU Taguig City 2nd Semester 2015 2016Uploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES TCU Evaluation Faculty TCU Taguig City 1st Semester 2015 2016Uploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES TCU Evaluation Faculty TCU Taguig City 2nd Semester 2014 2015Uploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES TCU Evaluation Faculty TCU Taguig City 1st Semester 2014 2015Uploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES TCU 2019 Certificate Recognization SERVICE AWARD 5 years of TCU OSASUploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES TCU 2018 Certificate of Recognition Outstanding Faculty of TCUUploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES TESDA License NC III BookkeepingUploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES TESDA License NC II CSS Computer Systems ServicingUploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES TESDA TM 1 2016 Trainer's Methodology IUploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES TESDA Data Encoder Eligibility 2Uploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES TESDA Data Encoder Eligibility 1Uploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES TESDA License NC II PC OperationsUploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES TESDA License NC I Data EncoderUploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES TESDA License NC I TechnicianUploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES TESDA 2009 Tm Am Trainers AMUploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES TESDA 2009 CHS NC II 392 Hours Certificate of Training Computer Hardware ServicingUploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES TCU OSAS 2019 Certificate Recognization SERVICE AWARD 5 YearsUploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES TCU 2018 Certificate of Recognition Outstanding Faculty - TEACHERUploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES IBM COGNOS Certified 2013Uploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES IBM Training Certificate DATA WareHousingUploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES IBM Training Certificate BIG DATAUploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES IBM Training Certificate Predictive AnalyticsUploaded byMELJUN CORTES, MBA,MPA

- Cs73 Solved Assignment Ignou 2012Uploaded byraghu_sharma_26
- SdpUploaded byAfeefa
- engineering-managers-guide-design-patterns.pdfUploaded byRicardo Dantas
- Finite AutomataUploaded byaayush_shrut
- Formal Methods and Requirement ring QabUploaded byKarpagam Kj
- Auto Skrip tUploaded byMuhammad Waqas
- Structured ProgrammingUploaded bykumar83ashok
- Features of OOPUploaded bysaurabhkaku
- Zbook.pdfUploaded byMaria Johnson
- unit 1Uploaded bycourageouscse
- cmu05Uploaded byDeion Liew
- CT Lecture 8-PDAUploaded byEllie Ng
- cs402MidtermSolvedMCQsWithReferencesbyMoaaz(1)Uploaded byGhufran Asif
- Formal Methods for Service CompositionUploaded byOshane Bailey
- week.3Uploaded bytamirat
- Queues DequeUploaded bycuteblackeyes
- Papers CsUploaded byALEX
- Rajib Mall Lecture NotesUploaded byAnuj Nagpal
- Copy of Solution1Uploaded bygautham Raj p
- SDLC & STLCUploaded byPrakash Bijalwan
- 106101002Uploaded byHarsh Vardhan Pundhir
- MC0082 SyllabusUploaded byvishaldream
- Software Engineering Chapter (10)Uploaded byalwaysharsha
- oop quizUploaded bymardocheo
- What Happened to Formal MethodsUploaded byAlistair Atkinson
- Formal Lang and Automation TheoryUploaded byShivank Agarwal
- Tutorial JflapUploaded byMatt Cristo Vive Morales
- RE to NFAUploaded byAditya Varun
- Programming LanguagesUploaded byKamal Markam
- Automata TheoryUploaded byChristopherLim

## Much more than documents.

Discover everything Scribd has to offer, including books and audiobooks from major publishers.

Cancel anytime.