{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

notes05 Equivalence of DFA and NFA

notes05 Equivalence of DFA and NFA - CS 373 Theory of...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 373: Theory of Computation Gul Agha Mahesh Viswanathan Fall 2010 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
NFA vs. DFA Expressive Power of NFAs and DFAs Is there a language that is recognized by a DFA but not by any NFAs? No! Is there a language that is recognized by an NFA but not by any DFAs? No! Main Theorem Theorem 1. A language L is regular if and only if there is an NFA N such that L ( N ) = L . In other words: For any DFA D , there is an NFA N such that L ( N ) = L ( D ) , and for any NFA N , there is a DFA D such that L ( D ) = L ( N ) . 2 NFAs for Regular Languages Converting DFAs to NFAs Proposition 2. For any DFA D , there is an NFA N such that L ( N ) = L ( D ) . Proof. Is a DFA an NFA? Essentially yes! Syntactically, not quite. The formal definition of DFA has δ DFA : Q × Σ Q whereas δ NFA : Q × ∪ { ± } ) → P ( Q ). For DFA D = ( Q, Σ D ,q 0 ,F ), define an “equivalent” NFA N = ( Q, Σ N ,q 0 ,F ) that has the exact same set of states, initial state and final states. Only difference is in the transition function. δ N ( q,a ) = { δ D ( q,a ) } for a Σ and δ N ( q,± ) = for all q Q . 3 NFAs recognize Regular Languages 3.1 Simulating an NFA Simulating an NFA on Your Computer NFA Acceptance Problem Given an NFA N and an input string w , does N accept w ? How do we write a computer program to solve the NFA Acceptance problem?
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 7

notes05 Equivalence of DFA and NFA - CS 373 Theory of...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon bookmark
Ask a homework question - tutors are online