All I've got is that all of the plus terms need to be added to a maximum of 10, so f(a) can only be till 5, f(c) can only be till 3 and f(d) can be till 10.
Also that all the plus terms can't be added up to 1 or 2 in any way since one-one gets violated.
Not sure how to proceed.