Skip to content
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

[Problem proposal] Triangle detection #926

Closed
koba-e964 opened this issue Feb 19, 2023 · 2 comments
Closed

[Problem proposal] Triangle detection #926

koba-e964 opened this issue Feb 19, 2023 · 2 comments

Comments

@koba-e964
Copy link
Contributor

koba-e964 commented Feb 19, 2023

Problem name: Triangle detection
Problem ID: triangle_detection

Problem

単純無向グラフが与えられる
3 頂点であってどの組も互いに結ばれているものを一つ見つけるか、ないことを報告せよ

類題: #442

Constraint

  • $1 \leq N, M \leq 10^5$
  • 与えられるグラフは単純

Solution / Reference

https://www.researchgate.net/publication/220618165_Finding_a_Minimum_Circuit_in_a_Graph の方法で $O(M^{3/2})$

(Optional) Input

N M
u_0 v_0
: 
u_{M-1}, v_{M-1}

(Optional) Output

Yes
a b c

or

No
@yosupo06
Copy link
Owner

https://judge.yosupo.jp/problem/enumerate_triangles ?

検出だけならもっといい計算量あるんでしょうか

@koba-e964
Copy link
Contributor Author

koba-e964 commented Feb 19, 2023

数えるのも $O^*(M^{3/2})$ でできたんですね…。
close します

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants