asked 88.8k views
1 vote
How do you prove that there must be at least one cycle in any graph with n vertices?

asked
User YeJiabin
by
8.6k points

1 Answer

1 vote

The existence of a cycle in directed and undirected graphs can be determined by whether depth-first search (DFS) finds an edge that points to an ancestor of the current vertex (it contains a back edge). All the back edges which DFS skips over are part of cycles.

answered
User Leedit
by
8.0k points

No related questions found

Welcome to Qamnty — a place to ask, share, and grow together. Join our community and get real answers from real people.