This is if you are looking in an naive way and are only interested in for THE BEST solution. However, there are many constraints and we are looking for a better solution not the best one.
Yes exactly, I'm reminded of solutions to find numerical approximation results for very difficult problems like this. One of the most famous are Markov chain approaches to resolving similar issues. Then, for the interested: