Wolfram Language Paclet Repository

Community-contributed installable additions to the Wolfram Language

Primary Navigation

    • Cloud & Deployment
    • Core Language & Structure
    • Data Manipulation & Analysis
    • Engineering Data & Computation
    • External Interfaces & Connections
    • Financial Data & Computation
    • Geographic Data & Computation
    • Geometry
    • Graphs & Networks
    • Higher Mathematical Computation
    • Images
    • Knowledge Representation & Natural Language
    • Machine Learning
    • Notebook Documents & Presentation
    • Scientific and Medical Data & Computation
    • Social, Cultural & Linguistic Data
    • Strings & Text
    • Symbolic & Numeric Computation
    • System Operation & Setup
    • Time-Related Computation
    • User Interface Construction
    • Visualization & Graphics
    • Random Paclet
    • Alphabetical List
  • Using Paclets
    • Get Started
    • Download Definition Notebook
  • Learn More about Wolfram Language

NewMazePaclet

Guides

  • NewMazePaclet

Tech Notes

  • NewMazePaclet

Symbols

  • EquilateralTriangleGraph
  • HexagonalGridGraph
  • MakeMaze
  • PositiveIntegerQ
  • ReduceGraph
  • SolveMaze
  • TriangularGridGraph
  • VertexCoordinateList
PeterBurbery`NewMazePaclet`
ReduceGraph
​
ReduceGraph
[ugraph]
contracts vertices with a vertex degree of 2 in the undirected graph
ugraph
.
​
​
ReduceGraph
[dgraph]
contracts vertices with an in degree of 1 and out degree of 1 in the directed graph
dgraph
.
​
Examples  
(1)
Basic Examples  
(1)
Generate a few mazes:
In[1]:=
triangularMazes=Table
MakeMaze

TriangularGridGraph
[{8,8}],4
Out[1]=

,
,
,

Analyze the mazes as trees.
In[2]:=
AssociationMap
ReduceGraph
[triangularMazes]
Out[2]=


,

,

,


Make a dataset:
In[3]:=
data=DatasetAssociationMap
ReduceGraph
[triangularMazes]
Out[3]=
Make trees:
In[4]:=
GraphTree/@data
Out[4]=
Sort the trees by depth.

© 2025 Wolfram. All rights reserved.

  • Legal & Privacy Policy
  • Contact Us
  • WolframAlpha.com
  • WolframCloud.com