Question: Exercise 1. (a) Write a regular expression for strings (or sentences) over the alphabet {a,b}, that start and end with the same letter, that is,

Exercise 1. (a) Write a regular expression for strings (or sentences) over the alphabet {a,b}, that start and end with the same letter, that is, either a 's or b 's. For example, strings abba,aa,babab should be in the regular set defined by the regular expression. (b) Draw a DFA for the above set. (c) Implement the DFA of (b) in Java. As the hint, the following is the code for a DFA for recognizing string "ing". The final state is 3 and in this state it prints a message "Accepted". The print out statement is not shown
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
