Planar Graph Checker

Euler's Formula · Kuratowski's Theorem · K₅/K₃₄₃ Detection · Genus Calculator

Determine if a graph is planar using V−E+F=2, edge-bound checks, bipartite bounds, and K₅/K₃₄₃ subdivision search. Enter an edge list to get started.

Quick Examples

Supports integer or single-letter labels. Maximum 12 nodes for complete K₅/K₃₄₃ subdivision checks.

What Is a Planar Graph?

A planar graph is a graph that can be embedded in the Euclidean plane — that is, drawn on a flat surface so that no two edges intersect except at their shared endpoints. Equivalently, it can be drawn on the surface of a sphere without crossings. This property has profound theoretical importance and practical applications across computer science, engineering, and mathematics.

Familiar examples of planar graphs include trees (no cycles, hence always planar), polygon graphs like triangles and squares, and the skeleton of any convex polyhedron (tetrahedron, cube, dodecahedron). The complete graph K₄ and the utility graph are planar; K₅ (five cities all directly connected) is the simplest non-planar graph.

Euler's Formula: V − E + F = 2

The cornerstone of planarity theory is Euler's polyhedral formula, discovered by Leonhard Euler in 1752. For any connected planar graph with V vertices, E edges, and F faces (regions bounded by edges, including the unbounded outer face):

V − E + F = 2

The quantity χ = V − E + F is called the Euler characteristic. For connected planar graphs χ = 2; for disconnected graphs with C components, χ = C + 1. This formula immediately gives two necessary conditions for planarity:

  • For any simple planar graph with V ≥ 3: E ≤ 3V − 6 (since each face is bounded by at least 3 edges)
  • For bipartite planar graphs with V ≥ 3: E ≤ 2V − 4 (bipartite graphs have no odd cycles, so each face needs at least 4 boundary edges)

These are necessary but not sufficient conditions. A graph violating either bound is definitely non-planar; one satisfying both may still be non-planar (for example, the Petersen graph passes E ≤ 3V−6 but is non-planar).

Kuratowski's Theorem

Kuratowski's theorem (1930) provides the complete characterization: a finite graph is planar if and only if it contains no subdivision (also called a topological minor) of K₅ or K₃₄₃. A subdivision of a graph replaces each edge with a path of one or more edges — the internal vertices of these paths are called subdivision vertices.

K₅ is the complete graph on 5 vertices (10 edges). K₃₄₃ is the complete bipartite graph with parts of size 3 and 3 (9 edges, representing three utilities connected to three houses). These two graphs are the unique minimal non-planar graphs.

Wagner's Theorem (Graph Minors Version)

An equivalent formulation is Wagner's theorem (1937): a graph is planar if and only if it has neither K₅ nor K₃₄₃ as a graph minor. A minor is obtained by contracting edges, deleting edges, or deleting vertices — a stronger operation than subdivision. Wagner's theorem connects planarity to the deep Graph Minor Theory of Robertson and Seymour.

The Four Color Theorem

Every planar graph is 4-colorable: its vertices can be colored with at most 4 colors such that no two adjacent vertices share the same color. This is the celebrated Four Color Theorem, first conjectured in 1852 and proved in 1976 by Appel and Haken — the first major theorem proved with substantial computer assistance. In map-coloring terms: any political map can be colored with 4 colors so that no two countries sharing a border have the same color.

Graph Genus

For non-planar graphs, the genus g is the minimum number of handles attached to a sphere that allows a crossing-free embedding. Planar graphs have genus 0. K₅ and K₃₄₃ have genus 1 (they embed on a torus but not a sphere). A lower bound for non-bipartite graphs is:

g ≥ ⌈(E − 3V + 6) / 6⌉

Reference Table: Common Graphs

