update HammingDistanceProblem and ApproximatePatternCount classes