Algorithm to find the best combination of items under certain constraints

前端 未结 7 1655
长情又很酷
长情又很酷 2021-01-06 14:22

I\'ll try to explain the problem in the math language.
Assume I have a set of items X = {x_1, x_2, ..., x_n}. Each item of X belongs to one of

7条回答
  •  误落风尘
    2021-01-06 14:51

    Without further qualifying the domains and the evaluation function, this problem can be easily shown to be NP-Complete by reducing SAT onto it (i.e. let S_1,...,S_5 be {true,false} and f2 = 1 if the formula is fullfiled and 0 if not). Hence in that case, even without taking f1 into account you are out of luck.

    If you know more about the actual structure of f1 and f1, you might have more luck. Have a look at Constrait Satisfaction Problems, to find out what to look for in the structure of f1 and f2.

提交回复
热议问题