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

Hypergraph

Guides

  • Hypergraph Functionality

Tech Notes

  • Hypergraph Rewriting

Symbols

  • AdjacencyHypergraph
  • AdjacencyTensor
  • CanonicalHypergraph
  • CanonicalHypergraphRule
  • ConnectedHypergraphQ
  • CyclicEdge
  • EdgeListTagged
  • EdgeMultiplicity
  • EdgeSymmetry
  • EnumerateHypergraphRules
  • EnumerateHypergraphs
  • EnumerateOrderedHypergraphs
  • EnumerateWolframModelRules
  • HighlightRule
  • HyperedgeList
  • Hyperedge
  • Hyperedges
  • HyperedgesQ
  • Hypergraph3D
  • HypergraphArityReduce
  • HypergraphDraw
  • HypergraphEmbedding
  • HypergraphHadamardProduct
  • HypergraphIncidenceMatrix
  • HypergraphIncidence
  • HypergraphInsertionBracketDegree
  • HypergraphInsertionBracket
  • HypergraphInsertion
  • HypergraphLargeQ
  • Hypergraph
  • HypergraphQ
  • HypergraphRuleDraw
  • HypergraphRule
  • HypergraphRuleQ
  • HypergraphToGraph
  • HypergraphTransitionMatrix
  • HypergraphUnion
  • HypermatrixGraph
  • Hypermatrix
  • HypermatrixQ
  • IncidenceHypergraph
  • IsomorphicHypergraphQ
  • KoszulSign
  • LinkedHypergraph
  • OrderedHypergraphToGraph
  • RandomAllHypergraph
  • RandomConnectedHypergraph
  • RandomHypergraph
  • RandomHypergraphRule
  • SetHypergraphSummaryThresholds
  • SimpleHypergraph
  • SimpleHypergraphPlot3D
  • SimpleHypergraphPlot
  • SimpleHypergraphQ
  • ToLabeledEdges
  • ToLabeledPatternEdges
  • ToOrderedHypergraph
  • ToPatternRules
