CMPSCI 250: Introduction to Computation
David Mix Barrington
Fall, 2010
Homework Assignment #5
Posted Sunday 14 November 2010
Due on paper in (discussion) class, Tuesday 23 November 2010
There are thirteen questions for 100 total points plus 10 extra credit.
All are from
the textbook,
Mathematical Foundation for Computer Science,
from Volume II. Note that the book has
both Exercises and Problems -- make sure you are doing a Problem and not the
Exercise with the same number. 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.
Corrections and notes in green added 17 November 2010.
- Problem 9.9.1 (10) The reference to "Problem T.6.3" should be
to Problem 9.8.3. Actually this problem needs a
number of changes, starting with the fact that (0,0) is currently
unreachable. We will keep the graph the same but change the
following:
- As previously observed, there are typos in the description
of the graph in the book. The north edges are from (i,j) to (i,j+1)
and the south edges are from (i,j) to (i,j-1).
- There is an ASCII picture of the graph here.
- The start is now (1,1), and the goal is (3,3).
- As on Manhattan, east-west blocks are longer than
north-south
blocks. Every edge going east or west has length 3, and every
edge going north or south has length 1.
- For the A* search, the function h is now
3|i-3| + |j-3|, the "pedestrian distance" from (i,j) to (3,3),
along streets but ignoring the
one-way restrictions. (The vertical lines denote absolute value.)
- Problem 9.10.1 (10 extra credit) Note that you don't know the
"techniques from Chapter 6" as they are now in CMPSCI 240. If you
don't
have a better idea, answer (a) with an overestimate based on the
fact that each of the eight dark squares might have nothing, a white
man, a black man, a white king, or a black king. We will
give some extra credit for any reasonable estimate -- the exact
number of positions that could occur in a game would require
a computer search, I think.
- Excursion 9.11, Writing Exercise 1 (10) Note that a "winning strategy" for one player consists
of a set of instructions that will allow her to win against any
sequence of moves by her opponent. She only needs responses for
situations that can come up in a game where she is playing her
strategy.
- Problem 5.1.1 (5)
- Problem 5.1.2 (5)
- Problem 5.2.2 (10)
- Problem 5.2.4 (10) As John pointed out to
me, this problem is hardly worth ten points after yesterday's
discussion.
But you get them anyway for a correct regular expression.
- Problem 5.4.1 (10)
- Problem 5.4.2 (5) This problem is wrong -- for five
points,
give an example of regular expressions S and T, over a one-letter
alphabet, such that (ST)* and S*T*
are
different languages. I think I intended to ask you to prove that
(ST)n and SnTn are the same over
a one-letter alphabet, which is true. But for now, just find
and justify a counterexample to the claim in the book.
- Problem 5.5.1 (10)
- Problem 14.1.1 (5) (not 14.1.11)
- Problem 14.1.6 (10)
- Problem 14.2.4 (10)
Last modified 17 November 2010