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

java - SSE Emitter : Manage timeouts and complete() -

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

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -