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

Автор burger016, 15 лет назад, По-английски
Hello all, 

Hope you all are fine. Recently i am learning about Dinic algorithm, but it is little tough for me to understand alone, can anyone please tell me about what is happening in the "Example" part of http://en.wikipedia.org/wiki/Dinic's_algorithm, i did Edmonds-karp algorithm earlier.
I found that there are two new concept in this algorithm, 
1. Layered Graph.
2. Blocking Flow.

please tell me why actually i should use Layered Graph here ?? and also please tell me how to find blocking flow. I have googled for dinic algorithm but didn't find anything that would satisfy me. Looking for some one to reply me.

Thanks.

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

15 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится
Layred graph is graph with O(n) edges (u,v) such that level[u]+1=level[v].
Level[u]- size of shortest path from source to u.
Blocking Flow is flow such that we can not increase flow in any path from s to t.
15 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

one step of dinnic algorithm

1) d[s] = 1, d[i] = inf, then use bfs to find shortest paths

2) use Edmonds-karp algorithm to find maximum flow in graph, using only edges (u, v) such that d[u] + 1 = d[v]


15 лет назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится
You don't need to be so scandalous... pick a better name next time.
I read the dinic in wikipedia too, doesn't contains a proof about complexity...
What I understand was to "build" a new graph, (using a bfs) to allow the search to a new flow over some edges specifically (using dfs). And it's fast! A good problem to test a solution it's FASTFLOW (spoj), and here a lot of red guys discussion about it : click me