Tuesday 15 February 2011

algorithm - Affect m students to n groups, but with constraints? -


I asked about minimum cost maximum flows. I did it and it works fine (only available in French, sorry). In addition, the algorithm can handle each student by assigning projects to i ( i 1).

Now I am trying to do more difficult. I want to add obstacles to the options. In case any one of our students i ( i 1 ) Wants to influence projects, I want to be able to specify which projects are compatible (one another)

In this case, some projects are not compatible, I would like to return to the Global Optimum Return Want algorithm, i.e. to each student To maximize global happiness, i affect the projects and <

Repeatedly on the original method (and checking obstacles in each stage)

Channing will not help, because it will only return local optimal.

Any ideas about working with the right graph? Unfortunately, this is not a solution in multilateral time (as long as P = NP

or additional constraints).

Here's a decrease in multiple time (which is NP-complete) by doing one of the most independent set problems:

a graph g and a number Looking at k , do the follo wings:

  1. Create a project for each head in graph g and say two Projects are inconsistent if there is an edge between the related edge in iff g .

  2. Create such a student who likes each project equally (we can assume that every project that gives them happiness is 1 Is equal to).

  3. Get the maximum happiness by using an algorithm that resolves the problem you have asked in your question. Let's call it at h .

  4. If they are all relevant then they can choose a set of projects, which means that G is the creation of an independent set (the way we Graph was created).

  5. Thus, h is the size of the maximum independent set.

  6. Return h> = K .

What does this mean in practice? This means that the polynomial of this problem is not appropriate to see time solutions.

  • If it is too low, then it may be:

    1. If the input is small, you can use the full search You can.

    2. No, you can use heuristics and / or projections to find a relatively good solution (though optimal one is not necessary).


  • No comments:

    Post a Comment