An Analysis of On-the-fly Determinization of Finite-state Automata