Regular Expression in Finite Automata -


i need explanation of regular expression of :

all strings of {a,b} not contain 2 or more consecutive a's.

the regex described should not generate string has "aa" substring.

  1. if have finite automata can convert regex using algorithm state elimination: (here youtube link)

fa regular expression

  1. if want direct regex following work: left part covers ends b along empty string. right 1 covers ends a.

( (ab + b)* + ((ab + b)* a) )


Comments

Popular posts from this blog

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

python 2.7 - Lines in my code being skipped and I am not sure why -

python - multiprocessing pool with map -