Automata

I think I'm getting more the logic now, but my second array is still
empty. Take a look.