This is the solution to the famous space merchant's guide to galaxy problem