Comp 285: Theory of Computation
Daily Homework Assignment 1
Due Friday January 17, 2014
Name:_
Grade: _/10
Staple this assignment sheet to your solutions
1.
S
Using induction on the size of S prove 2 S = 2 for a finite set S. That is the cardinality
of th
Comp 285: Theory of Computation
Daily Homework Assignment 15
Due: Friday March 7, 2014
Name:_
Grade: _/10
Construct npdas that accept the following languages. Write down either the quintuples that
describe the npda or use JFLAP. Be sure to test that you n
Comp 285: Theory of Computation
Daily Homework Assignment 14
Due: Monday March 3, 2014
1a.
Name:_
Grade: _/10
Convert the following grammar into Chomsky Normal Form
S aaAB | BAbb
A bAB | BAa | b
B BAa | bAB | a
1b.
Convert the same grammar to Geribach nor
Comp 285: Theory of Computation
Daily Homework Assignment 12
Due: Friday February 21, 2014
Name:_
Grade: _/10
In questions 1 3 below find context free grammars for the following languages
1.
L = cfw_anbm | 1 n m+3
2.
L = cfw_anbm | 2n m 3n
3.
L = cfw_anww
Comp 285: Theory of Computation
Daily Homework Assignment 13
Due: Wednesday February 26, 2014
1.
Name:_
Grade: _/10
Eliminate all useless production from
S a | aA | B | C
A aB |
B Aa
C cCD
D ddd
2.
Eliminate all -productions from
S AaB | aaB
A
B bbA |
3
Comp 285: Theory of Computation
Daily Homework Assignment 11
Due: Wednesday February 12, 2014
Name:_
Grade: _/10
Write up carefully the following
1.
Using the Pumping Lemma prove that the language L = cfw_anblak | k n + l is not regular.
2.
Using the Pump
Comp 285: Theory of Computation
Daily Homework Assignment 10
Due: Monday February 10, 2014
Name:_
Grade: _/10
1. Using the construction in Theorem 4.1 construct ndfas that accept
a. L(a + b)a*) L(baa*)
b. L(ab*a) L(a*b*a)
2. Using the facts that if L1 and
Comp 285: Theory of Computation
Daily Homework Assignment 4
Due Monday January 27, 2014
Name:_
Grade: _/10
Staple this assignment sheet to your solutions
1.
Construct dfas for the following languages
a.
L = cfw_ab3wb2 | w cfw_a,b*
b.
L = cfw_w | na(w) mod
Comp 285: Theory of Computation
Daily Homework Assignment 5
Due Wednesday 29, 2014
Name:_
Grade: _/10
1. For the ndfa on the left find the
following sets
a.
*(q0, 1011)
b.
*(q0, 10)
c.
*(q1, 01)
2.
Design an ndfa with no more than five states that accepts
Comp 285: Theory of Computation
Daily Homework Assignment 3
Due Friday January 24, 2014
Name:_
Grade: _/10
Staple this assignment sheet to your solutions
1.
Which strings are accepted by the following dfa whose alphabet is = cfw_a, b, c
a.
aaccba
b.
bccab
Comp 285: Theory of Computation
Daily Homework Assignment 9
Due: Friday February 7, 2014
Name:_
Grade: _/10
1. Using the construction technique of Theorem 3.3 construct a dfa that accepts the language
generated by the right linear grammar whose production
Comp 285: Theory of Computation
Daily Homework Assignment 7
Due Monday Feb 3, 2014
Name:_
Grade: _/10
Give Regular Expression for the following languages
1. L1 = cfw_vwv | v, w cfw_a,b* and |v| = 2
2. L2: all strings w * = cfw_0, 1* with an even number of
Comp 285: Theory of Computation
Daily Homework Assignment 8
Due: Wednesday February 5, 2014
1,
Name:_
Grade: _/10
Using the rex-to-ndfa construction construct an ndfa which accepts the language
L(a + b)* b (a + bb)*)
1b.
Now construct an equivalent ndfa h
Comp 285: Theory of Computation
Daily Homework Assignment 2
Due Wednesday January 22, 2014
Name:_
Grade: _/10
Staple this assignment sheet to your solutions
1.
Give the production rules for a grammar over the alphabet = cfw_a,b the generates the
following
Comp 285: Theory of Computation
Daily Homework Assignment 6
Due Friday January 31, 2014
Name:_
Grade: _/10
1.
Using the ndfa-to-dfa procedure convert the following ndfa to an equivalent dfa
2
Using the ndfa-to-dfa procedure convert the following ndfa to a