Pergunta

I have a language $$ L = \{ww^R, w \in \{ab\}^5\}$$

I know this is a regular language because it is finite (since w can only be of length 5). I want to prove it's a regular language, so I'd create a regular expression for it.

Theoretically, my regular expression could be the union of all strings in the language, but is there a concise way to express this rather than writing all possible strings out?

Foi útil?

Solução

Sticking $w$ with its reverse together usually is not a regular language and therefore there is no natural concise way to represent that using regular expressions (at least to my knowledge)

Im not really sure why you would like to find a regular expression for this language, since - as you have stated - this language is finite, and therefore regular (if you want a proof for this claim, it is here)

Outras dicas

There seems to be nothing better than enumerating all 32 strings, because of the connection between first and last, 2nd and 9th character etc.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a cs.stackexchange
scroll top