1
$\begingroup$

If I have DFA accepting

$\{w \in \{a,b\}^*$ s.t. on every odd position in $w$ there is a $b\}$

Would the empty word be accepted? Also, would the word $eb$ be accepted?

$\endgroup$
1
$\begingroup$

The empty word belongs to the language, since on all its odd positions -- all zero of them -- we find a $b$.

$eb$ does not belong to $\{a,b\}^*$, hence it does not belong to the language.

| cite | improve this answer | |
$\endgroup$
  • $\begingroup$ Why does eb not belong to the language? Apologies if I wasn't clear, I'm denoting the empty word by e. $\endgroup$ – user79878 Nov 10 '17 at 22:38
  • $\begingroup$ @Leonhard You can simply write it as $b$, then. In such case, it depends on whether "positions" start counting from 1 or from 0. I'd guess from 1 (but it really depends on the convention): if so, that $b$ does belong to the language. $\endgroup$ – chi Nov 10 '17 at 22:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy