Free Online Utility • MATH Studio • Exact BigInt Engine

Generate Sierpinski Maze

Generate navigable recursive Sierpinski fractal mazes built on self-similar Sierpinski Carpet corridors (orders 1–3) with randomized spanning portals, BFS shortest-path solver toggle, and PNG/SVG export.

Formula & Quick Reference Live Engine
Walkable cells: { (r, c) ∈ [0..3^n − 1]² : no base-3 digit pair is (1, 1) }
Total rooms = 8^n;  Guaranteed unique solution path via DFS spanning tree + BFS verification
13 × 3
29 × 9
327 × 27
FRACTAL LABYRINTH + BFS SOLVER
Generate Sierpinski Maze
High-DPI HTML5 Canvas & SVG Fractal Engine Vector-crisp

Session Calculation Log

No entries recorded in this session yet.

Complete Technical Guide to Generate Sierpinski Maze

A Sierpinski Maze carves a perfect spanning-tree labyrinth strictly through the 8^n walkable chambers of a Sierpinski Carpet, treating every recursive 3×3 fractal cutout as an impassable void!

Every generated maze guarantees a unique path between the top-left entrance and bottom-right exit, verified live by an integrated Breadth-First Search (BFS) shortest-path solver.

Recursive Carpet Domain + Spanning-Tree Labyrinth

Walkable cells: { (r, c) ∈ [0..3^n − 1]² : no base-3 digit pair is (1, 1) }
Total rooms = 8^n;  Guaranteed unique solution path via DFS spanning tree + BFS verification

Because the Sierpinski Carpet graph is connected at every finite order n, randomized depth-first spanning trees always link all 8^n rooms with zero unreachable pockets.

How to Use Generate Sierpinski Maze

  1. 1Pick Fractal Order 1 (3×3), 2 (9×9), or 3 (27×27 with 512 fractal chambers).
  2. 2Toggle the golden BFS solution path on or off to print puzzles for solving.
  3. 3Click Generate New Maze Portals for fresh labyrinths and export as PNG or SVG.

Reference Examples & Worked Benchmarks

Order nGrid SizeWalkable Chambers
13 × 38 rooms
29 × 964 rooms
327 × 27512 rooms

Practical Applications & Engineering Workflows

Printable Fractal Puzzles

Uncheck the solution path and export clean SVG/PNG mazes for classrooms or books.

Graph Theory & BFS Demos

Demonstrate spanning trees and shortest-path traversal on fractal-topology graphs.

Accuracy, Edge Cases & Best Practices

  • Every cell is reachable with a single unique non-looping solution path.

All calculations execute locally inside your browser using JavaScript with zero server round-trips, guaranteeing instant responsiveness and complete data privacy.

Frequently Asked Questions

Does every generated Sierpinski Maze have a guaranteed solution?
Yes—our randomized spanning-tree generator connects all 8^n non-void rooms into a single tree, ensuring a unique solution path from top-left to bottom-right.
How can I print an unsolved maze?
Simply uncheck 'Highlight BFS Shortest Solution Path' before clicking PNG or SVG.