1
\$\begingroup\$

This question already has an answer here:

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).

\$\endgroup\$

marked as duplicate by Rɪᴋᴇʀ, NoOneIsHere, Blue, Mego, Wheat Wizard Jan 8 '17 at 1:21

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 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\$ – Nathan Merrill Jan 7 '17 at 19:13

Browse other questions tagged .