Added minHash function for theoretical method