Algorithms for fair public and private resource allocation