
CS 330 Homework 2 – FA and Regex
Give solutions to the problems listed below. Your automata diagram should be legible with clearly labeled paths and states. preferrable created by using software tools such FSMD by Evan Wallace. Use software to complete this HW, save as PDF, and submit on Moodle. by 10 PM Monday (2/5).
- The following is a state diagram for a Finite Automata. Answer the following questions:
- What is the start state and the set of accept states? (4)
- Draw the computing tree for the string 011011. Is it accepted and why? (10)
- For each of the following languages on alphabet ∑ = {0, 1}, give two strings that are member and two that are NOT. (8X2=16)
- 0*1+0*
- ∑*00∑*
- Give regular expressions for each of the following languages where ∑={0, 1}. (3x10=30)
- Words where every 1 is followed by one or more 0s.
- Words that contain exactly two 0s and two 1s.
- Words where the first digit is different from the last one.
- Give FA (either DFA or NFA) on alphabet {0, 1} that represents/recognizes for the following languages. Do any 5 of the 6. (5X8 = 40 points)
- The language containing words where every 1 is followed by one or more 0s.
- The language containing words where the first digit is different from the last one.
- The complement of A (i.e., the language described in A).
- Reverse of A
- Union of A and B
- Intersect of A and B