To many people’s surprise, in ‘normal’ (i.e., non-mathematical) English, the preposition used here is to, not of or for. So it’s the solution to a problem. Similarly, it’s the answer to a question or problem. However, when solution refers to the act of solving, then it can be followed by of:
The solution of that problem is going to take a long time.
I am working on the solution of genetic algorithm problems.
In such cases, the solution can be replaced by solving.
©2013 Baxter Publishing, Hilversum, The Netherlands