# CMPSCI 401: Theory of Computation

### David Mix Barrington

### Spring, 2013

# Questions and Answers on Homework #1

Page started 3 February 2013, HW#1 due in lecture 6 February 2013.

Question text is in black, answers in blue.

**Question 1.1, posted 3 February:** In Question A-1, I tried
assuming the given equation for n and proving it for n + 1, as is
usual
for induction problems, but I couldn't do it. Can you help?

Because the Fibonacci equation defines F(n + 1) in
terms of both F(n) and F(n - 1), you need information about both F(n)
and F(n - 1) to prove what you want about F(n + 1). This is an
example of **strong induction**, where in order to prove the
statement P(n + 1) you assume not only P(n) but any P(i) you need with
i < n. In this case you just need P(n - 1) along with P(n). Note
that this means that you need two base cases rather than one -- along
with P(0) you need to prove P(1) directly, since you can't use the
general
case to prove P(1) from P(0) and P(-1) because F(-1) is not defined.

**Question 1.2, posted 3 February:** In Exercise 1.5, do we
need to prove that the DFA's we construct have the languages that are
asked for?

No, but there is no partial credit for DFA's that
are incorrect, so you need to convince *yourself* that they are
right.

**Question 1.3, posted 3 February:** For Problen 1.37, you list
the
language C_{3}, but I'm confused by the fact that you include
the empty string, which isn't a binary number, and leave out "0",
which is the binary string for zero, which is divisible by 3.

Sorry about that -- I'm not too concerned with
binary strings that aren't standard representations of numbers, but I
should give you a precise definition in any case. Define the number
represented by the empty string to be 0. If the string w represents
the number n, define w0 to represent 2n and define w1 to represent 2n
+ 1. Now you should be able to design a DFA (for a given modulus m)
whose state represents the number represented by the binary string it
has seen, modulo m.

**Question 1.4, posted 4 February:** For Problem 1.36, may I prove
that the language in question is regular by giving a regular expression
for it (and quoting Kleene's Theorem)? That seems too easy for a ten-point
question.

You're right, it is too easy, but it's a correct solution
and you will get full credit for it if your regular expression is correct.
(Remember that zero *is* divisible by any positive integer.) I encourage
you, though, to build the DFA for 1.36 because it will help you more for the
more difficult Problem 1.37.

Last modified 4 February 2013