Question 5.1 contains a correction to the statement of Problem 9.8.3 in the book.
Question text is in black, answers in blue.
Yes, you're right, my bad. Please make the correction.
Also, I had trouble visualizing this until I saw the picture of a very similar problem on this old exam that you had us look at for the last midterm. Is this the same problem?
Yes, I forgot that in writing the book I cribbed that problem from an old exam. The ASCII picture is very nice and might help you visualize the problem if you've never been to Manhattan. I guess I'd better take down the solution to that exam. If you cached it or find it otherwise, remember that you must cite any source you use for the homework and that your work must be your own in presentation. If we get submitted homework identical to this exam solution there will be trouble.
A "winning strategy" is a complete set of instructions that will guarantee victory for the person who follows it, and give her a move in every situation that could come up in a game where she is following the strategy. So a strategy for White (who moves first) might be something like "Make move m1 to start. If Black does m2, do m3. If he does m4, do m5. If he does..." The complete strategy for the player who has one in Hexapawn is pretty manageable -- for 4-by-4 Checkers I won't guarantee that.
Yes. A* is a variant of uniform-cost search, as on the last question of the second midterm. We can look at a node more than once, and put more than one item into the priority queue for the same node. But once we take a node off of the priority queue, we know the shortest-path distance to it. If we see it again after that, we ignore it.
No, we haven't proven that result yet, so you
can't
use it now. The simplest way to prove this is to tell me how to take
any finite set of strings and build a DFA that accepts exactly those
strings and no others. You could try it out on some examples of
finite
sets -- can you build a DFA whose language is {ab, abab, baab,
bababb}?
You can certainly prove this without induction, but using induction
might help you organize your solution. You could let P(n) be the
statement "Any language with exactly n strings in it has a DFA". You
could prove P(0) by designing a DFA that rejects every string. Then
assume
you have a DFA for any language with n strings and prove that you can
build
one for any n+1 strings. That would prove P(n) for all naturals n (by
ordinary induction) and thus prove that every finite language has a
DFA.
Well, the algorithm is the proof. If you
give
an algorithm that produces the new regex given any regex as input, you
have proved that the new regex exists.
First, are you clear on what the language Xa-1 is? If
you imagine a list of all the elements of X, you would get a list of
the elements of Xa-1 by going down the list of X elements,
taking
any that end in a, removing the final a from those, and putting the
result into the new list. So, for example, if X has no
elements ending in a, then Xa-1 is the empty language.
But you don't have that list, so you have to work with regular
expressions recursively, just as is done in the section for the one's
complement and reversal operations on regular expressions. You need
base cases for the empty language and the single-letter languages, so
you need to figure out what the languages ∅a-1,
aa-1, and ba-1 are (where b is any letter other
than a). Then you need to have three inductive cases for the three
regular language operations -- union, concatenation, and star.
Suppose you have two regular expressions R and S and you already have
correct regular expressions for Ra-1 and Sa-1.
How do you make regular expressions for (R+S)a-1,
(RS)a-1, and (R*)a-1?
Last modified 21 November 2010