Planarity testing and planar embedding for undirected graphs.
This module provides exact planarity checks using the Left-Right (LR) Planarity Test (de Fraysseix–Rosenstiehl), combinatorial embedding extraction, and Kuratowski witness identification.
Functions
| Problem | Function | Complexity |
|---|---|---|
| Planar check | planar?/1 | O(V^2) |
| Planar embedding | planar_embedding/1 | O(V^3) |
| Kuratowski witness | kuratowski_witness/1 | O(V^3) |
Examples
iex> k5 = Yog.Generator.Classic.complete(5)
iex> Yog.Property.Planarity.planar?(k5)
false
iex> k33 = Yog.Generator.Classic.complete_bipartite(3, 3)
iex> Yog.Property.Planarity.planar?(k33)
false
Summary
Functions
Identifies a Kuratowski witness (a subdivision of K5 or K3,3) that proves the graph is non-planar.
Returns true if the graph is planar (exactly).
Returns a combinatorial embedding if the graph is planar.
Functions
Identifies a Kuratowski witness (a subdivision of K5 or K3,3) that proves the graph is non-planar.
Returns true if the graph is planar (exactly).
Uses the Left-Right (LR) Planarity Test (de Fraysseix–Rosenstiehl algorithm). It decomposes the graph into a DFS tree and back-edges, then determines if back-edges can be partitioned into "Left" and "Right" sides without crossing.
Returns a combinatorial embedding if the graph is planar.