WolframInstitute`Hypergraph`
Hypergraph
​
Hypergraph
[{
e
1
,
e
2
,…}]
yields a hypergraph with hyperedges
𝑒
𝑖
.
​
​
Hypergraph
[{
v
1
,
v
2
,…},{
e
1
,
e
2
,…}]
yields a hypergraph with vertices
𝑣
𝑖
and hyperedges
𝑒
𝑗
.
​
​
Hypergraph
[g]
yields a hypergraph with the same vertices and edges as the graph g.
​
​
Hypergraph
[hg,opts]
yields a copy of the hypergraph hg with the options opts applied.
​
Details and Options
▪
A
Hypergraph
generalizes
Graph
by allowing hyperedges that connect any number of vertices.
▪
Each hyperedge
𝑒
𝑖
is a list of vertices
{
v
1
,
v
2
,…}
. Hyperedges can be empty, contain a single vertex, and repeat; vertices can be arbitrary expressions.
▪
Hypergraph
objects display as a graphical plot, drawn like
SimpleHypergraphPlot
[hg]
; hypergraphs with many vertices or edges display as a summary box instead.
▪
HypergraphQ
tests whether an expression is a valid
Hypergraph
object.
▪
In
Hypergraph
[{
e
1
,
e
2
,…}]
, each hyperedge can be given in the following forms:
edge specification
interpretation
{
v
1
,
v
2
,…}
hyperedge with the default edge symmetry
u->w
binary hyperedge with
"Ordered"
symmetry
DirectedEdge
[u,w]
hyperedge with
"Ordered"
symmetry joining u and w (vertices or vertex lists)
UndirectedEdge
[u,w]
hyperedge with
"Unordered"
symmetry
CyclicEdge
[{
v
1
,
v
2
,…}]
hyperedge with
"Cyclic"
symmetry
Labeled
[e,lbl]
hyperedge e labeled lbl
Style
[e,style]
hyperedge e with the given style
Annotation
[e,opt->value]
hyperedge e with an arbitrary annotation
▪
Vertices in the explicit vertex list can likewise be wrapped in
Labeled
,
Style
or
Annotation
.
▪
Every hyperedge carries an edge symmetry, a group of vertex permutations under which the hyperedge is considered equivalent. Possible settings for the
"EdgeSymmetry"
option include:
setting
interpretation
"Unordered"
all orderings of the vertices are equivalent (default)
"Ordered"
or
"Directed"
the hyperedge is taken exactly as written
"Cyclic"
orderings equivalent up to cyclic rotation
list of
Cycles
explicit list of equivalent vertex permutations
{
e
1
->
sym
1
,…}
different symmetries for different hyperedges
▪
Properties of a hypergraph hg can be accessed as
hg["prop"]
; available properties include
"VertexList"
,
"EdgeList"
,
"EdgeListTagged"
,
"EdgeTags"
,
"EdgeSymmetry"
,
"FullEdgeSymmetry"
,
"Arity"
,
"Edges"
,
"Options"
and
"AbsoluteOptions"
.
▪
Standard graph functions such as
VertexList
,
EdgeList
,
VertexCount
,
EdgeCount
,
VertexDegree
,
Options
,
AbsoluteOptions
and
AnnotationValue
work directly on
Hypergraph
objects.
▪
Annotation options such as
VertexStyle
,
VertexLabels
,
EdgeStyle
and
EdgeLabels
accept a single value applied to all elements, or lists of rules
{elemvalue,…}
whose left-hand sides can be patterns.
▪
Hypergraph
takes the following options, in addition to the standard
Graph
options such as
VertexStyle
,
VertexLabels
,
VertexLabelStyle
,
VertexSize
,
VertexCoordinates
,
VertexShapeFunction
,
EdgeStyle
,
EdgeLabels
and
EdgeLabelStyle
:
option
default
effect
"EdgeSymmetry"
Automatic
symmetry of the hyperedges
"EdgeArrows"
False
whether to draw arrows showing the vertex order within each hyperedge
"EdgeType"
"Cyclic"
whether the drawn boundary of a hyperedge closes back on itself (
"Cyclic"
) or stays open (
"Bag"
)
"EdgeMethod"
"ConcavePolygon"
method used to draw hyperedge regions
"EdgeLineStyle"
Automatic
style of hyperedge boundary lines
"EdgeSize"
Automatic
size of drawn hyperedge regions
"LayoutDimension"
2
dimension of the layout, 2 or 3
PlotTheme
Automatic
overall theme, such as
"Colored"
or
"Dark"
ColorFunction
ColorData
[97]
function assigning colors to hyperedges
​
Examples  
(28)
Basic Examples  
(3)
Create a hypergraph from a list of hyperedges:
In[1]:=
Hypergraph
[{{1,2},{1,2,3},{3,4,5}}]
Out[1]=
_________________________________________________________________________________________________________________
Give an explicit vertex list to include isolated vertices:
In[1]:=
Hypergraph
[{1,2,3,4,5},{{1,2,3},{3,4}},VertexLabels"Name"]
Out[1]=
_________________________________________________________________________________________________________________
Define a hypergraph:
In[1]:=
hg=
Hypergraph
[{{1,2},{2,3,4}}]
Out[1]=
Get its hyperedges:
In[2]:=
EdgeList[hg]
Out[2]=
{{1,2},{2,3,4}}
Get its vertices:
In[3]:=
VertexList[hg]
Out[3]=
{1,2,3,4}
Scope  
(14)

Options  
(6)

Properties & Relations  
(4)

Neat Examples  
(1)

SeeAlso
HypergraphRule
 
▪
SimpleHypergraphPlot
 
▪
Hypergraph3D
 
▪
HypergraphDraw
 
▪
CanonicalHypergraph
 
▪
RandomHypergraph
 
▪
EnumerateHypergraphs
RelatedGuides
▪
HypergraphFunctionality
""

© 2026 Wolfram. All rights reserved.

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