Is the union of a non-regular and a regular language regular? I am studying Automata and stuck in a question that says:
Is the following a regular set {a^p, where p is prime} U {even-length strings}?

As we see here this language consists of two sub-languages. The left side one is infinite, and by using prove by pumping lemma, we will wind up that it is not regular.
However, the  right side one is also infinite but we can build the fsa for it and the regular expression is ((0+1)(0+1))*. So, it regular language.

What I stuck in is that When we Union regular language with non-regular language what is the the final result will be????

From the OR truth table it says to return TRUE value, either of them TRUE or both.
There is no simple rule.

Consider the languages


$L_1 = \{ a^n b^n \mid n \geq 0\}$,
$L_2 = \{ b^n \mid n \geq 0 \}$, and
$L_3 = \{ a^n b^m \mid n,m \geq 0 \}$.


Clearly, $L_2$ and $L_3$ are regular while $L_1$ is not. Furthermore,


$L_1 \cup L_2$ is not regular but
$L_1 \cup L_3$ is.


Therefore, you will have to look more closely at the language at hand and maybe try to proof both claims. Our reference material can help you get started; feel free to post any specific questions about your attempts as new questions.