Quiz1-Sol - state B from state A, and then consume the last...

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

View Full Document Right Arrow Icon
COT 4210 Quiz #1 Solutions 9/1/2011 1. Give the formal definition of the DFA drawn below. Answer Q = { X, Y, Z} Σ = {a, b} q 0 = X F = {Y} δ a b X Y Z Y Z X Z Z Y 2. Draw a DFA that accepts strings over the alphabet {0, 1} that start with 00 or end with 11. (Thus, 0010101 and 01010011 are in the language, but 010001 is not.) Answer
Background image of page 1

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

View Full DocumentRight Arrow Icon
The key here is that A, B and C keep track of strings that start with 00. E keeps track of strings that didn’t start with 00 that currently end in a 1. D keeps track of strings that didn’t start with 00 that currently end in a 0, while F keeps track of strings that didn’t start with 00 that currently end in 11. 3. Draw an NFA that accepts strings over the alphabet {1, b} that have a as their fourth letter from the end. (Thus, abbb and bbabaa are in the language while aba and bbabaaa are not.) Answer In this NFA, when we arrive at the fourth to last character, if it’s an a, we can guess and move to
Background image of page 2
Background image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: state B from state A, and then consume the last three characters to end up at E. If the we dont jump from state A to B on the fourth to last character, we cant be accepted, and that jump can only occur if this character is an a, due to the transitions. 4. If an NFA has 20 states, what is the most number of states the corresponding equivalent DFA can have? Answer In the corresponding DFA, each state represents a subset of states from the NFA. Thus, the desired number is the maximum possible number of subsets of 20 items, which is 2 20 . Since the null state which corresponds to no possible output states doesnt need to be drawn in most cases, 2 20 1, will also be accepted....
View Full Document

This note was uploaded on 09/16/2011 for the course COT 4210 taught by Professor Staff during the Spring '08 term at University of Central Florida.

Page1 / 3

Quiz1-Sol - state B from state A, and then consume the last...

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