Log In
0 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.$
in Theory of Computation 298 views

1 Answer

0 votes

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

Related questions

0 votes
0 answers
0 votes
1 answer
A $\text{finite state transducer (FST)}$ is a type of deterministic finite automaton whose output is a string and not just accept or reject. The following are state diagrams of finite state transducers $T1$ and $T2.$ Each transition of an $FST$ is labeled with two symbols, one designating the input ... 2}$ on input bbab}$ g. $\text{$T_{2}$ on input bbbbbb}$ h. $\text{$T_{2}$ on input $\epsilon$}$
asked Apr 22, 2019 in Theory of Computation Lakshman Patel RJIT 145 views