Skip to content

fix time complexty of maxflow #161

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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