NFA simulation