Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

Recipe

Classify a closed sequence of vertices

Use when: you're given a specific closed sequence of vertices in a graph and asked whether it's a closed walk, a circuit, or a cycle

Goal: the tightest classification the sequence actually earns, plus the check that proves it

Taught in Closed walks, circuits, and cycles, revisited

  1. 1

    Check that every consecutive pair in the sequence is a real edge of the graph, and that the sequence starts and ends at the same vertex.

    Example

    On the two-triangles graph (edges AB, BC, CA, CD, DE, EC), the sequence A,B,C,A uses \{A,B\}, \{B,C\}, \{C,A\}, all real edges, and returns to A.

    Why: this is the minimum requirement; every circuit and every cycle must first be a legitimate closed walk.

  2. 2

    List the edges the sequence actually uses, in order, and look for a repeat. No repeated edge upgrades the closed walk to a circuit.

    Example

    A,B,C,A uses three distinct edges, no repeats, so it's a circuit. Contrast A,B,C,B,A: it uses \{A,B\}, \{B,C\}, then \{C,B\} again and \{B,A\} again, repeating both edges, so it stays a closed walk only.

    • no edge repeats — it's at least a circuit, continue to Step 3
    • an edge repeats — stop here, it's a closed walk but not a circuit

    Why: a trail, by definition, never reuses an edge, and a circuit is exactly a closed trail.

  3. 3

    Look at every vertex in the sequence except the shared start and end vertex, and check for a repeat among them.

    Example

    A,B,C,A has interior vertices B,C, no repeat, so it's a cycle. The sequence A,B,C,D,E,C,A uses six distinct edges (a circuit), but its interior vertices are B,C,D,E,C, and C repeats, so it's a circuit without being a cycle.

    • no interior vertex repeats — it's a cycle
    • an interior vertex repeats — it's a circuit, but not a cycle

    Why: a path never revisits a vertex, and a cycle is exactly a closed path except for its forced repeat at the start and end.

Common mistakes

  • Declaring a sequence a cycle just because it's a circuit, without separately checking for a repeated interior vertex.
  • Checking for a repeated vertex first and stopping there, without ever checking whether an edge repeated.
  • Miscounting an edge as new when it's really the same edge traversed in the opposite direction.
  • Forgetting that the shared start and end vertex is expected to repeat once, and isn't itself a violation of the cycle test.