Tutorial 2
Thapar Institute of Engineering and Technology Patiala
Computer Science and Engineering Department (CSED)
1. Write down a R.E. over {0, 1} such that no. of 1’s are divisible by 4.
2. Write down a regular expression for language L over {a, b, c} such that every string in L
contains a substring ccc.
3. Write down a R.E. for the language L={w: | w | mod 5=0}, w (a, b) }
4. Write down a R.E. over alphabet = {a, b, c} containing at least one a and at least one b.
5. Write the Regular expression for the language of all even length strings defined over
= {a, b}.
6. Write the Regular expression for the language of all even length strings defined over
= {a, b}.
7. Write the Regular expression for the language L = {a nb m | n, m 1} over = {a, b}.
8. Write the Regular expression for the language L = {a nb m | n, m 0} over = {a, b}.
9. Write down a R.E. over {0, 1} whose fifth symbol from the right end is 1.
9. Design the DFA for the problem given in Q1-8.