GraphVEPlanar?Reason
K₃ (triangle)33YESV−E+F=2, F=2
K₄46YESTetrahedral, E=3V−6
K₅510NOE=10 > 3×5−6=9
K₃₄₃69NOBipartite, E=9 > 2×6−4=8
Cube Q₃812YESBipartite, E=12 ≤ 2×8−4=12
Petersen graph1015NOContains K₃₄₃ subdivision
Octahedron612YESE=12 = 3×6−6 (tight)
Icosahedron1230YESE=30 = 3×12−6 (tight)

Applications of Planar Graphs

  • Circuit board design (PCB layout): A circuit is planar if its components can be laid on a single layer without wire crossings, reducing cost and interference.
  • VLSI chip design: Minimizing wire crossings in integrated circuits uses planarity testing algorithms (linear-time algorithms due to Hopcroft-Tarjan, 1974).
  • Map coloring: Political maps are planar graphs; the four color theorem guarantees 4-color solutions.
  • Network layout: Visualizing planar networks (water mains, electrical grids, subway maps) without visual clutter exploits planarity.
  • Computer graphics: Planar mesh triangulations underlie 3D rendering algorithms and finite-element simulations.
  • Molecular chemistry: Some molecular graphs (like glucose rings) are planar; non-planar molecular graphs correspond to topologically linked or knotted molecules.

Frequently Asked Questions

What is a planar graph?
A planar graph is a graph that can be drawn on a flat plane such that no two edges cross each other (except at shared endpoints). Common examples include trees, cycle graphs Cₙ, and the complete graph K₄. Maps of countries and road networks are naturally modelled as planar graphs. The study of planar graphs connects to topology, combinatorics, and algorithm design.
What is Euler's formula for planar graphs?
Euler's formula states V − E + F = 2 for any connected planar graph, where V is the number of vertices, E the number of edges, and F the number of faces (including the outer unbounded face). For disconnected graphs with C components: V − E + F = C + 1. This formula immediately gives the bounds E ≤ 3V − 6 and (for bipartite graphs) E ≤ 2V − 4.
What is Kuratowski's theorem?
Kuratowski's theorem (1930) states that a graph is planar if and only if it contains no subdivision of K₅ (complete graph on 5 vertices) or K₃₄₃ (complete bipartite 3+3) as a subgraph. A subdivision replaces edges with internally vertex-disjoint paths. This gives a complete structural characterization of non-planar graphs. Wagner's theorem is an equivalent formulation using graph minors (edge contractions) instead of subdivisions.
Is K₅ planar?
No. K₅ (the complete graph on 5 vertices) is NOT planar. It has V=5, E=10, which violates the necessary condition E ≤ 3V−6 = 9. No matter how you try to draw K₅ on a plane, at least one pair of edges will cross. K₅ is one of the two fundamental non-planar graphs in Kuratowski's theorem. By contrast, K₄ is planar — it is exactly the skeleton of a tetrahedron.
Is the Petersen graph planar?
No. The Petersen graph (V=10, E=15) is not planar. Although it passes the basic edge bound (15 ≤ 3×10−6=24), it contains a subdivision of K₃₄₃. The Petersen graph is a highly symmetric 3-regular graph that serves as a classic counterexample to many graph-theory conjectures, including being non-Hamiltonian for certain traversals and requiring 4 colors for its edges (edge-chromatic number 4).
What is the four color theorem?
The four color theorem states that any planar graph can be properly vertex-colored using at most 4 colors (no two adjacent vertices share the same color). Equivalently, any geographic map can be colored with 4 colors so bordering regions are differently colored. Conjectured in 1852 and proved in 1976 by Appel and Haken using computer-assisted case analysis, it applies exclusively to planar graphs — non-planar graphs may require more colors (K₅ needs 5 colors).
What is graph genus?
The genus of a graph is the minimum number of handles attached to a sphere so the graph can be drawn without edge crossings on the resulting surface. A sphere (genus 0) accommodates exactly the planar graphs. A torus (genus 1, one handle) accommodates K₅ and K₃₄₃. Higher-genus graphs require more handles. The genus lower bound is g ≥ ⌈(E − 3V + 6) / 6⌉. Computing exact genus is NP-hard in general.