CSE 3321: Worksheet 5: Friday, February 6
.
1. Use the pumping lemma to show that the language cfw_wwr | w cfw_0, 1 is not regular. Reminder: wr s the reverse of w.
Solution: Assume to the contrary t
CSE 3321: Worksheet 8 : Monday, March 6
.
1. Let A = cfw_< R >: R is a regular expression describing a language containing at least one
string w that has 111 as a substring. Show that A is decidable.
CSE 3321: Worksheet 9: Monday, April 20
.
1. Determine if each language below is decidable or undecidable.
(a) A = cfw_ M : M is a Turing machine and M runs for more than 10 steps on some input.
Solut
CSE 3321: Worksheet 9: Monday, April 20
.
1. Determine if each language below is decidable or undecidable.
(a) A = cfw_ M : M is a Turing machine and M runs for more than 10 steps on some input.
(b) B
CSE 3321: Worksheet 10: Monday, April 27
.
1. Determine if each language below is decidable or undecidable.
(a) A = cfw_ G1 , G2 : G1 and G2 are CFGs and L(G1 ) L(G2 ).
(b) B = cfw_ M : M is a Turing
CSE 3321: Worksheet 10 Solutions: Monday, April 27
.
1. Determine if each language below is decidable or undecidable.
(a) A = cfw_ G1 , G2 : G1 and G2 are CFGs and L(G1 ) L(G2 ).
Solution: A is undeci
CSE 3321 Homework 4: Due Monday, March 9 at the beginning of
class
.
1. Let G be the grammar over the alphabet cfw_a, b, c with the following productions:
S aSbScS|aScSbS|bSaScS|bScSaS|cSaSbS|cSbSaS|
CSE 3321 Homework 3: Due Friday, February 13 at the beginning
of class
.
1. Let A = cfw_w cfw_0, 1 | 00 is not a substring of w. Prove that there is no language B
cfw_0, 1 such that B = A. (Hint: wri
CSE 3321 Homework 5: Due Friday, April 3 at the beginning of
class
.
1. Find a context-free grammar that generates cfw_ai bj : i j 3i/2, and prove that your answer
is correct.
Solution: S aSb |aaSbbb
CSE 3321 Homework 1: Solutions
1. If set A has a elements and set B has b elements, how many elements are in A B? Explain
your answer. (5 pts)
Solution: Every element in A is paired up with each of th
CSE 3321 Homework 2: Due Friday, February 6 at the beginning
of class
.
1. Each of the following languages is the complement of a simpler language. In each part,
construct a DFA for the simpler langua
CSE 3321: Worksheet 8 : Monday, March 6
.
1. Let A = cfw_< R >: R is a regular expression describing a language containing at least one
string w that has 111 as a substring. Show that A is decidable.
CSE 3321: Worksheet 7: Friday, March 6
.
1. Determine if each of the following languages is context-free:
(a) cfw_an bn am bm : n, m 0
(b) cfw_am bn am bn : n, m 0
(c) cfw_an bn an bn : n, m 0
1
2. Us
CSE 3321: Worksheet 7: Friday, March 6
.
1. Determine if each of the following languages is context-free:
(a) L = cfw_an bn am bm : n, m 0
Solution: This is context-free. Proof: Let L1 = cfw_an bn : n
CSE 3321 Worksheet 2: Friday, January 16
1. What is the value of
Solution:
42!
2!40!
=
42
2
4241
2
?
= 861
2. List all strings of length three over the alphabet = cfw_a, b.
Solution: aaa, aab, aba, ab
CSE 3321: Worksheet 3: Wednesday, January 21
. Construct state diagrams of DFAs for each of the languages below. Each language is over the
alphabet cfw_0, 1.
1. cfw_11, 10, 01
2. cfw_w | the length of
CSE 3321: Worksheet 3: Wednesday, January 21
.
Construct state diagrams of DFAs for each of the languages below. Each language is over the
alphabet cfw_0, 1.
1. cfw_11, 10, 01
2. cfw_w | the length of
CSE 3321 Worksheet 2: Friday, January 16
1. What is the value of
42
2
?
2. List all strings of length three over the alphabet = cfw_a, b.
3. List the rst 10 strings in shortlex order over the alphabet
CSE 3321 Worksheet 1: Wednesday, January 14
1. What is the power set of the set cfw_, 1, cfw_1 ?
Solution:
cfw_, cfw_, cfw_1, cfw_1, cfw_, 1, cfw_1, cfw_1, cfw_, cfw_1, cfw_, 1, cfw_1
2. Find a biject
CSE 3321: Worksheet 4: Wednesday, January 28
.
1. Prove that every NFA with one or more accept states can be converted to an equivalent one
that has a single accept state. Is this also true of DFAs?
2
CSE 3321: Worksheet 5: Friday, February 6
.
1. Use the pumping lemma to show that the language cfw_wwr | w cfw_0, 1 is not regular. Reminder: wr s the reverse of w.
2. Show, by giving an example, tha
CSE 3321: Worksheet 4: Wednesday, January 28
.
1. Prove that every NFA with one or more accept states can be converted to an equivalent one
that has a single accept state. Is this also true of DFAs?
S
CSE 3321: Worksheet 6: Monday, February 23
.
1. Construct an NFA that accepts the language generated by the grammar:
S abA,
A baB,
B aA|bb.
2. Construct a right linear grammar for the language:
L = cf
CSE 3321: Worksheet 6: Monday, February 23
.
1. Construct an NFA that accepts the language generated by the grammar:
S abA,
A baB,
B aA|bb.
Solution:
2. Construct a right linear grammar for the langua
CSE 3321 Worksheet 1: Wednesday, January 14
1. What is the power set of the set cfw_, 1, cfw_1 ?
2. Find a bijection between the set of non-negative integers and the set of integers.
3. Prove or dispr