Question: Problem 2.2: [Homework: Due Weds, 31 January, 12:45] When processing a stream of symbols such as the stream of ascii symbols in source code, there

 Problem 2.2: [Homework: Due Weds, 31 January, 12:45] When processing a

Problem 2.2: [Homework: Due Weds, 31 January, 12:45] When processing a stream of symbols such as the stream of ascii symbols in source code, there is a need to recognize tokens. These are substrings, special sequences of symbols such as while. The stream of symbols in the source code for example needs to be recognized as a stream of tokens. This task is known as lexical analysis. Lexical analysis is a task that basic finite state machines can perform. The NFA below recognizes - synonymously, accepts only the three strings over the alphabet (a, b, c]: ac, ab and bc. The states are named by the numbers 0, 1, 2, 3, 4, 5, 6 0 2 Use the given NFA to obtain an NFA that accepts all and only those strings over the alphabet [a, b, c, d) that contain as substrings the strings ac, ab and bc. So cbadc would not be accepted, but cbacd would be accepted because ac is not a substring of cbadc but is a substring of cbacd Apply the subset construction to obtain a DFA from your NFA Next, use your DFA to obtain a DFA that accepts all and only those strings over the alphabet a, b, c, d) that do not contain as substrings any of the strings ac, ab and bc

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!