# How can I modelize a weekly menu and minimize the total number of ingredients it contains

Hi and many thanks for reading this question.

I want to create an algorithm that will minimize the total number of ingredients that are in a weekly menu. A menu is made of several recipes, for simplicity let's say 5 recipes. Recipes are randomly selected from a database of many recipes. Each recipe has ingredients that can be identical or different.

1. I would like your help to modelize this problem so it can be optimized.
2. If you have any idea of what type of proble this is (NP Complex?) that could also help me going in the right direction.

-
What do you mean by modelize? What kind of model are you thinking of? – user99680 Jun 30 '14 at 23:49
I would like to know if there is a Mathematical approach to this problem so I can use it further with Simulated Annealing or a Genetic Algorithm. I can imagine a cost function for a menu where C(M)=Total number of unique ingredients in the Menu. But maybe there is no more than that! I wanted to ask to people good with Math if they see something else there. – codea Jul 1 '14 at 11:13
No. There are no degrees of freedom in your task. This is not an optimization problem. – Adrian Schad Jul 3 '14 at 7:43

1. Since recipes are randomly selected, a menu (5 recipes) is also randomly selected from database. Hence, there is no need (or way) to optimize the outcome.

2. This is not an NP-complex problem. It has complexity O(1), or maybe O(0).

-
1. Like I said in the question comment, I can look into sevral randomly selected outcomes and pick the bests using some algorithms. There could be some optimization there on how I deal with that. Are there Mathematical approaches that you see that could help in this task? – codea Jul 1 '14 at 11:23
I have accepted your answer, but I think my question was not asked properly. Optimization is probably not the good wording in the question. It would be more about finding good candidates with minimal ingredient count. Many thanks for your help. – codea Jul 4 '14 at 14:27