The most complicated system (mathimatically) that I have ever worked on, was a system for a Fast Food chain. This system monitored sales, and forcasted expected sales based on past history. Based on the forcast, the system instructed staff to cook food.
Later, the system was also extended to handle Stock Ordering.
The system has now been running for > 4 years, and is still running strong.
I have to say that this system was also one of the most interesting systems I've ever worked on.
Cheers
Eddie