Neyman allocation of the sample under stratified random sampling is among the top major advances and most widely used methods in probability sampling theory because it minimizes sampling variance. Neyman allocation rarely yields integer solutions.
Building on Algorithms I and II in Wright (2012) and Algorithm III in Wright (2014) which provide integer solutions and thus avoiding the need to round to integers, we present two more exact optimal sample allocation algorithms. Algorithm IV minimizes the overall sample size with a desired precision constraint, and Algorithm V seeks to minimize (or at least decrease) the sampling variance for a fixed cost constraint or budget. We actually present four variations of Algorithm V.
Remarkably, the presented simple algorithms always find the global optimum.