Examples of Regular Expression, Exercises of Theory of Automata

This note contains Example of Regular expression in Theory of Automata.

Typology: Exercises

2016/2017

Uploaded on 02/23/2017

RabiaKhalid
RabiaKhalid 🇵🇰

4.8

(4)

3 documents

1 / 8

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
pf3
pf4
pf5
pf8

Partial preview of the text

Download Examples of Regular Expression and more Exercises Theory of Automata in PDF only on Docsity!

For example if = = {a} and we have regular expression R = a®, then R is a set denoted by R = {e, a, aa, ana, aaaa, ...} That is R includes any number of a's as well as empty string which indicates zero number of a's appearing, denoted by € character. Similarly there is a positive closure of L which can be shown as L*. The L* denotes set of all the strings except the € or null string. The null string can be denoted eor* ” If E = {a} and if we have regular expression R=a* then R is a set denoted by R = {a, aa, aaa, aaaa, ....} We can construct L* as L* = e-Lt Let us try to use regular expressions with the help of some examples. ‘mp Example 3.1: Write the regular expression for the language accepting all combinations of a's over the set & ={a}. Solution : All combinations of a's means a may be single, double, tripple and so on. There may be the case that a is appearing for zero times, which means a null string. That is we expect the set of {e, a, aa, aaa, ...). So we can give regular expression for this as R= a That is kleen closure of a.