Homework 2 (MATH385, Fall 11)
(Due 09/09/11)
Problem 1 (2 points) Which of the strings 0001, 01001, 0000110 are accepted by the following dfa?
0 0 0
@ABC G GFED q0
1
@ABC GFED 89:; ?>=< q1
1
1
@ABC GFED q2
Problem 2 (2 points) Consider the set of str
Homework 2 (MATH/CS385, Fall 11)
- Solutions -
Problem 1 (2 points)
0001 and 01001 are accepted, but 0000110 is rejected.
Problem 2 (2 points)
(i)
@ABC
GFED
q3
y
0,1
0
@ABC
@ABC
G GFED k 0 C GFED
q0
q1
1
0
1
(ii)
@ABC
89:;
FED
G G?>=<
q2
@ABC
GFED k
q1
b
Homework 3 (CS/MATH385, Fall 11)
(Due 09/23/11)
Problem 1 (1 points)
Convert the nfa
@ABC
G GFED
q0
@ABC
89:;
FED
G G?>=<
q1
a
@ABC
G GFED
q2
to a dfa.
Problem 2 (2 points)
Convert the following nfa to an equivalent dfa:
@ABC
G GFED s
q0
1
0
,0
0
1
@ABC s
Sample Problems (CS/MATH385, Fall 11)
Problem 1
Let L be the language cfw_101, 0 over the binary alphabet.
(i) What is LL?
(ii) Describe the language L in words.
Problem 2
Let S1 = cfw_01, 10 and S2 = cfw_101, 0.
(i) Given a string S1 S2 (other than the n
Sample Problems (CS/MATH385, Fall 11)
Problem 1 Let L be the language cfw_101, 0 over the binary alphabet. (i) What is LL? (ii) Describe the language L in words. Solution. (i) L = cfw_101101, 1010, 0101, 00. (ii) L = cfw_101, 0 is the languages of all str