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

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

Is it possible to find MinCost MaxFlow if there is a negative cycle on the network?

For clarification: in this given network, each edge has unit capacity and the number denoted on each edge defines the cost. A is source and D is sink. In this network MaxFlow is 1 and MinCost is -3.

How to calculate the MinCost properly?

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

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

Answers to your questions are kinda yes and no simultaneously.

Yes, it is possible to find max flow min cost in that case. But no, standard MFMC don't do that in a sense that this is kinda separate problem. You need to modify your network before you use standard MFMC algorithms. You need to search for negative cycles as long as they exist and cancel them. Cost strictly decreases with every cancelled cycle, so you can't do that in infinity, but it doesn't seem to be a polynomial bound for time of this. Once you have network without negcycles, you can execute any MFMC algo.

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

    If I'm not mistaken, when we cancel cycles with minimal average cost, it works in polynomial time. I remember some bounds like O((VE)^2 log(CV)) for integer case.

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

    How do we cancel the cycles?

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

      Find a negative cycle (well known problem, but a quite nasty one), find edge with lowest capacity c on it and let flow c units through it.