How to allocate scarce resources