CMPSCI 601: Theory of Computation

David Mix Barrington

Spring, 2003

This page currently contains interesting questions I have received from students in CMPSCI 601, together with my answers. These are questions related to Homework #8 -- links to previous questions and answers are at the bottom of this page. weeks. Questions are in black, answers in blue. Most recently answered questions are listed first.

Question 8.6, 10 May 2003

In question 3b, what do the dollar signs mean when you say the entries should be $0$ and $1$? Shouldn't the entries of a boolean matrix be just "false" and "true"?

Sorry, the dollar signs were there because I forgot I was writing HTML instead of LaTeX. I've taken them out. Yes, the entries of the matrix are each either "false" (0) or "true" (1).

Question 8.5, 5 May 2003

For Question 3,

Are all of these "n" values the same or should it be more general, as in "ITMULT takes a list of integer-valued square matrices, where each matrix entry is expressible with at most n bits, and outputs the product of them"?

A good question, one I should probably have made clearer. The easiest thing is to take all these n's to be the same, which as you point out means that the input has n^4 bits. Of course poly in n^4 or logarithmic in n^4 is the same as poly or logarithmic in n. So just as we don't usually worry about the fact that the input size of an n-node graph is O(n^2) rather than n, we let n be the maximum of all these possible n's or otherwise make them all the same.

There are problems about "sparse matrices", where most of the entries are zero, and there you might worry about the input size being smaller.

Question 8.4, 5 May 2003

In Question 1a, does "possibly with only children" mean that a node can have zero, one, or two children?

Yes, I'm using "only child" in the sense of "child of a parent that has exactly one child". Nodes may have zero children, or one, or two, whereas in Question 1 they may have only zero or two.

Question 8.3, 5 May 2003

I'm confused about the "strings of length 4" in Question 5. Is the size of the input then supposed to be the size of the circuit?

Aargh! That's a typo, it's supposed to be "circuits of length n". But yes, the circuit is included as part of the input size. I'll fix the typo now.

Question 8.2, 5 May 2003

HW#8 has Questions 1, 2, 3, 5, and 6, totalling 100 points, but no Question 4.

Whoops, my bad. I think I'll put in a dummy Question 4 instead of renumbering, in case anyone's started already. I had been thinking of putting in a question on parallel RAM's -- I suppose I had reserved the number for it and then decided I had enough without it.

Question 8.1, 4 May 2003

Isn't the statement of Question 1 false if n=1?

You're right! A tree with one node has no edges at all and thus doesn't have any edge dividing the nodes as specified. I will fix this.

Must the binary trees of Question 1 have the property that each node has either zero or two children? I think the Lemma is false otherwise.

Right again! There is a seven-node counterexample if we allow a parent to have an only child. (The root has an only child and an only grandchild, and this grandchild has two children each with an only child. Then by inspection, any edge splits the seven nodes either six-one or five-two.)

If we place the zero-or-two children condition on the tree, the Lemma becomes true but the proof is more subtle than I had in mind. (It's obviously nearly true, but proving that it's exactly true requires juggling some numbers and making multiple use of the observation that in a zero-or-two-child binary tree, the subtree under any node has odd size. You should prove this observation (an easy induction) if you want to use it.)

So I'll give you a choice. You can get fifteen points for proving the original Lemma with the restriction, or ten points for an easier version that I'll put on the homework page. (A max of fifteen for the problem overall.)

Answers to Questions during HW#7 (through 30 Apr 2003)

Answers to Questions during HW#6 (through 23 Apr 2003)

Answers to Questions during HW#5 (through 9 Apr 2003)

Answers to Questions on the Midterm

Answers to Questions during HW#4 (through 26 Mar 2003)

Answers to Questions during HW#3 (through 17 Mar 2003)

Answers to Questions during HW#2 (through 3 Mar 2003)

Answers to Questions during HW#1 (through 12 Feb 2003)

Last modified 10 May 2003