Skip to content

Commit

Permalink
fix time complexty of maxflow
Browse files Browse the repository at this point in the history
  • Loading branch information
yosupo06 committed Apr 6, 2023
1 parent 198f33d commit c1c9fbe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions document_en/maxflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ It adds an edge oriented from the vertex `from` to the vertex `to` with the capa

**@{keyword.complexity}**

- $O(\min(n^{\frac{2}{3}}m, m^{\frac{3}{2}}))$ (if all the capacities are $1$) or
- $O(n^2 m)$ (general),
- $O((n + m) \sqrt{m})$ (if all the capacities are $1$),
- $O(n^2 m)$ (general), or
- $O(F(n + m))$, where $F$ is the returned value

where $m$ is the number of added edges.

Expand Down
3 changes: 2 additions & 1 deletion document_ja/maxflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,9 @@ int graph.add_edge(int from, int to, Cap cap);

$m$ を追加された辺数として

- $O(\min(n^{\frac{2}{3}}m, m^{\frac{3}{2}}))$ (辺の容量がすべて $1$ の時)
- $O((n + m) \sqrt{m})$ (辺の容量がすべて $1$ の時)
- $O(n^2 m)$
- 返り値を $F$ として $O(F(n + m))$

## min_cut

Expand Down

0 comments on commit c1c9fbe

Please sign in to comment.