Best order to allocate services in graph using custom comparator

38 Views Asked by At

Good day!

I have a lot of graphs with different properties: structure, number of nodes & edges, etc. All of them are undirected, "weighted" (edges have width, in other words capacity). In each graph my goal is to allocate as many services as possible. Service is a triple of <start_vertice, dest_vertice, capacity>. The main difference is that the same frequency range should be allocated for each edge of the path of some service. But it's not so important for my question.

The greedy algorithm I have work as follows:

  1. Sort all the services with comparator, that uses next parameters of the services: capacity, shortest path length, degree in "service shortest paths intersection graph", etc.
  2. Select the minimal service w.r.t. comparator.
  3. Allocate it.
  4. Return to step 2.

What wondered me is that changing parameters order and priority in comparator (in-)decreased number of services allocated significantly. For example, here's results for some of them:

  1. Comparator choosing the <minimal capacity, maximal degree> services allocated 541 out of 725.
  2. Whereas <maximal capacity, minimal degree> -- 421 out of 725.

Finally, my question: how to optimally choose comparator (it's parameters, order, priority) for all the graphs I have? Optimal comparators are not the same for all of them because of the strong graphs differences.

Is it possible to train Neural Network to classify some graphs by their parameters (|E|, |V|, cliques, diameter, radius, etc) and suggest for them some comparator?

Thanks.