I've noticed that some challenges could be solved using automata. For example, this challenge in closing XML tags could be solved using a pushdown automaton. Would such an answer be acceptable?

If DFAs, PDAs, etc. were permitted, how would they be scored? Some possibilities could include the number of states, number of transition arrows, number of stack accesses (in a PDA), or a function of all of these.

If encoding an automaton is problematic (after all, they're usually drawn), perhaps the formal definition would suffice? This would lead to more complex answers, but they'd be more quantifiable (ex: count the number of characters in the formal definition).

  • 1
    \$\begingroup\$ What you need is an interpreter. Find a program you can interpret your DFA/automata and use it. The score will be the size of the file you pass to it. \$\endgroup\$ Jan 7, 2017 at 19:13


Browse other questions tagged .