1. Is every language with a finite number of strings regular?
  2. Is the language of all strings regular?

I am new to this topic and got confused. Can any one please help me with this?

  • 4
    $\begingroup$ These are, in fact, the most trivial examples of regular languages (empty language aside) and you should find them in any book on the subject. $\endgroup$ – Karolis Juodelė Feb 14 '13 at 15:36
  • $\begingroup$ @abc13 A.Schulz answered the question, you should mark is as answered. $\endgroup$ – mrk Feb 14 '13 at 17:52
  1. Yes. Assume the language is $L=\{w_1,w_2,\ldots, w_n\}$. then you can form the regular expression $w_1 + w_2 + \cdots + w_n$, which describes $L$.

    You can also argue with finite automata or regular grammars.

  2. Yes, if your alphabet is $\Sigma=(a_1,\ldots,a_k)$ then the regular expression $(a_1+a_2+\cdots +a_k)^*$ describes the languages of all possible strings over $\Sigma$.

| cite | improve this answer | |

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.