We construct Markov chain algorithms for sampling from discrete exponential families conditional on a sufficient statistic. Examples include contingency tables, logistic regression, and spectral analysis of permutation data. The algorithms involve computations in polynomial rings using Gröbner bases.
Persi Diaconis. Bernd Sturmfels. "Algebraic algorithms for sampling from conditional distributions." Ann. Statist. 26 (1) 363 - 397, February 1998. https://doi.org/10.1214/aos/1030563990