# Using Neural Networks for Combinatorial Optimization [closed]

Dear AI/Neural Network community,

I have a problem from combinatorial optimization and want to try to solve it with a neural network. The problem is roughly as follows:

I have a sorted list of objects with some attributes, think of a schedule of dishes for hospital meals for one week. These items have to be sorted in an optimal way respecting some limitations, like - a certain parameter may not have the same value in two items that follow one another (like "no two rice dishes directly after each other", i.e. the parameter "kind of dish" may not have the value "15" (rice dish) in two subsequent dishes) - there is a number indicating a light priority measure how soon in the list the item should appear (think of an urgency value according to some ingredients that may spoil over a few days) - there are items in the list that have to be in the correct order (item A should be before item B)

None of these requirements is absolute, but in sum (of penalty points) we want to achieve "the" minimum of this function, or at least a good candidate.

At the moment we are building a penalty function of these aspects (more requirements might come at a future time) and building a gradient optimization approach around it. (we define a neighborhood of one ordering of items by: "ordering B is in the neighborhood of ordering A if we get B by exchanging two items in A" and look for the best improvement in this neighborhood.)

Is there a way to perform this optimization with a neural network? If so (which I hope!), I would most likely give as input the relevant variables for each of the items in the list that has to be sorted. But what shape does the output layer take?

How can I train the algorithm if I do not know exact solutions due to the problem size? I have the penalty function as a given, and maybe some locally optimal solutions from above algorithm, if absolutely necessary. Is feedback by the penalty function somehow enough?

How do I handle different problem sizes (like in some weeks Saturdays also have to be served)? Zero Padding in the input layer?

I am not sure how easy or difficult this problem is, but would be very happy if you could give me some pointers (maybe terms I can google that I did not think of in this context). My background: Mathematician with some background in optimization, but almost no knowhow in AI/NN - although very keen to learn more! I have seen and tried to understand a few of the examples for DL4J.

## closed as unclear what you're asking by Michael Chernick, Xi'an, kjetil b halvorsen, usεr11852, StatsStudentFeb 16 at 14:54

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.