L2

Reviews
Shared by: Honey Singh
Categories
Tags
Stats
views:
46
rating:
not rated
reviews:
0
posted:
11/12/2007
language:
pages:
0
Non-deterministic FA (NFA) • For each state, zero, one or more transitions are allowed on the same input symbol. • An input is accepted if there is a path leading to a final state. An Example of NFA In this NFA (Q,,,q0,F), Q = {q0,q1,q2},  = {0,1}, F = {q2} and  is: Start 1 q1 1 0 0 OR States q0 q1 q2 Inputs 0  {q1 } {q0 } 1 q0 1 q2 {q1,q2} {q2 }  Note that each transition can lead to a set of states, which can be empty. Language of an NFA Given an NFA M, the language recognized by M is the set of all strings that, starting from the initial state, has at least one path reaching a final state after the whole string is read. Consider the previous example: For input “101”, one path is q0q1q1q2 and the other one is q0q2q0q1. Since q2 is a final state, so “101” is accepted. For input “1010”, none of its paths can reach a final state, so it is rejected. More Examples of NFA a Start q0 q1 b q2 0-9 b 0-9 q6 0-9 b 0-9 0-9 q1 0-9 . q3 q4 0-9 E q5 Start q0 0-9 0-9 +,- +,q2 0-9 q7 0-9 Class Discussion Consider the language L that consists of all the strings over  = {0, 1} such that the third last symbol is a “1”. (a) Construct a DFA for L. (b) Construct an NFA for L. Is NFA more powerful than DFA? DFA and NFA Is NFA more powerful than DFA? NO! NFA is equivalent to DFA. Trivial DFA Constructive Proof NFA Constructing DFA from NFA Given any NFA M=(Q,,,q0,F) recognizing a language L over , we can construct a DFA N=(Q’, ,’,q0’,F’) which also recognizes L: • Q’ = set of all subsets of Q e.g., if Q = {q0, q1}, Q’ = {{}, {q0}, {q1}, {q0, q1}} • q0’ = {q0} • F’ = set of all states in Q’ containing a final state of M • ’({q1,q2, … qi}, a) = (q1,a)  (q2,a) ...  (qi,a) a state in N a state in N An Example of NFA  DFA Consider a simple NFA: 0 0 1 q1 Start q0 1 1 Construct a corresponding DFA: Start {q0} 1 1 {q1} 0 {q0, q1} 0 {} 1,0 1,0

Shared by: Honey Singh
About
Honey is a zealous web and graphics designer (currently working with media redefined ) having a creative and devouring gumption with an experience of over 3 years in Interactive Designing , Blogging and Web technologies.
Other docs by Honey Singh
What Mr.Buffett learned from Graham
Views: 1290  |  Downloads: 135
Warren Buffett_27s Invisible Empire
Views: 1122  |  Downloads: 91
Under Warren Buffett_27s Big Top
Views: 734  |  Downloads: 48
The Warren Buffett You Don_27t Know
Views: 992  |  Downloads: 104
The Best Advice I ever Got
Views: 6490  |  Downloads: 376
9 investing secrets of Warren Buffett[2]
Views: 1132  |  Downloads: 149
UNIX[3]
Views: 908  |  Downloads: 44
Thinking in java 2nd edition
Views: 1285  |  Downloads: 69
network programming
Views: 706  |  Downloads: 37
Kevs-php-mysql[1]
Views: 13064  |  Downloads: 65
Googles Backdoor
Views: 452  |  Downloads: 19
Google Hacking 101
Views: 14603  |  Downloads: 338
Google Hackers Guide
Views: 8469  |  Downloads: 261
Google Anatomy
Views: 1581  |  Downloads: 195
Beej_27s Guide to Network Programming
Views: 509  |  Downloads: 19
Related docs
test L2
Views: 10  |  Downloads: 0
draft resolution l2
Views: 3  |  Downloads: 0
L2
Views: 0  |  Downloads: 0
l2
Views: 44  |  Downloads: 1
L2- Instructions and#2B860A
Views: 0  |  Downloads: 0
L2 Picasso
Views: 55  |  Downloads: 0
Intro to Control Self Assessment _L2_
Views: 0  |  Downloads: 0
Book 1 L2
Views: 1  |  Downloads: 0
ESL AND Virtual Worlds
Views: 239  |  Downloads: 9
Book 1 L2
Views: 0  |  Downloads: 0