0
$\begingroup$

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?

$\endgroup$
  • $\begingroup$ I guess you intend to write $w\in \{a,b\}^5$ (with a comma)? $\endgroup$ – Hendrik Jan May 29 at 21:40
  • $\begingroup$ If you know that you can write a regular expression, then it is not necessary to explicitly to write it down? $\endgroup$ – Hendrik Jan May 29 at 21:42
1
$\begingroup$

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)

| cite | improve this answer | |
$\endgroup$
0
$\begingroup$

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

| cite | improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.