Simplify Your Workflow: Search MiniWebtool.
Add Extension
Home Page > Math > Advanced Math Operations > Planar Graph Checker

Planar Graph Checker

Check whether a graph is planar (drawable without edge crossings) using Kuratowski's theorem. Detects K5 and K3,3 subdivisions, verifies Euler's inequality m ≤ 3n − 6, and highlights the forbidden minor visually when the graph is non-planar.

Planar Graph Checker
Accepts A-B, A B, A,B, or for adjacency lists A: B, C. Edges are treated as undirected. Vertex labels can be letters, digits, or underscore. Limit: 16 vertices and 60 edges.

Embed Planar Graph Checker Widget

About Planar Graph Checker

The Planar Graph Checker decides whether a simple undirected graph is planar — drawable in the plane without any two edges crossing — and, when the graph fails the test, it finds and visualises the Kuratowski witness: a subdivision of either K₅ (the complete graph on 5 vertices) or K₃,₃ (the complete bipartite graph on 3 + 3 vertices). The tool is built for teaching, competitive programming warm-ups, and quickly sanity-checking small graph constructions.

What Does "Planar" Mean?

A graph G = (V, E) is planar if it can be embedded in the plane so that edges meet only at their shared endpoints — no crossings. Equivalently, G can be drawn on the surface of a sphere without crossings. Planarity is a purely topological property: it does not depend on how you draw the graph, only on whether some crossing-free drawing exists.

Planar graphs show up everywhere — road and utility networks, printed-circuit-board routing, the edge graphs of Platonic solids, and the face structure of polyhedra. Yet many "natural" graphs are stubbornly non-planar: any time you try to connect 3 houses to 3 utilities without crossings, you run into the K₃,₃ barrier.

Kuratowski's Theorem — The Heart of the Checker

Kazimierz Kuratowski proved in 1930 that planarity has a purely combinatorial characterisation:

A finite graph is planar ⇔ it contains no subdivision of K₅ and no subdivision of K₃,₃.

A subdivision of a graph H is obtained by replacing some edges of H with longer paths whose internal vertices are all new degree-2 vertices. Kuratowski's theorem therefore says that K₅ and K₃,₃ are the only obstructions to planarity — every non-planar graph contains one of them in a "stretched" form.

The Forbidden Graphs

GraphVerticesEdgesStructurePlanar?
K₅510Every pair of vertices is joined by an edge (complete graph).No
K₃,₃69Two triples A and B; every a ∈ A is joined to every b ∈ B.No
K₄46Complete graph on 4 vertices.Yes
K₂,₃56Complete bipartite 2 × 3.Yes

Euler's Formula and Fast Necessary Conditions

Before running the (relatively expensive) subdivision search, the checker applies two fast necessary conditions derived from Euler's formula: for any connected planar graph drawn in the plane with V vertices, E edges, and F faces (counting the unbounded outer face), we have

