0
$\begingroup$

I have just started learning regular expressions and I don't have anybody around me to help me building conceptions. So I rely on online mediums. My question is whether every regular set corresponds a language.

I had a regular expression $(0+10^*)$ and I was trying to find the regular sets. My books suggests that $L=\{0, 1, 10, 100, 1000, 10000,\ldots\}$. But I was thinking why they did not consider the strings starting with $0$ and then only one $1$ and zero or more number of occurrences of $0$, like $010, 0100, 01000$ etc.

  1. Aren't these strings belong to $L$?
  2. Is this $L$ a language? (According to me, it is a language because it is the set of strings over $\{0,1\}$.
$\endgroup$
1
$\begingroup$

A regular language $L$, is a set over the alphabet $\Sigma$ (that is, $L\subseteq \Sigma^*$) that has a regular expression that generates it. Therefore, by definition - any language of a regular expression is a regular language.

Regarding the language in question, $01$ for example is not generated by $(0+10^*)$, since it is not $0$ and also is not generated by $10^*$ (since it doesn't start with $1$). The same goes for any string starting with $0$, and has more than one letter in it.

$\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.