In[]:=
PacletFind["PeterBurbery/UndirectedGraphs"]
Out[]=
{}
In[]:=
Do[Quiet[Get/@FileNames["*.wl","C:\\Users\\Peter\\OneDrive - Marshall University\\GitHub\\undirected-graphs-paclet\\Undirected Graphs\\Kernel"];,Get::noopen],4]
In[]:=
Remove[Global`AlternatingTreeGraph]
Compute a rank polynomial:
In[]:=
randomGraph=RandomGraph[{10,20}]
Out[]=
In[]:=
ToEntity[randomGraph]
ToEntity
:No entity representation of type Graph available for expression
.
Out[]=
ToEntity[randomGraph]
GraphData won’t work here because this graph has no entity.
In[]:=
RankPolynomial[randomGraph]
Out[]=
1+20x.+
2
x.
190+7y.+
3
x.
1133+133y.+6
2
y.
+
4
x.
4712+1191y.+145
2
y.
+8
3
y.
+
5
x.
14307+6573y.+1566
2
y.
+225
3
y.
+19
4
y.
+
5
y.
+
6
x.
32042+24369y.+9886
2
y.
+2617
3
y.
+458
4
y.
+48
5
y.
+2
6
y.
+
7
x.
51577+61216y.+39168
2
y.
+16937
3
y.
+5187
4
y.
+1095
5
y.
+144
6
y.
+9
7
y.
+
8
x.
54643+96941y.+92666
2
y.
+60718
3
y.
+29221
4
y.
+10458
5
y.
+2731
6
y.
+495
7
y.
+56
8
y.
+3
9
y.
+
9
x.
29215+74694y.+102007
2
y.
+95652
3
y.
+66918
4
y.
+36020
5
y.
+15009
6
y.
+4789
7
y.
+1137
8
y.
+190
9
y.
+20
10
y.
+
11
y.

Compute a coboundary polynomial:
In[]:=
CoboundaryPolynomial[randomGraph]
Out[]=
9
q.
+20
8
q.
-1+t.+
7
q.
2
-1+t.
183+7t.+
6
q.
3
-1+t.
1006+121t.+6
2
t.
+
5
q.
4
-1+t.
3658+925t.+121
2
t.
+8
3
t.
+
4
q.
5
-1+t.
9093+4045t.+995
2
t.
+159
3
t.
+14
4
t.
+
5
t.
+
3
q.
6
-1+t.
15354+10844t.+4333
2
t.
+1225
3
t.
+248
4
t.
+36
5
t.
+2
6
t.
+
2
q.
7
-1+t.
16819+17617t.+10500
2
t.
+4574
3
t.
+1557
4
t.
+420
5
t.
+81
6
t.
+9
7
t.
+q.
8
-1+t.
10702+15827t.+13288
2
t.
+8235
3
t.
+4113
4
t.
+1709
5
t.
+582
6
t.
+155
7
t.
+29
8
t.
+3
9
t.
+
9
-1+t.
2960+5958t.+6766
2
t.
+5668
3
t.
+3858
4
t.
+2225
5
t.
+1100
6
t.
+463
7
t.
+162
8
t.
+45
9
t.
+9
10
t.
+
11
t.

Compute a reliability polynomial:
In[]:=
ReliabilityPolynomial[randomGraph]
Out[]=
-
9
-1+p.
1+9p.+45
2
p.
+162
3
p.
+463
4
p.
+1100
5
p.
+2225
6
p.
+3858
7
p.
+5668
8
p.
+6766
9
p.
+5958
10
p.
+2960
11
p.

Compute an independence polynomial:
In[]:=
EchoTiming[IndependencePolynomial[randomGraph]]
⌚
0.0011914
Out[]=
1+10x.+25
2
x.
+17
3
x.
+3
4
x.

Graph Construction and Representation

In[]:=
AlternatingTreeGraph[10]
Out[]=
In[]:=
BananaTreeGraph[{6,7}]
Out[]=
In[]:=
BookGraph[7]
Out[]=
In[]:=
CombGraph[7]
Out[]=
This is one of my favorite graphs.
In[]:=
FirecrackerGraph[{6,7}]
Out[]=
In[]:=
GearGraph[7]
Out[]=
In[]:=
GeneralizedTriangularGridGraph[{7,7}]
Out[]=
In[]:=
HelmGraph[7]
Out[]=
I think I want to update the definition of ResistanceMatrix to give a SparseArray by default.
Test if this is a graphical degree sequence:
The Petersen graph with 10 edges:
Insert a new vertex 11 into the first edge:
I didn’t create VertexCoordinateList, I found it on the Function Repository. Ed Pegg Jr created it. It seems like GraphEmbedding does the same thing.
Find the coordinates of the vertices in the Petersen graph:
Find the coordinates of the vertices in a generalized triangular grid graph of size 7 by 7: