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 Answer 1

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.

$\endgroup$
2
  • $\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
    Commented Nov 10, 2017 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
    Commented Nov 10, 2017 at 22:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.