Skip to main content

Is thatit possible to find an algorithm with complexity of Ocheck a graph for acyclicity in $O(n|V|) to find an acyclic graph$ time?

I wonder if I can make an algorithm to check if a given graph G(V,E)$G=(V,E)$ is acyclic or not with the complexity of O(|V|)$O(|V|)$. I modified the BFS algorithm to do this, but the complexity seems to be O(|V|+|E|)$O(|V|+|E|)$.

I wonder if I can make an algorithm to check if a given graph G(V,E) is acyclic or not with the complexity of O(|V|). I modified the BFS algorithm to do this, but the complexity seems to be O(|V|+|E|).

I wonder if I can make an algorithm to check if a given graph $G=(V,E)$ is acyclic or not with the complexity of $O(|V|)$. I modified the BFS algorithm to do this, but the complexity seems to be $O(|V|+|E|)$.

Source Link

Is that possible to find an algorithm with complexity of O(n) to find an acyclic graph?

I wonder if I can make an algorithm to check if a given graph G(V,E) is acyclic or not with the complexity of O(|V|). I modified the BFS algorithm to do this, but the complexity seems to be O(|V|+|E|).