  In optimal policy problems where treatment effects vary at the individual
level, optimally allocating treatments to recipients is complex even when
potential outcomes are known. We present an algorithm for multi-arm treatment
allocation problems that is guaranteed to find the optimal allocation in
strongly polynomial time, and which is able to handle arbitrary potential
outcomes as well as constraints on treatment requirement and capacity. Further,
starting from an arbitrary allocation, we show how to optimally re-allocate
treatments in a Pareto-improving manner. To showcase our results, we use data
from Danish nurse home visiting for infants. We estimate nurse specific
treatment effects for children born 1959-1967 in Copenhagen, comparing nurses
against each other. We exploit random assignment of newborn children to nurses
within a district to obtain causal estimates of nurse-specific treatment
effects using causal machine learning. Using these estimates, and treating the
Danish nurse home visiting program as a case of an optimal treatment allocation
problem (where a treatment is a nurse), we document room for significant
productivity improvements by optimally re-allocating nurses to children. Our
estimates suggest that optimal allocation of nurses to children could have
improved average yearly earnings by USD 1,815 and length of education by around
two months.
