I have the following languages:
$ L_1 = (P \cup \{b\})^*$
$P = \{a^p | p = prime\}$ for example $ \{aa, aaa, aaaaa\} $
I am told that $L_1$ is regular and thus I should be able to create a finite automata for it, correct? But since $P$ cannot possibly be regular how can I draw this $union$ ?
This is what I have so far:
The $\{b\}$ part is fairly straight forward, but I am stuck on how to represent $P$
For example a valid string could be $\epsilon$, $bb$ or $aab$ but since I cannot keep track on how many a's we have gone trough so far how could I possible make a finite automata out of it? or would $aab$ be a invalid string and the regular expression of the whole thing would simply be $b^*$?
Given
$$L = (P \cup \{b\})^*, \quad P = \{a^p \mid p \text{ is prime}\}$$
you want to show that $L$ is regular.
Hint:
I hope this helps $\ddot\smile$