CS381 First Mid Term Solutions Fall 2005 1. Let ( ) 1 1 1 01 1 , , , , M Q q F δ = Σ and ( ) 2 2 2 02 2 , , , , M Q q F = Σ be finite automata. Construct a finite automaton M that accepts the language ( ) ( ) 1 1 2 2 L M L M I . ( ) 1 2 1 2 , , , M Q Q F F = × Σ × where [ ] ( ) ( ) ( ) , , , , , q p a q a p a = 2. Write a regular expression denoting the set of all strings of 0’s and 1’s such that every 1 is immediately preceded by at least two consecutive 0’s. Suggestion: To make sure your answer is correct ask your self some simple questions such as does your expression work for strings with an even number of 1’s, an odd number of 1’s, short
This is the end of the preview.
access the rest of the document.
Regular expression, Nondeterministic finite state machine, Automata theory, Mid term Solutions, finite automaton, language L1