Perfect information and unlimited computing power.
In particular, relevant to this thread, if you have a magical CSV file created by an Oracle associating every food available in US with how "healthy" they are and how much calory they provide, in order to build a 2500 calory diet that maximizes health and minimizes cost, you need to solve a knapsack-like problem. In this environment market will necessarily be a little random not because we don't have enough information but because we don't have enough computational power.
EDIT: I must also admit that I know absolutely nothing about economics. I'm a regular software engineer.