V − E + F = 2 (Euler's formula for connected planar graphs) V − E + F = 1 + c (for a planar graph with c connected components)

Combined with the observation that every face of a simple planar graph has at least 3 edges on its boundary, we get the edge-upper-bound

m ≤ 3n − 6 (simple planar, n ≥ 3) m ≤ 2n − 4 (bipartite simple planar, n ≥ 3)

Any graph violating these inequalities is immediately non-planar, no subdivision search needed. K₅ has m = 10, n = 5 ⇒ 3n − 6 = 9, so 10 > 9 — violates the bound. K₃,₃ has m = 9, n = 6 ⇒ 2n − 4 = 8, so 9 > 8 — violates the bipartite bound.

How the Subdivision Search Works

After the cheap Euler checks, the checker searches for a subdivision directly:

  1. Quick win — detect K₅ or K₃,₃ as a literal subgraph. If 5 vertices are pairwise adjacent, that's K₅ outright. If 6 vertices split 3 + 3 with all 9 cross-edges present, that's K₃,₃.
  2. K₅ subdivision search. For each candidate set of 5 "branch" vertices (each with degree ≥ 4 in G), try to find 10 paths — one per pair of branches — that are internally vertex-disjoint (no non-branch vertex appears in more than one path) and avoid using the other branches as internal vertices. A hit proves non-planarity.
  3. K₃,₃ subdivision search. Pick 6 branches (each with degree ≥ 3) and a 3 + 3 bipartition. Search for 9 cross-pair paths with the same internal-disjointness requirement.
  4. No witness ⇒ planar. If neither subdivision is found within the size limits, Kuratowski's theorem guarantees the graph is planar.

Finding vertex-disjoint paths is NP-hard in general, so the checker uses a bounded randomised greedy search: each iteration orders the required pairs by difficulty, picks a path for the hardest pair first using a randomised BFS, removes those internal vertices, and continues. If that particular ordering fails, it retries with a shuffled order — up to 40 attempts per branch configuration. On every small graph tested (up to 16 vertices), this suffices to locate a witness whenever one exists.

How to Use This Calculator

  1. Pick an input format using the tabs at the top: edge list or adjacency list. Either encodes the same graph.
  2. Enter your graph. The graph is treated as undirected, so A-B and B-A are the same edge.
  3. Click Check Planarity. The tool reports a verdict, shows step-by-step reasoning (Euler, bipartite, Kuratowski), and renders the graph.
  4. For a non-planar graph the visualisation colours the K₅ or K₃,₃ subdivision and lists the 10 (or 9) vertex-disjoint paths. Click a path row to isolate it.
  5. For a planar graph the face count F = m − n + 1 + c is reported alongside the graph structure.

Worked Example 1 — K₄ is planar

K₄ has n = 4, m = 6. Every graph on ≤ 4 vertices is planar, and indeed K₄ embeds as a triangle with a single vertex inside connected to all three corners. Euler says F = 6 − 4 + 2 = 4 faces: three triangular inner faces plus the outer face.

Worked Example 2 — K₃,₃ is non-planar

K₃,₃ has n = 6, m = 9. It is bipartite, so the bipartite bound applies: m = 9 > 2n − 4 = 8. This alone proves non-planarity. The witness is trivial — K₃,₃ is itself the forbidden subgraph. The tool then highlights the 3 + 3 partition and 9 direct edges.

Worked Example 3 — The Petersen graph

The Petersen graph has n = 10, m = 15, so m ≤ 3n − 6 = 24 and the fast Euler checks pass. Yet it is famously non-planar. The checker locates a K₃,₃ subdivision: pick six vertices from the outer pentagon and inner pentagram so that every cross-pair can be routed through the remaining four vertices by vertex-disjoint paths. The tool draws the witness, making the 1930s geometry tangible.

Applications of Planarity

Frequently Asked Questions

What does planar mean for a graph?

A graph is planar if you can draw it on the plane so that no two edges cross each other except at shared vertices. Equivalently, a graph is planar if and only if it can be drawn on the surface of a sphere without crossings. Trees, cycles, the cube graph, and the Platonic solids are all planar, while K₅ and K₃,₃ are the canonical non-planar examples.

What is Kuratowski's theorem?

Kuratowski's theorem states that a finite graph is planar if and only if it contains no subgraph that is a subdivision of K₅ or K₃,₃. A subdivision is obtained by replacing some edges with longer paths, each through brand-new degree-2 vertices. This gives a concrete combinatorial certificate of non-planarity.

What is the difference between K₅ and K₃,₃?

K₅ has 5 vertices, every pair of which is joined by an edge, for 10 edges total. K₃,₃ has 6 vertices partitioned into two groups of 3, with every vertex in one group connected to every vertex in the other, for 9 edges. Both are the smallest non-planar graphs of their kind, and together they form the forbidden minors for planarity.

How does Euler's inequality help?

Euler's formula V − E + F = 2 for planar connected graphs combined with the fact that every face of a simple planar graph has at least 3 edges yields m ≤ 3n − 6. Any simple graph violating this bound is immediately non-planar. For bipartite planar graphs every face has at least 4 edges, giving the tighter bound m ≤ 2n − 4. The checker applies both as fast rejection rules.

What is the size limit?

The checker handles up to 16 vertices and 60 edges. This covers typical teaching and competition-style graphs including the Petersen graph, the Möbius-Kantor graph, small hypercubes, and the complete graph K₇. Larger graphs require linear-time specialised planarity tests such as Hopcroft-Tarjan or left-right planarity.

How is the witness subdivision drawn?

When the graph is non-planar, the 5 branch vertices of the found K₅ — or the 6 branch vertices of K₃,₃ split into two triples A and B — are highlighted on an inner ring. The 10 (or 9) required internally vertex-disjoint paths are each drawn in a distinct colour so you can trace the K₅ or K₃,₃ topology visually. Vertices and edges that are not part of the subdivision are dimmed.

Further Reading

Reference this content, page, or tool as:

"Planar Graph Checker" at https://MiniWebtool.com/planar-graph-checker/ from MiniWebtool, https://MiniWebtool.com/

by miniwebtool team. Updated: Apr 22, 2026

You can also try our AI Math Solver GPT to solve your math problems through natural language question and answer.

Related MiniWebtools:

Advanced Math Operations:

Top & Updated:

Random Name PickerRandom PickerInstagram User ID LookupFPS ConverterImage ResizerLine CounterSort NumbersRelative Standard Deviation CalculatorRemove SpacesRandom Truth or Dare GeneratorBatting Average CalculatorMAC Address GeneratorFacebook User ID LookupERA CalculatorFeet and Inches to Cm ConverterWord to Phone Number ConverterMAC Address LookupSun, Moon & Rising Sign Calculator 🌞🌙✨Slope and Grade CalculatorMP3 LooperSum CalculatorRandom Superpower GeneratorPercent Off CalculatorRandom IMEI Generator📷 OCR / Image to TextAudio SplitterRandom Quote GeneratorInvisible Text GeneratorWord Ladder GeneratorBitwise CalculatorNumber of Digits CalculatorVertical Jump CalculatorRoman Numerals ConverterSHA256 Hash GeneratorRandom Credit Card GeneratorAI Text HumanizerMerge VideosRandom Birthday GeneratorLog Base 10 CalculatorWAR CalculatorHalfway Date Calculator⬛ Aspect Ratio CalculatorMaster Number CalculatorCm to Feet and Inches ConverterSalary Conversion CalculatorPhone Number ExtractorRandom Meal GeneratorRandom Activity GeneratorSaturn Return CalculatorRandom Fake Address GeneratorFile Size ConverterOPS CalculatorNumber to Word ConverterIP Subnet CalculatorText FormatterSquare Root (√) CalculatorOn Base Percentage CalculatorRandom Poker Hand GeneratorRandom Writing Prompt GeneratorYouTube Channel StatisticsRandom Movie PickerSlugging Percentage CalculatorCaffeine Overdose CalculatorMercury Retrograde CalendarDecimal to BCD ConverterCompound Growth CalculatorLove Compatibility CalculatorVideo to Image ExtractorBattery Life CalculatorRandom Loadout GeneratorBCD to Decimal ConverterBinary to Gray Code ConverterStair CalculatorLeap Years List🖱️ Click CounterOctal CalculatorDNS LookupAdd Text to Image🎰 Gacha Pity CalculatorCM to Inches ConverterFirst n Digits of PiRandom Time GeneratorConnect the Dots GeneratorCompare Two Strings📅 Date CalculatorWeight Loss CalculatorSHA512 Hash GeneratorRemove AccentNumber ExtractorBingo Card GeneratorVideo CompressorProportion CalculatorImage SplitterAstrological Element Balance CalculatorImage CompressorPercent Growth Rate CalculatorOutlier CalculatorGray Code to Binary ConverterSmall Text Generator ⁽ᶜᵒᵖʸ ⁿ ᵖᵃˢᵗᵉ⁾Lottery Number GeneratorTime Duration CalculatorPER CalculatorCoin FlipperWhat is my Zodiac Sign?Arc Length CalculatorQuotient and Remainder CalculatorRandom Object GeneratorDiff CheckerDay of the Year Calculator - What Day of the Year Is It Today?Word Scramble GeneratorLongest Day of the YearAcreage CalculatorAdd Prefix and Suffix to TextBreak Line by CharactersFlip VideoList of Prime NumbersRandom Emoji GeneratorBolt Torque CalculatorWHIP CalculatorIP Address to Hex ConverterMultiple Fraction CalculatorURL ExtractorAngel Number CalculatorYouTube Tag ExtractorName Number CalculatorMandelbrot Set ExplorerModulo Calculator🔍 Plagiarism CheckerBcrypt Hash Generator / CheckerCone Flat Pattern (Template) GeneratorVideo SplitterPregnancy CalendarBroken Link CheckerMiter Angle CalculatorTessellation GeneratorDay of Year CalendarMD5 Hash GeneratorEmail ExtractorAI Language DetectorRandom Chord GeneratorSteel Weight CalculatorWhat is my Lucky Number?Social Media Username CheckerAntilog CalculatorLong Division CalculatorLunar Calendar ConverterSun Position CalculatorRandom Chess Opening GeneratorRandom Number PickerBinary to BCD ConverterMolarity CalculatorMartingale Strategy CalculatorRandom Line PickerHeight Percentile CalculatorMultiplication CalculatorIs it a Prime Number?Short Selling Profit CalculatorArctan2 CalculatorRandom Tournament Bracket GeneratorDMS to Decimal Degrees ConverterPercentile CalculatorFirst n Digits of eAI Punctuation AdderCollage MakerMorse Code GeneratorRounding CalculatorBonus CalculatorYouTube Earnings EstimatorRandom Name GeneratorRandom User-Agent GeneratorTaco Bar Calculator🔊 Tone GeneratorRemove Leading Trailing SpacesAdjust Video SpeedHypotenuse CalculatorRandom Group GeneratorHTML CompressorBoiling Point CalculatorRandomize NumbersReverse TextAPI TesterFraction CalculatorAI ParaphraserDue Date CalculatorLife Path Number CalculatorJulia Set GeneratorSquare Numbers ListColor InverterPVIF CalculatorPVIFA CalculatorCrossword Puzzle MakerRandom RPG Character GeneratorBirth Day of the Week CalculatorIncome Tax CalculatorHebrew Calendar ConverterGrade CalculatorSum of Positive Integers CalculatorExponential Decay CalculatorSort Lines AlphabeticallyHex to BCD ConverterBCD to Binary ConverterBCD to Hex ConverterMedian CalculatorStandard Error CalculatorList RandomizerAverage CalculatorReverse VideoRemove Audio from VideoActual Cash Value CalculatorScientific Notation to Decimal ConverterLog Base 2 CalculatorRoot Mean Square CalculatorSHA3-256 Hash GeneratorAI Sentence ExpanderLbs to Kg ConverterHex to Decimal ConverterConvolution CalculatorMAC Address AnalyzerRandom String GeneratorAmortization CalculatorMarkup CalculatorDecimal to Hex ConverterInstagram Font GeneratorSocial Media Image Size GuideTikTok Money CalculatorTwitter/X Character CounterTwitter/X Timestamp ConverterYouTube Watch Time CalculatorTwitch Earnings CalculatorYouTube Shorts Monetization CalculatorFacebook Ad Cost CalculatorSocial Media ROI CalculatorSocial Media Post Time OptimizerCTR CalculatorROAS CalculatorInfluencer ROI CalculatorForce CalculatorAcceleration CalculatorVelocity CalculatorMomentum CalculatorProjectile Motion CalculatorKinetic Energy CalculatorPotential Energy CalculatorWork and Power CalculatorDensity CalculatorPressure CalculatorIdeal Gas Law CalculatorFree Fall CalculatorTorque CalculatorHorsepower CalculatorDilution CalculatorChemical Equation BalancerStoichiometry CalculatorPercent Yield CalculatorEmpirical Formula CalculatorTitration CalculatorMole/Gram/Particle ConverterIrregular Polygon Area CalculatorFrustum CalculatorTorus Calculator3D Distance CalculatorGreat Circle Distance CalculatorCircumscribed Circle (Circumcircle) CalculatorInscribed Circle (Incircle) CalculatorAngle Bisector CalculatorTangent Line to Circle CalculatorHeron's Formula CalculatorCoordinate Geometry Distance CalculatorVolume of Revolution CalculatorSurface of Revolution CalculatorParametric Curve GrapherRiemann Sum CalculatorTrapezoidal Rule CalculatorSimpson's Rule CalculatorImproper Integral CalculatorL'Hôpital's Rule CalculatorMaclaurin Series CalculatorPower Series CalculatorSeries Convergence Test CalculatorInfinite Series Sum CalculatorAverage Rate of Change CalculatorInstantaneous Rate of Change CalculatorRelated Rates SolverOptimization Calculator (Calculus)Gradient Calculator (Multivariable)Divergence CalculatorCurl CalculatorLine Integral CalculatorSurface Integral CalculatorJacobian Matrix CalculatorNewton's Method CalculatorRREF Calculator (Row Echelon Form)Matrix Inverse CalculatorMatrix Multiplication CalculatorDot Product CalculatorCross Product CalculatorVector Magnitude CalculatorUnit Vector CalculatorAngle Between Vectors CalculatorNull Space CalculatorColumn Space CalculatorCramer's Rule CalculatorMatrix Diagonalization CalculatorQR Decomposition CalculatorCholesky Decomposition CalculatorMatrix Power CalculatorCharacteristic Polynomial CalculatorBayes' Theorem CalculatorF-Test / F-Distribution CalculatorHypergeometric Distribution CalculatorNegative Binomial Distribution CalculatorGeometric Distribution CalculatorExponential Distribution CalculatorWeibull Distribution CalculatorBeta Distribution CalculatorSpearman Rank Correlation CalculatorFisher's Exact Test CalculatorContingency Table CalculatorOdds Ratio CalculatorROT13 Encoder/DecoderAtbash Cipher ToolVigenère Cipher ToolPronunciation IPA ConverterHemingway-Style Readability EditorSentence Length Variance AnalyzerWord Frequency AnalyzerBusiness Days CalculatorAdd Business Days to DateDate Pattern GeneratorHow Long Until CalculatorHow Long Ago CalculatorBirthday Across Cultures CalculatorHijri Calendar ConverterInsulin Sensitivity Factor CalculatorCarb-to-Insulin Ratio CalculatorLean Body Mass to Strength CalculatorOne-Mile Walk Test (Rockport) CalculatorCooper 12-Minute Run CalculatorFFMI CalculatorAPGAR Score CalculatorGlasgow Coma Scale CalculatorWells Score Calculator (DVT/PE)Tennis Score TrackerSoccer xG (Expected Goals) CalculatorCricket Run Rate CalculatorRugby Points CalculatorBoxing Punch Power CalculatorRace Time PredictorSwimming SWOLF CalculatorYoga Pose Hold TimerFishing Knot Strength CalculatorBike Gear Ratio CalculatorClimbing Grade ConverterWine Pairing SuggesterStandard Drink CalculatorCaffeine Half-Life TrackerSpice Substitution FinderDietary Restriction Recipe FilterMarinade Time CalculatorFermentation Time CalculatorSmoking Wood Pairing GuideFreelance Project Pricing CalculatorSaaS Pricing CalculatorSubscription Cost TrackerSide Hustle ROI CalculatorRemote Work Savings CalculatorCoffee Habit Cost CalculatorGym vs Home Workout Cost CalculatorLunch Cost CalculatorWealth Growth Visualizer1031 Exchange CalculatorRental Yield CalculatorCash-on-Cash Return CalculatorBRRRR Method CalculatorSection 8 Rent CalculatorRoommate Rent SplitterAirbnb Pricing OptimizerStatute of Limitations CalculatorSentence Reduction CalculatorSales Tax Nexus CheckerPatent Filing Fee CalculatorTrademark Class FinderWill Asset Distribution CalculatorWorkers' Compensation CalculatorStopping Distance CalculatorTrip Cost SplitterVehicle Weight Distribution CalculatorTrailer Tongue Weight CalculatorTire Tread Wear CalculatorEngine Compression Ratio CalculatorHeadlight Beam Distance CalculatorCat Litter Box CalculatorAquarium Heater Wattage CalculatorBird Cage Size CalculatorReptile Habitat UVB CalculatorPet Travel Crate Size FinderHorse Hay CalculatorCrochet Hook Size ConverterKnitting Needle Size ConverterKnitting Pattern CalculatorCross-Stitch Floss CalculatorQuilt Binding CalculatorOrigami Paper Size CalculatorPottery Clay Shrinkage CalculatorBeading Pattern CalculatorResin Casting Volume CalculatorEmbroidery Thread Length CalculatorHiking Pace Calculator (Naismith's Rule)Backpacking Food Weight CalculatorTent Footprint Size CalculatorSleeping Bag Temperature Rating GuideKnot Tying Reference ToolStar Visibility CalculatorTide Time CalculatorReynolds Number CalculatorBernoulli Equation CalculatorHeat Transfer CalculatorThermal Expansion CalculatorSpecific Heat Capacity CalculatorGear Ratio Calculator (Mechanical)Pulley System CalculatorHydraulic Cylinder Force CalculatorBelt Length CalculatorCloset Capsule CalculatorStorage Unit Size CalculatorMoving Box Quantity CalculatorGift Card Tip CalculatorGas vs Electric Cost ComparisonPrint Cost CalculatorHair Dye Mixing CalculatorLaundry Detergent Dosage CalculatorDishwasher Load OptimizerTile Grout CalculatorPaint Color Mixing CalculatorFlashcard Spaced Repetition SchedulerLearning Curve CalculatorCornell Notes GeneratorVocabulary Quiz GeneratorLanguage Learning Hours to Fluency CalculatorCollege Cost CalculatorScholarship ROI CalculatorAI Recipe Generator (From Ingredients)AI Gift Idea GeneratorAI Meal Plan GeneratorAI Workout Plan GeneratorAI Reading List Generator