Monday, June 29, 2009

Loose ends

In order to tie together the ideas contained in a couple of recent posts (this one and this one), I offer the following:
This diagram, like that contained in the last post, represents what mathematicians call a finite state automaton. Such a creature is little more than a very simple computer, capable of generating and recognizing strings that fall into a class called a regular language.

To be more precise, imagine that you're plopped into the diagram above in one of the ten states (the little yellow boxes with labels on them). You're then asked to move about the diagram by following the red edges in the direction indicated by the arrows, and every time you take an arrow from state s to state s' you write down the letter s', and if s' is one of the consonant states, you can write down any consonant you'd like. The only catch is that you can only follow an arrow heading out of the state in which you find yourself at the current point in time.

For instance, if we're plopped down on the state labeled "consonant5," we can either begin by writing down a consonant (following the red arrow back to "consonant5") or by writing down an a and heading over to the state labeled "a." From there we must either write a consonant (and thereafter any number of consonants for a while) and head to "consonant1," or go directly to "e" by writing an e.

Any piece of writing we can compose in this fashion without causing our walk from state to state to "block" and come to a screeching halt is said to be accepted by this finite state automaton. I'll leave it as an exercise to the reader (I love that phrase!) to check that this automaton accepts precisely the poems generated by the permutation method I described in this post, in which your permutation is (a,e,i,o,u) and your sequence is {1,1,1,...}: you have to use the vowels a, e, i, o, and u in strict rotation, but consonants can be thrown in willy-nilly. (And yes, "willy-nilly" is a technical term [just kidding].)

How does this relate to Hamlet's soliloquy, the subject of my last post? The diagram in that post shows another finite state automaton, and this one is the minimal automaton of the same sort that accepts Hamlet's famous "To be or not to be" speech. By "minimal" I mean that this automaton has only those transitions from state to state that one needs in order to generate that soliloquy: any more edges would give you more flexibility than you'd need, and moreover you'd be able to generate more than you'd like. For instance, as one of Erdrick's students astutely noticed, in Hamlet's automaton you can only reach "z" by coming from "u," and from "z" you can only travel back to "z" or to "l," suggesting that the only z-word you're allowed to build is "puzzle." This is indeed the case, and this limitation puts a strong constraint on the sorts of written work you can produce using this automaton, and as I'm fond of pointing out, poetic constraint is a heckuva lot of fun.

Indeed, there are dozens of poetic possibilities from this point, and I've already started writing a paper that describes a number of them. I'll mention a few interesting constraints, and I hope my readers will help me to explore these and share with me the results of their explorations:

1. Given the minimal automaton for one piece of writing (maybe one that already exists, like Hamlet's soliloquy), generate poems that are "entailed" by that piece of writing, in that they too are accepted by the first piece's automaton.

2. Write the shortest possible piece of semantically and syntactically meaningful prose or poetry whose minimal automaton is the "complete" automaton consisting of all 26 potential states and all 262 transition arrows. I envision lines like "'To Iraq!' Zelda cried."

3. Find the longest possible semantically and syntactically meaningful piece of writing that is completely determined by its minimal automaton, in that the only meaningful (in whatever way you choose to define it) pieces accepted by that automaton are "subpieces" of the original one. For example, even the simple sentence "Me too!" gives rise to an automaton (below) which accepts not only "me" and "too," but also "met" and "to":

4. As my colleague Erdrick has pointed out in private correspondence, maybe you want to introduce whitespace states? Such a modification might be either enabling or disabling, depending on how it's handled...

In any case, there'll be much more to come about this in future posts as I develop the technique, write the paper I referred to above, and actually write some damned poems that fit some of the above constraints. If you'd like to play around a bit, I'd love to see what you come up with. Just remember that you saw it here first!

No comments: