Question
Design a DFA to recognize identifiers defined as follow: - identifier name can be any combination of letters and decimal digits as long as the
Design a DFA to recognize identifiers defined as follow:
- identifier name can be any combination of letters and decimal digits as long as the
total number of letters is greater than the total number of digits
- identifier token may start with white spaces and it is always followed by one white
space
- the DFA should report whether the input is a valid identifier or error otherwise
Example:
x12y error
xy12z ok
12yyy ok
If you have done it, skip the rest. If you think this cannot be done, explain why and
then assume that the total length of a token cannot be more than 3 characters
(excluding white spaces) - redo the problem now or argue why it cannot be done.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started