[OS X TeX] pushdown automata?

Alain Schremmer schremmer.alain at gmail.com
Mon Jan 19 05:28:36 CET 2009


On Jan 18, 2009, at 10:31 PM, Ross Moore wrote:

> Hi Art,
>
> On 19/01/2009, at 12:46 PM, Art Werschulz wrote:
>
>> Hi.
>>
>> Any suggestions for drawing pushdown automata using TiKZ (or some  
>> other LaTeX-friendly package)?  Something like the following  
>> (which will only look good in a monospaced font):
>>
>> +---------+
>> | State   |-------+
>> | control |       |
>> +---------+       V
>>     |	       +---------------+
>>     |          | a | a | b | b |
>>     |          +---------------+
>>     V
>>   +---+
>>   | x |
>>   +---+
>>   | y |
>>   +---+
>>   | z |
>>   +---+
>
> It can be done in just a few lines of Xy-pic coding:
>
> \usepackage[all]{xy}
>
> \framebox{%
>  \def\wdth{.6cm} % dimension of a cell, adjust to suit
>  \xygraph{
>    []*!C++[F-]\txt{State\\Control}
>    ( ?-[rr] : [d]*=<\wdth>[F-]{a}  % 1st item in the tape
>        % further items to the right
>       (?!{+R*=<\wdth>!L[F-]{a}+R*=<\wdth>!L[F-]{b}+R*=<\wdth>!L[F-]{b}
>               +R*++!L{\dots}})
>    , ?: [d]*=<\wdth>!U[F-]{x}   % top item in the stack
>        % further items below
>       (?!{+D*=<\wdth>!U[F-]{y}+D*=<\wdth>!U[F-]{z}+D*+!U{\vdots}})
>    )}}

Which reminds me of Hamada's response to a person who was wondering  
how he could ask, say, $10,000 dollars for a pot he had turned in  
"just a few minutes":

"It took me "just a few minutes", yes … plus fifty years before that".

Respectful regards
--schremmer


More information about the macostex-archives mailing list