[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: OT: regular expression question



On Dec 08 2000, Hubert Chan wrote:
> Oops.  There should be a "| \epsilon" at the end of that (where
> \epsilon is the empty string) if you count the empty string as a
> palindrome.  If not, then you should add "| aa | bb".

	No, it's not the same thing. The former language generated by
	the grammar with the production S -> \varepsilon has the empty
	string, while, if you substitute it by S -> aa | bb, then your
	new language does not contain \varepsilon.


	[]s, Roger...

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  Rogerio Brito - rbrito@iname.com - http://www.ime.usp.br/~rbrito/
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=



Reply to: