Algorithms for Discrete Data in Statistics and Operations Research