61 Practice Final Solutions

61 Practice Final Solutions - Handout#61 June 2 2010 CS103...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Handout #61 CS103 June 2, 2010 Robert Plummer Practice Final Solutions FINITE AUTOMATA 1. (5 points) Let L be the following language: L = { w | w {0, 1}* and the number of 0's in w is divisible by 2 and the number of 1's in w is divisible by 3} . Draw a state diagram for a DFA whose language is L. 2. (5 points) Draw a state diagram for an NFA over {0, 1}that accepts strings that consist of either 01 followed by 01 repeated zero or more times or 010 followed by 010 repeated zero or more times. For example, acceptable strings would include 01, 010101, and 010010. 0 0 0 0 0 0 1 1 1 1 1 1 0 1 0 1 0 0 0
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 REGULAR EXPRESSIONS and REGULAR LANGUAGES 3. (15 points) There are three parts to this question. Let A = (Q, , , , {q f }} be an NFA such that there are no transitions into q 0 and no transitions out of q f . Decsribe the language accepted by each of the following modifications of A, in terms of L = L(A): (a) The automaton constructed from A by adding an -transition from q f to q 0 . LL*, which is L + . (b) The automaton constructed from A by adding an -transition from q 0 to every state reachable from q 0 (along a path whose labels may include symbols from as well as ). The set of suffixes of strings in L. (c) The automaton constructed from A by adding an
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

61 Practice Final Solutions - Handout#61 June 2 2010 CS103...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online