Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

For the language $\{w \mid w \in \Sigma^*, w \neq \lambda\}$, is the following regular expression correct?

$(a+b)^+$ . Which is $(a+b)$ to the power of $+$ which I think accepts all combinations of $a$ and $b$ except for the empty string.

Can someone please confirm?

share|cite|improve this question
Sorry, that was a typo. I've fixed the question except I don't know what the format is for the not equal to symbol. So, you can read that as w is not equal to the empty string. – zeqof Oct 18 '12 at 7:24
You are correct. – martini Oct 18 '12 at 7:28

yes it is correct (assuming that Σ={a,b} )

share|cite|improve this answer

Some people don't allow $r^+$ in their definition of regular expressions, in which case you'd have to settle for using $(\mathtt{a}+\mathtt{b})(\mathtt{a}+\mathtt{b})^*$, but otherwise, I'd agree with May: you got it.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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