Question: Q2. Select the regular expression based on your roll number, (4) take modules of your roll number (4) by 10 and select the relevant option.

Q2. Select the regular expression based on your roll number, (4) take modules of your roll number (4) by 10 and select the relevant option.

1. ([a-zA-Z]+ ( |\t)+ [a-zA-Z])+

2. (_|__)*(a|b)?ab

3. 0?(.)+(0|1)

4. ab+b(1|0)?

5. (--|++) (0)?.(0-9)

6. a*b(1|0)?

7. (_|@)?(a|b)b

8. *?(x|y)\+*

9. (0-9)+\(0-9)+\(0-9)+

10. [a-zA-Z]+(_)*(0-9)+

Write down your selected regular expression and the calculation you did.

a-Draw the corresponding NFA (Non-Deterministic Finite Automata) diagram using the Thompson construction method. Show all steps for full credit.

b-Transform the given -NFA to DFA (Deterministic Finite Automata), using Subset construction. Show all steps for full credit.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!