edited by
4,248 views
2 votes
2 votes
In certain programming languages, comments appear between delimiters such as $\text{/#}$ and $\text{#/}.$ Let $C$ be the language of all valid delimited comment strings. A member of $C$ must begin with $\text{/#}$ and end with $\text{#/}$ but have no intervening $\text{#/}.$  For simplicity, assume that the alphabet for $C$ is $\text{Σ = \{a, b, /, # \}.}$
a. Give a $DFA$ that recognizes $C.$
b. Give a regular expression that generates $C.$
edited by

1 Answer

0 votes
0 votes

Regular expression: /#(a + b + /+ #*a + #*b)*#/

Related questions

2 votes
2 votes
1 answer
1
admin asked Apr 21, 2019
8,156 views
Use the procedure described in $\text{Lemma 1.60}$ to convert the following finite automata to regular expressions.
0 votes
0 votes
1 answer
2
admin asked Apr 21, 2019
6,342 views
Use the procedure described in $\text{Lemma 1.55}$ to convert the following regular expressions to non-deterministic finite automata.$(0\cup 1)^{*}000(0\cup 1)^{*}$$(((0...
0 votes
0 votes
0 answers
3
admin asked Apr 21, 2019
641 views
Using the solution you gave to question $25,$ give a formal description of the machines $T_{1}$ and $T_{2}$ depicted in question $24.$