It is not easy to predict exactly what people want and when they want it. We are demanding creatures, expecting the world to deliver quick solutions to our increasingly complex and diverse problems of today.

Researchers have built several pretty practical mathematical approaches over the past few decades that can allocate resources across a variety of industries and environments so that they can try to keep up with the everyday demands of our lives. But when an allocation made at one time influences future assignments, the problem is complex, and the passage of time as part of the equation must be considered. It throws in the works a mathematical spanner that allows such approaches to take into consideration the changing and unpredictable existence of the real world.

These problems are known collectively as problems with the complex allocation of resources. We crop up everywhere you have a limited supply to be distributed in real-time. (Read how a violent attack turned a man into a master of mathematics.)

Whether you’re waiting for a taxi or a next day delivery, according to Warren Powell, an engineer at Princeton University who has been researching these problems since the 1980s, the scope of complicated resource allocation issues and their everyday uses are “almost infinite.”

But the problem of dynamic resource allocation is not just about giving people what they want when they want it. They will also be essential to address some of the most basic and complex issues in the world, including climate change, as they help us to allocate the often scarce and depleted resources of our planet in the most efficient way possible.

But let’s look at a simplified example first to see what is a challenge with global resource allocation and what makes it so hard to solve.

Imagine that for your family of four, and you are cooking a roast dinner. With all the trimmings, you settle for beef, safe in the knowledge that it is a solid favorite of the neighborhood. But just as you’re about to eat, your daughter reveals that she’s vegetarian, your partner’s texts say they’re running late, and your son even informs you that he’s asked “a few” friends to dinner. Then your dog runs off with the beef joint while you are desperately trying to figure out how to meet the needs of all these very demanding and unruly individuals.

This is a trivial example of a problem of dynamic resource allocation, but it shows some of the key challenges that researchers face when dealing with these issues. For starters, both in the short and long term, the parameters affecting demand change unexpectedly. There’s no chance you could have expected the latest dietary requirements of your daughter, the tardy appearance of your wife, or the extra visitors of your son as you cooked this dinner.

The need for food in your house will also change daily in the longer term. At each meal, you may need to feed two to twenty guests. Between meal to lunch, you don’t know who’s going to want to eat, what they wish to, or when they want to. You may take an educated guess based on previous experience, but this is not a reliable approach because of the unpredictability of human nature and the many other factors that influence demand.

The actions of the individuals in this scenario also affect the future state of the system. Every time you allocate a specific meal to a person, this changes the system. It removes both one hungry person and food from your kitchen.

“Both [ complex resource allocation ] models need to tackle evolving inputs and conditions that are highly dynamic and hard to estimate and forecast, as the potential load is not statistically contingent on the current load,” says Eiko Yoneki, a senior researcher at the University of Cambridge’s Computer Laboratory, heading the data-centric systems community. “A change triggers another change, and if you want to control the system with precise decisions, the future status of the system must be considered.”

Moreover, as more people or meal options enter your kitchen, things will become more complicated. Now you have more ways to give different people a range of different meals. This number of combinations increases exponentially as more people or meals are added to the system.

For example, this is just what a large hospital will experience when it tries to feed all the people who enter through its doors. The same refers to the care of these cases. The medicines they require, which themselves have a limited shelf life, and will continuously change the equipment needed for diagnosis and treatment as different patients arrive. There is also a need to distribute scarce resources such as MRI scanners, doctors, and nurses. To address this and prevent costs from rising out of control, hospital management could use mathematical models to help coordinate all of these things.

The problem is that for making predictions, most existing methods rely on historical data. For such systems, this method does not scale very well and can not tolerate even the smallest changes. If there is a transition, they go back to square one and seek to work out a solution again. Such issues quickly become computationally intractable, even for a relatively small number of people and resources – be it a meal or an MRI scanner.

Dynamic resource allocation problems often occur from a variety of different situations, each with its specific issues. For example, to make our computer systems and software run faster and more reliably, Yoneki is exploring the effects of these concerns.