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

UndirectedGraphs

Guides

  • GraphConstructionandRepresentation
  • Graph Functions
  • GraphOperationsandModifications
  • GraphPropertiesAndMeasurements
  • GraphVisualization
  • Paths, Cycles, and Flows
  • Computation on Graphs

Symbols

  • AlternatingTreeGraph
  • BananaTreeGraph
  • BookGraph
  • CoboundaryPolynomial
  • CombGraph
  • FirecrackerGraph
  • GearGraph
  • GeneralizedTriangularGridGraph
  • Girth
  • GraphicalDegreeSequenceQ
  • HelmGraph
  • IndependencePolynomial
  • KayakPaddleGraph
  • LadderRungGraph
  • PanGraph
  • PositiveIntegerQ
  • RankPolynomial
  • ReliabilityPolynomial
  • ResistanceMatrix
  • SunletGraph
  • TadpoleGraph
  • VertexCoordinateList
  • VertexInsert
PeterBurbery`UndirectedGraphs`
IndependencePolynomial
​
IndependencePolynomial
[g]
computes the independence polynomial of graph
g
.
​
​
IndependencePolynomial
[g,indeterminate]
computes the independence polynomial of graph
g
with
indeterminate
.
​
Details and Options

Examples  
(1)
Basic Examples  
(1)
Two independence polynomials:
In[1]:=
IndependencePolynomial
[PetersenGraph[]]
Out[1]=
1+10x.+30
2
x.
+30
3
x.
+5
4
x.
In[2]:=
randomGraph=RandomGraph[{18,24}]
Out[2]=
In[3]:=
ToEntity[randomGraph]
ToEntity
:No entity representation of type Graph available for expression
.
Out[3]=
ToEntity[randomGraph]
In[4]:=
IndependencePolynomial
[randomGraph]
Out[4]=
1+18x.+129
2
x.
+485
3
x.
+1059
4
x.
+1398
5
x.
+1120
6
x.
+528
7
x.
+134
8
x.
+14
9
x.
In[5]:=
GraphData[randomGraph,"IndependencePolynomial"]
GraphData
:
is not a known entity, class, or tag for GraphData. Use GraphData[​] for a list of entities.
Out[5]=
GraphData
,IndependencePolynomial
Another independence polynomial in a different variable:
In[6]:=
randomGraph=RandomGraph[{21,35}]
Out[6]=
In[7]:=
IndependencePolynomial
[randomGraph,p.]
Out[7]=
1+21p.+175
2
p.
+755
3
p.
+1840
4
p.
+2591
5
p.
+2074
6
p.
+894
7
p.
+184
8
p.
+13
9
p.
In[8]:=
GraphData[randomGraph,"IndependencePolynomial"]
GraphData
:
is not a known entity, class, or tag for GraphData. Use GraphData[​] for a list of entities.
Out[8]=
GraphData
,IndependencePolynomial
SeeAlso
RankPolynomial
RelatedGuides
▪
Computation on Graphs
""

© 2025 Wolfram. All rights reserved.

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