exactPotts function

Calculate the distribution of the Potts model using a brute force algorithm.