Second-Order Differential Encoding of Deterministic Finite Automata