0% found this document useful (0 votes)
2 views1 page

Tutorial 2

The document is a tutorial from the Thapar Institute of Engineering and Technology, focusing on exercises related to regular expressions (R.E.) and deterministic finite automata (DFA). It includes tasks such as writing R.E. for specific conditions over different alphabets and designing a DFA for the problems presented. The exercises cover various aspects of formal languages, including divisibility, substrings, and string lengths.

Uploaded by

surendrabis49
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views1 page

Tutorial 2

The document is a tutorial from the Thapar Institute of Engineering and Technology, focusing on exercises related to regular expressions (R.E.) and deterministic finite automata (DFA). It includes tasks such as writing R.E. for specific conditions over different alphabets and designing a DFA for the problems presented. The exercises cover various aspects of formal languages, including divisibility, substrings, and string lengths.

Uploaded by

surendrabis49
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

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 odd length strings defined over
  {a, b}.
7. Write the Regular expression for the language L  {anbm | n, m  1} over   {a, b}.
8. Write the Regular expression for the language L  {anbm | n, m  0} over   {a, b}.
9. Write down a R.E. over {0, 1} whose fifth symbol from the right end is 1.

10. Design the DFA for the problem given in Q1-9.

You might also like