DFA for accepting strings starting and ending with same symbol.

798 Views Asked by At

In a previous exam in my college, I had a question to construct Regular Expression for DFA starting and ending with the same symbol. My question is, Should it accept \epsilon in its language?

1

There are 1 best solutions below

0
On

If the exam question was stated as you say in your question, without giving you the DFA, then the question is not clear.

But if the question was accompanied by a DFA(a drawing of it or its definiton), then you had to 'run' the DFA with $\epsilon$ as input and if the DFA accepts $\epsilon$, then the regular expression should accept it too. Otherwise the regular expression should not accept it.