- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP

- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who

Regular expression is the language which is used to describe the language and is accepted by finite automata. Regular expressions are the most effective way to represent any language. Let Σ be an alphabet which denotes the input set.

The regular expression over Σ can be defined as follows −

- Φ is a regular expression which denotes the empty set.
- ε is a regular expression and denotes the set { ε} and it is called a null string.
- For each ‘a’ in Σ ‘a’ is a regular expression and denotes the set {a}.
- If r and s regular expressions denoting the language.
- L1 and l2 respectively then,
- r+s is equivalent to L1 U L2 union
- rs is equivalent to L1L2 concatenation
- r* is equivalent to L1* closure

The r* is known as Kleen closure or closure which indicates occurrence of r for an infinite number of times.

Write the regular expression for the language accepting all combinations of a's, over the set l: = {a}

All combinations of a's means that a may be zero, single, double and so on. If a is appearing zero times, that means a null string. That is, we expect the set of {E, a, aa, aaa, ....}. So we give a regular expression for this as follows −

R = a*

That is Kleen closure of a.

Write the regular expression for the language accepting all combinations of a's except the null string, over the set l: = {a}

The regular expression has to be built for the language L = {a, aa,aaa, ....}

This set indicates that there is no null string. So, we can denote regular expression as follows −

R = a+

Write the regular expression for the language L over l: = {O, l} such that all the strings do not contain the substring 01.

The Language is as follows −

L = {E, 0, 1,00, 11,10,100,.....}

The regular expression for the above language is as follows −

R = (1* O*)

Write the regular expression for the language containing the string in which every 0 is immediately followed by 11.

The regular expectation will be: R = (011+ 1)*

- Related Questions & Answers
- Construct the Regular expression for the given languages.
- Find out the Regular expression for the given finite automata
- Construct a Finite Automata for the regular expression ((a+b)(a+b))*.
- Explain the Java regular expression construct "re?".
- Find the regular expression for the given Finite automata with state elimination method
- What are the identity rules for regular expression?
- Construct NFA with Epsilon moves for regular expression a+ba*.
- Construct a pair of languages by using CFG
- What are the closure properties of Regular languages?
- Regular Expression "[^...]" construct in Java
- C++ Program to Construct an Expression Tree for a given Prefix Expression
- C Program to construct DFA for Regular Expression (a+aa*b)*
- Construct the minimum DFA for any given finite automata.
- Regular Expression "\d" construct in Java
- Regular Expression "\A" construct in Java

Advertisements