# CMPSCI 401: Theory of Computation

### David Mix Barrington

### Spring, 2012

# Homework Assignment #3

#### Posted Wednesday 29 February 2012

#### Due on paper in class, Friday 9 March 2012

There are thirteen questions for 100 total points plus 10 extra credit.
Most are
the textbook, *Introduction to the Theory of Computation*
by Michael Sipser (second edition).
The number in parentheses following each problem
is its individual point value.

Students are responsible for understanding and following
the academic honesty
policies indicated on this page.

- Problem 2.39 (10)
- Problem C-1 (20):
Give a state diagram for a Turing machine that decides the language
{a
^{k}: ∃r: k = r^{2}}. You may use multiple
tapes. You may find it useful to recall that k^{2} = 1 + 3 + 5 +
... + (2k - 1).
- Exercise 3.2 part (c) only (5)
- Problem 3.9 (10)
- Problem C-2 (10): Give an implementation-level description of
a Turing machine (possibly with multiple tapes) that gets a string
u#v
on its input tape (where u and v are strings in {0, 1}
^{*})
and
halts with a binary string w on another tape, where w = u × v
as binary numbers.
- Problem 3.15 part (b) only (5)
- Problem 3.16 part (b) only (5)
- Exercise 4.3 (5)
- Exercise 4.4 (5)
- Problem 4.16 (10XC) What Sipser wants here is for you to
prove
a theorem of the form "If M and N are DFA's with k states each, then
L(M) = L(N) if and only if M and N agree on all strings of length at
most
f(n)." I'm not looking for the optimal f(n), just some computable
function
for which you can prove this result.
- Problem 4.26 (10)
- Problem C-3 (10): An
**excess transition** in an NFA or PDA is a
transition
that
is never used in any accepting computation. Prove (using a
high-level
description of a deciding TM) that the language {(M): M is an NFA that
contains an excess transition} is Turing decidable.
- Problem C-4 (5) Prove that any context-free language is the
language of some PDA that has no excess transitions.

Last modified 29 February 2012