liveBook · Manning

Cycle

As explained in Graph Neural Networks in Action

A cycle is a graph path that begins and ends at the same node without repeating intermediate nodes.

A cycle is a graph path that starts at a node and returns to that node without retracing steps or repeating intermediate nodes. Cycles may occur in directed or undirected graphs; acyclic graphs contain no such return path. section 1.2.2

Use these distinctions when modeling or validating graph data:

  • A cyclic graph permits a circular path; an acyclic graph does not. section 1.2.2
  • A directed acyclic graph (DAG) has directed edges and forbids cycles, supporting one-way causal, workflow, and dependency relationships. section 1.2.2
  • During testing, inspect isolated groups whose relationships form a cycle and verify that data models and analytical tools handle them correctly. section 8.2.4
Figure 1.4 A cyclic graph (left), an acyclic graph (right), and a DAG (bottom). In the cyclic graph, the cycle is shown by the arrows (directed edges) connecting nodes A-E-D-C-B-A. Note that two nodes, G and F are part of the graph, but not part of its defining cycle. The acyclic graph is composed of undirected edges, and no cycle is possible. In the DAG, all directed edges flow in one direction, from A to F.
figure

Compare a cyclic graph, an acyclic graph, and a DAG; the cyclic example follows A-E-D-C-B-A, while other nodes may remain outside the cycle. section 1.2.2

How Graph Neural Networks in Action covers it

How deep it goes
Defines return paths, contrasts cyclic and acyclic graphs, and stops short of algorithmic cycle detection.
Examples
Uses the path A-E-D-C-B-A and an isolated candidate group whose relationships form a cycle.
What you can do after
Diagnose graph data by identifying cycles and checking whether analytical tools handle isolated cyclic groups.
How it connects
Connects cycles with directed graphs, acyclic graphs, DAGs, causal analysis, workflows, and dependency chains.

Also explained in

Compare how 5 books explain cycle →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Graph Neural Networks in Action. The section links point to the parts of the book it draws on.