UMBC CMSC451, Automata Theory & Formal Languages, Fall 2005
Homework Assignments
- Exercise 2.2.4, parts b & c. Draw transition diagrams.
- Exercise 2.2.5, parts b & d.
For part b, give a mathematical definition of the transition
function delta. For part d, draw an transition diagram.
- Explain why your solution to 2.2.5.d is correct. Recall
that to argue that a DFA M recognizes a language A, you need
to argue that L(M) is contained in A and that
A is contained in L(M).
- Exercise 2.2.8, parts a & b.
- 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 = w1w2w3...wm
where each wi is either ab or abc.
- Exercise 3.1.1, parts b & c.
- Exercise 3.1.2, part b.
- Exercise 3.2.3.
- Exercise 4.1.2, parts c & f.
- Exercise 4.1.2, parts b & g.
- Exercise 4.1.4, part d.
- Exercise 4.2.6 part c. Note: This one requires thinking.
- 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.4.2.
- Give context-free grammars for the following languages.
Please comment your productions.
- L = { w ∈ {a, b}* | the number of a's in w does not equal the number of b's in w }
- L = { anbmck | n = m or m ≠ k }
- L = { anbmck | n + 2m = k }
- Prove that your grammar for 2a above correctly
generates the specified language.
- Exercise 5.1.1, part d.
- [From Introduction to the Theory of Computation, 2/e, by M. Sipser]
Consider the following context-free grammar G:
S → T T | U
T → 0 T | T 0 | #
U → 0 U 00 | #
- Give an English description of L(G).
- Prove that L(G) is not regular.
- Exercise 5.1.4, parts a & b.
- Exercise 5.2.2.
- Exercise 5.4.5, parts a & b.
Note:
When the question asks you to "design a PDA", you should give a brief
high-level 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 6.3.5, parts a & b.
- Exercise 7.2.1, parts b & c.
- Exercise 7.2.1, part e.
- Exercise 7.2.1, part f.
- Exercise 7.1.3.
- Exercise 7.1.9, part a.
- [From Introduction to the Theory of Computation, by M. Sipser]
Let G be a context-free grammar in Chomsky Normal Form that has b variables.
Show that if G generates a string using a derivation with at least 2b
steps, then L(G) is infinite.
- Exercise 7.3.2, parts a & b.
- Exercise 7.4.1, part b.
- Exercise 7.4.2, part b.
- Exercise 8.1.1, part b.
- Exercise 8.2.2, parts b & c.
- Exercise 8.4.3, part b.
- Exercise 8.4.9.
N.B.: a k-head 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 multi-tape 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 b. Not 8.5.5 as previously posted.
- Exercise 9.1.3, part b.
- Exercise 9.2.6, parts b and c.
- Exercise 9.3.4, parts a and b.
- Define the language SQUARE as follows:
SQUARE = { < M > | M is a TM and for all n, M halts
in ≤ n2 steps on inputs of length n }
Show that for
Le = { < M > | M is a TM and L(M) = ∅ },
Le ≤m SQUARE.
- Exercise 9.3.4, part c.
Note: part a was already assigned for HW12.
Note: You may use the fact that we already know certain
languages are not recursively enumerable, (e.g., Le,
the complement of Lu, 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.
- 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.
- Exercise 5.4.2
- Exercise 7.2.3.
- Exercise 7.2.5, part a.
- Exercise 7.3.4, part d.
Last Modified:
22 Jul 2024 11:29:00 EDT
by
Richard Chang
to Fall 2005 CMSC 451 Homepage