UMBC CMSC451, Automata Theory & Formal Languages, Spring 2007
Homework Assignments
 Draw the transition diagram for a DFA D_{1} for the language:
L_{1} = { w ∈ {0,1}^{*}  w does not contain the substring 11 }.
 Prove that your DFA D_{1} does indeed recognize L_{1}. That is,
L(D_{1}) = L_{1}.
Note: you must prove set containment in both direction,
that L(D_{1}) ⊆ L_{1} and that L_{1} ⊆ L(D_{1}).
 Draw the transition diagram for a DFA D_{3} for the language:
L_{3} = { w ∈ {0,1}^{*}  w contains an even number of 0's and at most one 1 }.
 Prove that your DFA D_{3} does indeed recognize L_{3}. That is,
L(D_{3}) = L_{3}.
The note in Question 2 applies equally here.
 Exercise 2.3.2.
 Exercise 2.3.4, part b.
 Exercise 2.3.4, part c.
 Construct an NFA with 3 states for the following language:
L = { ab, abc }^{*}
That is, L is the set of strings w such that w is either the empty
string, or w = w_{1}w_{2}w_{3}...w_{m}
where each w_{i} is either ab or abc.
 Exercise 3.1.1, parts b & c.
 Exercise 3.1.2, part b.
 Exercise 3.2.3.
 Exercise 3.2.6, parts c & d.
 Exercise 4.1.1, part e.
 Exercise 4.1.2, part c.
 Exercise 4.1.2, part e.
 Exercise 4.1.2, part h.
 Exercise 4.2.6, parts a & b.
 Exercise 4.2.13, part b.
 Exercise 4.3.2.
Note: You do not have to worry about the
algorithm being efficient. However, you should make sure
that your algorithm doesn't run forever.
 Exercise 4.3.4.
When you are asked to provide a contextfree grammar (CFG), briefly
describe the purpose of each variable of your CFG and comment the
"interesting" productions.
 Exercise 4.4.2.
 Provide CFGs for the following languages:
 L = { w ∈ {a, b}*  the number of a's in w does
not equal the number of b's in w }
 L = { a^{n}b^{m}c^{k}  n = m
or m ≠ k }
 L = { a^{n}b^{m}c^{k}  n + 2m
= k }
 Prove that your grammar for 2a above correctly
generates the specified language.
 Exercise 5.1.1, part d.
Note:
When the question asks you to "design a PDA", you should give a brief
highlevel English description of your PDA first. (E.g., "push X whenever
a 0 is read...") Then, give the transition diagram, transition table or
mathematically defined transition function.
 Exercise 6.1.1, parts b & c.
 Exercise 6.2.1, parts b & c.
 Exercise 6.2.3, parts a & b.
 Exercise 6.2.6, parts a & b.
 Exercise 7.2.1, part b.
 Exercise 7.2.1, part c.
 Exercise 7.2.1, part e.
 Exercise 7.2.1, part f.
 Exercise 7.4.1, part b.
 Exercise 7.4.2, part b.
 Exercise 8.2.2, parts b & c.
 Exercise 8.2.3, parts a & b.
 Exercise 8.4.3, part b.
 Exercise 8.4.9.
N.B.: a khead TM does not "know" whether two (or more)
of its tape heads are reading the same tape cell  it only
"knows" that the heads
are reading the same symbol, which could be from different tape cells
holding the
same symbol.
 Exercise 8.4.10.
N.B.: a multitape TM can have only a constant
number of tapes  i.e., you are not allowed to have more
tapes for longer inputs or to increase the number
of tapes in the middle of a computation.
 Exercise 8.5.1, part d.
N.B.: by definition (in this textbook)
a counter machine is deterministic.
Hint: store 2^{i}3^{j}5^{k}
in one counter using a second counter as a "helper".
Note: Recall that the lowest homework grade is dropped
only from the first 10 homework assignments.
 Exercise 9.1.3, part b.
 Exercise 9.2.6, parts c & d.
 Exercise 9.3.3.
 Exercise 9.3.7, part b.
Note: Recall that the lowest homework grade is dropped
only from the first 10 homework assignments.
 Exercise 9.3.4, part a.
 Exercise 9.3.4, part b.
 Define the language SQUARE as follows:
SQUARE = { < M >  M is a TM and for all n, M halts
in ≤ n^{2} steps on inputs of length n }
Show that for
L_{e} = { < M >  M is a TM and L(M) = ∅ },
L_{e} ≤_{m} SQUARE.
 Consider the following language concerning pushdown automata
(PDAs):
DOUBLE = { < P >  P is a PDA and L(P) contains at least one
string of the form zz for some z ∈ {0,1,#}^{*} }
Show that DOUBLE is undecidable. Hint: use computation
histories twice.
Note: Recall that the lowest homework grade is dropped
only from the first 10 homework assignments.
 In each of the following languages, <G_{i}>
is an encoding of a contextfree grammar. State whether
each language is decidable or undecidable. Justify briefly.

L_{a} = { < G_{1}, G_{2} > 
L(G_{1}) ⊆ L(G_{2}). }

L_{b} = { < G_{1}, G_{2} > 
L(G_{1}) ∩ L(G_{2}) = Σ^{*}. }

L_{c} = { < G_{1}, G_{2} > 
L(G_{1}) ∪ L(G_{2}) = Σ^{*}. }

L_{d} = { < G_{1} > 
the complement of L(G_{1}) equals Σ^{*}. }
 Exercise 9.3.4, part c.
Note: You may use the fact that we already know certain
languages are not recursively enumerable, (e.g., L_{e},
the complement of L_{u}, and the complements of the different
versions of the halting problem K).
 A set X is cofinite if its complement is
finite. Every cofinite set is infinite, but some infinite sets
are not cofinite. For example, the set of natural numbers larger than
10 is cofinite, but the set of even numbers is not. Define
COFINITE = { < M >  M is a TM and L(M) is cofinite }
Express COFINITE using ∃ and/or ∀ quantifiers over
strings and/or numbers and a decidable predicate.
 Prove that COFINITE is not decidable.
Note: Prove this directly, do not use Rice's Theorem.
Last Modified:
6 May 2007 22:46:39 EDT
by
Richard Chang
to Spring 2007 CMSC 451 Homepage