Question: In certain programming languages, comments appear between delimiters such as /# and #/. Let C be the language of all valid delimited comment strings. A
In certain programming languages, comments appear between delimiters such as /# and #/. Let C be the language of all valid delimited comment strings. A member of C must begin with /# and end with #/ but have no intervening #/. For simplicity, assume that the alphabet for C is Σ = {a, b, /, #}.
a. Give a DFA that recognizes C.
b. Give a regular expression that generates C.
Step by Step Solution
3.28 Rating (151 Votes )
There are 3 Steps involved in it
a Valid strings in C abababaaababa abababaa Strings not in C abba b defi... View full answer
Get step-by-step solutions from verified subject matter experts
