World's most popular travel blog for travel bloggers.

[Answers] NFA to accept strings where the third AND the third-last element are b

, , No Comments
Problem Detail: 

Alphabet is {a,b}, the third element from the start must be "b" (e.g: aab..., abb...) and the third-last element must also be "b" (e.g: ...baa, ...bbb). I can do them separately but at the same time I don't know where to start. Help please.

Asked By : Marx Guimarães

Answered By : J.-E. Pin

Hint. If $A$ is the alphabet, a regular expression for your language is $AAbA^*bAA \cup AAbAA \cup AbbA \cup bAb$.

Best Answer from StackOverflow

Question Source :

3.2K people like this

 Download Related Notes/Documents


Post a Comment

Let us know your responses and feedback