Блог пользователя gamegame

Автор gamegame, история, 7 лет назад, По-английски

I have seen a problem about bipartite matching on a special weighted graph and i would like to know the solution. The graph is similar to 875F - Royal Questions where nodes in one sides have at most 2 neighbours and the weight of these two edges are the same. However, each edge has 2 weights Ai and Bi, and the total weight is (sum of A)*(sum of B). The task is to find a maximum matching with highest total weight. N<=10000 and A,B<=30 where N is the number of nodes. Could someone give hints/solutions about this problem? Million thanks!

  • Проголосовать: нравится
  • +31
  • Проголосовать: не нравится

»
7 лет назад, # |
  Проголосовать: нравится -10 Проголосовать: не нравится

Auto comment: topic has been updated by gamegame (previous revision, new revision, compare).

»
7 лет назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

Let's find optimal sum with weights of right part = 0, and optimal sum with weights of left part = 0.

Answer is sumA * sumB

»
3 года назад, # |
  Проголосовать: нравится +19 Проголосовать: не нравится

This problem is basically Time is Money with matching instead of spanning tree I think

  • »
    »
    3 года назад, # ^ |
      Проголосовать: нравится +15 Проголосовать: не нравится

    I think this comment is incorrect, can someone clear this up?

    That trick works for Time is Money because in that problem we want to minimize and the shape being convex means that the first point that lies outside of that shape is in the border of the convex hull, but here we want to maximize so the same doesn't apply.