I am trying to figure out the following graph problem, and the best way to solve it.
I have a set of n nodes, which represent foods. One or two foods can be eaten each meal, but some pairs of foods cannot be eaten together. Given the combinations of foods that can't be eaten together, I am trying to develop an algorithm that will allow me to eat all the foods in the smallest number of meals.
What I am trying to do is formulate the problem as a graph matching problem. Each node represents a food, and an edge between nodes means that the two foods cannot be eaten together. However, I am not sure how to use a matching algorithm to solve the problem. Furthermore, I am not sure if this is the best way to solve the problem.
Here's something that I am trying to expand on: I want to add weights to the edges. I still want the fewest number of meals, but I want to maximize the sum of the weights of the edges. Running just a maximum weight algorithm doesn't guarantee me the fewest meals.
In the case that I have multiple matchings that minimize the number of meals, I feel that I can then run a maximum weight matching algorithm on the result to find the solution that maximizes the sum of the weights. Is this a correct train of thought?