IsAcyclicGraph
Whether a Graph contains no cycle.
✓ checked against that system · ! checked, with disagreements (hover a chip)Wolfram Language
AcyclicGraphQ✓IsAcyclicGraph(g)true iff g has no cycle, respecting edge direction where g has directed edges.Typed signatures
| Type | Package | Applies |
|---|---|---|
(value) -> boolean | combinatorics | always |
Details
- Wolfram calls this
AcyclicGraphQ; this library uses theIs…spelling everywhere. - A self-loop, and two vertices joined by directed edges in BOTH directions, both count as cycles. An undirected edge alone never does -- walking straight back over the SAME edge you just arrived by isn't a cycle, so a plain undirected tree reads acyclic (matches IsTreeGraph's own edges = vertices - 1 check).
Examples
About
| Examples | 3 |
|---|---|
| Checked against | Wolfram Language 3 agreeSageMath 3 agree |
| Crosswalk | Wolfram Language |
Implementation
mapped
sagepackages/oracle/src/mappings.ts See also: IsTreeGraph, IsPathGraph