# regular expression theory [3]

Hello Experts,

I've got two statements concerning theorems about regular expressions:

If L1 is regular, then L1  U  L2 is regular for any language L2.

If L1 and L2 are not regular, then L1 \ L2  [L1 intersection L2]   is not regular.

is any of these statements true ?
if not , can anyone explain me why ?

Thanks in advance for any assistance !
###### Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Commented:
Consider whether the empty language is regular
Commented:
Look at the properties of Regular Expressions.

- An empty set is a regular expression
- If L1 is regular and L2 is regular, then so is the disjunction, if only L1 is regular then we can't say if L2 is unknown.
- Third, we know that for all a there's an alphabet of symbols

So.. the first statement is only true if L2 is regular, otherwise it is false
The second statement, intersection, the opposite is true, If L1 and L2 are regular than so is L1 \ L2.

Perhaps the following link is useful: http://jonah.cs.elon.edu/sduvall2/courses/csc351/2007spring/Lectures/Prop.ppt

Experts Exchange Solution brought to you by