Lecture 08

Today:

    1. Quiz.

    2. Reading questions.

For next time:

    1. Start Homework 5.

    2. Reading questions below.

Applications of Finite State Machines

Recognizers and Transducers (Mealy and Moore)

TCP state transition diagram

Here's the original: http://www.ietf.org/rfc/rfc793.txt

And here's a pretty version: http://www.cs.northwestern.edu/~agupta/cs340/project2/TCPIP_State_Transition_Diagram.pdf

Event-driven programming

UML state machines: http://en.wikipedia.org/wiki/UML_state_machine

http://it.toolbox.com/blogs/enterprise-solutions/steps-for-building-a-gui-using-event-driven-design-19528

http://public.dhe.ibm.com/software/dw/rationaledge/apr01/UMLActivityDiagramsApr01.pdf

Thoughts on the Pumping Lemma

A good lemma is like a good library function.

    1. It solves a problem that comes up over and over.

    2. It creates an abstraction that is useful for managing complexity.

BUT, it can create a barrier to understanding:

1) In a library the implementation is hidden, which can lead to performance errors.

2) In the case of a lemma, you can lose the intuition for why the demonstrandum is true.

"Ok, I followed the steps and I 'proved' it, but I still don't see why it's true."

A few pumping lemma lemmas:

1) Pumping can only affect the first p symbols in a string.

2) Pumping has to change the length of the string.

3) Pumping can add/remove at most p symbols.

Do you see how each of these follows from the conditions in Theorem 1.70 (page 78)?

How would you characterize the languages we have seen that are not regular?

Reading questions

Sipser, pages 99-109

1) What is the relationship between a context free grammar and a pushdown automaton?

2) What is the difference between a variable and a terminal?

3) Draw the parse tree for the sentence "a boy sees" in grammar G2.

4) What does it mean to say that a string derives another string?

5) What strings are in the language of a grammar?

6) What is parsing?

7) What does it mean to say that a grammar is ambiguous?

[You can skim the section on Chomsky normal form, and then stop at the top of page 109.]