Grid Graph

Author

Eric W. Weisstein
August 2, 2023

This notebook downloaded from http://mathworld.wolfram.com/notebooks/GraphTheory/GridGraph.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/GridGraph.html.

©2023 Wolfram Research, Inc. except for portions noted otherwise

Usage

?GridGraph

Checks

DeleteCases[Monitor[{g=#,GraphData[#,"Grid"],GridGraphQ[GraphData[#]]}&/@GraphData[All],g],{_,x_,x_}]//Timing

Graphics

System`GridGraph[{4,7},VertexSize->{"Scaled",.02},System`VertexStyle->Red,System`EdgeStyle->Black]

Special Cases

TextGrid[Sort[{"Grid"/.GraphData[#,"NotationRules"],GraphData[#,"Name"]}&/@DeleteCases[GraphData["Grid"],{"Grid",_}]],Dividers->All]

IsomorphicQ[GridGraph[3,1],Path[3]]

IsomorphicQ[GridGraph[2,2],Cycle[4]]

IsomorphicQ[Hypercube[3],GridGraph[2,2,2]]

Subscript[##]&@@@{{P,3},{C,4},{γ,3}}

Show[GraphicsArray[ShowGraph[#1,PlotLabel->TraditionalForm[#2],
DisplayFunction->Identity,
VertexColor->Red,VertexStyle->Disk[.06]
]&@@@
Transpose[{
{Path[3],Cycle[4],Hypercube[3]},
Subscript[##]&@@@{{P,3},{C,4},{γ,3}}
}]
]]

Vertices

Table[{V[GridGraph[n,m]],m n},{m,5},{n,5}]

Properties 3×n

ConnectedInducedSubgraphCount

A059021

seq=Table[GraphData[{"Grid",Sort[{3,n}]},"ConnectedInducedSubgraphCount"],{n,10}]

seq={6,40,218,1126,5726,28992,146642,741556,3749816,18961450,95880894,484833212,2451616864,12396892316,62686360476,316981037374,1602852315476,8105013367472,40983964057352,207240288658392};

coef=FindLinearRecurrence[DeleteMissing@seq]

Take[seq,Length[coef]]

LinearRecurrence[{9,-26,35,-22,-3,16,-9,1},{6,40,218,1126,5726,28992,146642,741556},20]

FindSequenceFunction[DeleteMissing@seq,n]

gf=x FindGeneratingFunction[DeleteMissing@seq,x]

res=Refine[SeriesCoefficient[gf,{x,0,n}],n>0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7 ((#1)^5)+((#1)^6)&,6]) (-Root[-1+7 #1-((#1)^2)-6 ((#1)^3)+11 ((#1)^4)-7 ((#1)^5)+((#1)^6)&,4]+Root[-1+7 #1-((#1)^2)-6 ((#1)^3)+11 ((#1)^4)-7 ((#1)^5)+((#1)^6)&,6]) (-Root[-1+7 #1-((#1)^2)-6 ((#1)^3)+11 ((#1)^4)-7 ((#1)^5)+((#1)^6)&,5]+Root[-1+7 #1-((#1)^2)-6 ((#1)^3)+11 ((#1)^4)-7 ((#1)^5)+((#1)^6)&,6]));

terms=List@@res;

N[terms/.n->0]//Chop

approx=RootApproximant[N[exact=terms/.n->0,200],6]

pos=approx[[All,-2]]

N[approx-exact,200]

f1=-1+7 #1-((#1)^2)-6 ((#1)^3)+11 ((#1)^4)-7 ((#1)^5)+((#1)^6)&;
f2=-1401856-29108096 #1-45665296 ((#1)^2)+1156072240 ((#1)^3)+276740264 ((#1)^4)+1822830457 ((#1)^5)+260404351 ((#1)^6)&;

Table[-2 ((1/8)+((3 (1+n))/4)+(1/8)Sum[((Root[f1,k])^n)Root[f2,pos[[k]]],{k,Length[pos]}]),{n,10}]//N//Chop

an=ToNumberField[Root[f2,pos[[#]]],Root[f1,#]]&/@Range[Length[pos]];

Equal@@Last/@an

RootSum[f1,Evaluate[((#)^(n+Range[Length[pos]]-1)).an[[1,2]]]&]

FullSimplify[-2 ((1/8)+((3 (1+n))/4)+(1/8)(1/520808702)RootSum[-1+7 #1-((#1)^2)-6 ((#1)^3)+11 ((#1)^4)-7 ((#1)^5)+((#1)^6)&,-60219359 ((#1)^n)+44281168 ((#1)^(1+n))+293383797 ((#1)^(2+n))-152425571 ((#1)^(3+n))-51762232 ((#1)^(4+n))+12785939 ((#1)^(5+n))&])]

Table[-(7/4)-((3 n)/2)-RootSum[-1+7 #-((#)^2)-6 ((#)^3)+11 ((#)^4)-7 ((#)^5)+((#)^6)&,-60219359 ((#)^n)+44281168 ((#)^(1+n))+293383797 ((#)^(2+n))-152425571 ((#)^(3+n))-51762232 ((#)^(4+n))+12785939 ((#)^(5+n))&]/2083234808,{n,20}]

IndependentEdgeSetCount

seq=Table[GraphData[{"Grid",Sort[{3,n}]},"IndependentEdgeSetCount"],{n,10}]

seq={1,3,22,131,823,5096,31687,196785,1222550,7594361,47177097,293066688,1820552297,11309395995,70254767718,436427542283,2711118571311,16841658983944,104621568809247,649916534985369,4037327172325542};

FindSequenceFunction[DeleteMissing@seq,n]

coef=FindLinearRecurrence[DeleteMissing@seq]

Take[seq,Length[coef]]

seq=LinearRecurrence[{4,14,0,-10,0,1},{1,3,22,131,823,5096},20]

gf=FindGeneratingFunction[DeleteMissing@seq,x]

CoefficientList[Series[((-1+x+4 (x^2)-(x^3)-(x^4))/(-1+4 x+14 (x^2)-10 (x^4)+(x^6))),{x,0,20}],x]

res=Assuming[n>0,Refine[SeriesCoefficient[gf,{x,0,n}]]]

term0=RootReduce[-(2 (((-1))^n))/((1+Root[-1+#1+9 ((#1)^2)-9 ((#1)^3)-5 ((#1)^4)+((#1)^5)&,1]) (1+Root[-1+#1+9 ((#1)^2)-9 ((#1)^3)-5 ((#1)^4)+((#1)^5)&,2]) (1+Root[-1+#1+9 ((#1)^2)-9 ((#1)^3)-5 ((#1)^4)+((#1)^5)&,3]) (1+Root[-1+#1+9 ((#1)^2)-9 ((#1)^3)-5 ((#1)^4)+((#1)^5)&,4]) (1+Root[-1+#1+9 ((#1)^2)-9 ((#1)^3)-5 ((#1)^4)+((#1)^5)&,5]))]

res=(((Root[-1+#1+9 ((#1)^2)-9 ((#1)^3)-5 ((#1)^4)+((#1)^5)&,1])^(1+n)) (1+Root[-1+#1+9 ((#1)^2)-9 ((#1)^3)-5 ((#1)^4)+((#1)^5)&,1]-4 ((Root[-1+#1+9 ((#1)^2)-9 ((#1)^3)-5 ((#1)^4)+((#1)^5)&,1])^2)-((Root[-1+#1+9 ((#1)^2)-9 ((#1)^3)-5 ((#1)^4)+((#1)^5)&,1])^3)+((Root[-1+#1+9 ((#1)^2)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)^4)+((#1)^5)&,5])^2)-((Root[-1+#1+9 ((#1)^2)-9 ((#1)^3)-5 ((#1)^4)+((#1)^5)&,5])^3)+((Root[-1+#1+9 ((#1)^2)-9 ((#1)^3)-5 ((#1)^4)+((#1)^5)&,5])^4)))/((1+Root[-1+#1+9 ((#1)^2)-9 ((#1)^3)-5 ((#1)^4)+((#1)^5)&,5]) (-Root[-1+#1+9 ((#1)^2)-9 ((#1)^3)-5 ((#1)^4)+((#1)^5)&,1]+Root[-1+#1+9 ((#1)^2)-9 ((#1)^3)-5 ((#1)^4)+((#1)^5)&,5]) (-Root[-1+#1+9 ((#1)^2)-9 ((#1)^3)-5 ((#1)^4)+((#1)^5)&,2]+Root[-1+#1+9 ((#1)^2)-9 ((#1)^3)-5 ((#1)^4)+((#1)^5)&,5]) (-Root[-1+#1+9 ((#1)^2)-9 ((#1)^3)-5 ((#1)^4)+((#1)^5)&,3]+Root[-1+#1+9 ((#1)^2)-9 ((#1)^3)-5 ((#1)^4)+((#1)^5)&,5]) (-Root[-1+#1+9 ((#1)^2)-9 ((#1)^3)-5 ((#1)^4)+((#1)^5)&,4]+Root[-1+#1+9 ((#1)^2)-9 ((#1)^3)-5 ((#1)^4)+((#1)^5)&,5]));

terms=List@@res;

N[terms/.n->-1]//Chop

approx=RootApproximant[N[exact=terms/.n->-1,200],5]

pos=approx[[All,-2]]

N[approx-exact,200]

f1=-1+#1+9 ((#1)^2)-9 ((#1)^3)-5 ((#1)^4)+((#1)^5)&;
f2=-49+353 #1+32624 ((#1)^2)-140832 ((#1)^3)-4081828 ((#1)^4)+20409140 ((#1)^5)&;

Table[Sum[((Root[f1,k])^(n+1))Root[f2,pos[[k]]]-(((-1))^n)/5,{k,Length[pos]}],{n,10}]//N//Chop

an=ToNumberField[Root[f2,pos[[#]]],Root[f1,#]]&/@Range[Length[pos]]

Equal@@Last/@an

RootSum[f1,Evaluate[((#)^(n+Range[Length[pos]]-1)).an[[1,2]]]&]

Table[((RootSum[-1+#+9 #^2-9 #^3-5 #^4+#^5&,1436541 #^n+3941068 #^(n+1)-6086452 #^(n+2)-2800519 #^(n+3)+591744 #^(n+4)&])/10204570)-(((-1))^n)/5,{n,20}]

FullSimplify[((RootSum[-1+#1+9 ((#1)^2)-9 ((#1)^3)-5 ((#1)^4)+((#1)^5)&,1436541 ((#1)^n)+3941068 ((#1)^(1+n))-6086452 ((#1)^(2+n))-2800519 ((#1)^(3+n))+591744 ((#1)^(4+n))&])/10204570)-(((-1))^n)/5]

IndependentVertexSetCount

A051736

seq=Table[GraphData[{"Grid",Sort[{3,n}]},"IndependentVertexSetCount"],{n,10}]

coef=FindLinearRecurrence[DeleteMissing@seq]

Take[seq,Length[coef]]

seq=LinearRecurrence[{2,6,0,-1},{5,17,63,227},{0,20}]

FindSequenceFunction[DeleteMissing@seq,n]

gf=FindGeneratingFunction[DeleteMissing@seq,x]

CoefficientList[Series[((1+3 x+(x^2)-(x^3))/(1-2 x-6 (x^2)+(x^4))),{x,0,20}],x]

res=Refine[SeriesCoefficient[gf,{x,0,n}],n>0]

FullSimplify[RootReduce[res],n>0]

f1=1-6 ((#1)^2)-2 ((#1)^3)+((#1)^4)&;
f2=1-38 #1-776 ((#1)^2)-1994 ((#1)^3)+1994 ((#1)^4)&;

pos={2,1,3,4};

an=ToNumberField[Root[f2,#],Root[f1,pos[[#]]]]&/@Range[Length[pos]]

Equal@@Last/@an

RootSum[f1,Evaluate[((#)^(n+Range[Length[pos]]-1)).an[[1,2]]]&]

Table[-((RootSum[1-6 ((#1)^2)-2 ((#1)^3)+((#1)^4)&,263 ((#1)^n)-657 ((#1)^(n+1))-331 ((#1)^(n+2))+81 ((#1)^(n+3))&])/1994),{n,0,20}]

MaximalIndependentVertexSetCount

A197049

seq=Table[GraphData[{"Grid",Sort[{3,n}]},"MaximalIndependentVertexSetCount"],{n,10}]

FindLinearRecurrence[seq]

FindSequenceFunction[seq,n]

gf=x FindGeneratingFunction[seq,x]

Factor[2-((2 x (1+x) (2 (x^3)-(x^2)-x-2))/(1-x-(x^2)-3 (x^3)+(x^4)+(x^5)))]

seq=CoefficientList[Series[-((2 (-1-x-2 (x^2)+(x^3)+(x^5)))/(1-x-(x^2)-3 (x^3)+(x^4)+(x^5))),{x,0,40}],x]

FindLinearRecurrence[Rest@seq]

LinearRecurrence[{1,1,3,-1,-1},{2,4,10,18,38,78},20]

res=SeriesCoefficient[gf=2*x-2*x^2*(1+x)*(2*x^3-x^2-x-2)/(1-x-x^2-3*x^3+x^4+x^5),{x,0,n}]

res=Refine[SeriesCoefficient[gf=2*x-2*x^2*(1+x)*(2*x^3-x^2-x-2)/(1-x-x^2-3*x^3+x^4+x^5),{x,0,n}],n>1]/2

terms=List@@res;

approx=RootApproximant[N[exact=terms/.n->0,200],5]

pos=approx[[All,-2]]

N[approx-exact,200]

f1=1+#1-3 ((#1)^2)-((#1)^3)-((#1)^4)+((#1)^5)&;
f2=64-2229 #1+31828 ((#1)^2)-115916 ((#1)^3)+77296 ((#1)^4)+77296 ((#1)^5)&;

2Table[Sum[((Root[f1,k])^n)Root[f2,pos[[k]]],{k,Length[pos]}],{n,10}]//N//Chop

seq

an=ToNumberField[Root[f2,pos[[#]]],Root[f1,#]]&/@Range[Length[pos]]

Equal@@Last/@an

2RootSum[f1,Evaluate[((#)^n) #^Range[0,Length[pos]-1].an[[1,2]]]&]

Table[Piecewise[{{2,n==1}},-((RootSum[1+#1-3 ((#1)^2)-((#1)^3)-((#1)^4)+((#1)^5)&,10635 ((#1)^n)-16668 ((#1)^(1+n))-2575 ((#1)^(2+n))-7840 ((#1)^(3+n))+5520 ((#1)^(4+n))&])/4831)],{n,20}]

MinimalEdgeCoverCount

A288030

seq=Table[GraphData[{"Grid",Sort[{3,n}]},"MinimalEdgeCoverCount"],{n,10}]

seq=Import["https://oeis.org/A288030/b288030.txt","Table"][[All,2]];

coef=FindLinearRecurrence[seq]

Length[%]

Take[seq,Length[coef]]

gf=x FindGeneratingFunction[seq,x]

Series[gf=x*(1+3*x+14*x^2+5*x^3+20*x^4-12*x^5+15*x^6+6*x^7+2*x^8-82*x^9-5*x^10-3*x^11+29*x^12+8*x^14-2*x^15-2*x^16-x^17)/(1-3*x-6*x^2-35*x^3+7*x^4-15*x^5+55*x^6-31*x^7-36*x^8-36*x^9+124*x^10+8*x^12-32*x^13-x^14-9*x^15+2*x^16+2*x^17+x^18),{x,0,20}]

SeriesCoefficient[gf,{x,0,n}]

MinimalDominatingSetCount

A286848

seq=Table[GraphData[{"Grid",Sort[{3,n}]},"MinimalDominatingSetCount"],{n,10}]

seq=Import["https://oeis.org/A286848/b286848.txt","Table"][[All,2]];

FindLinearRecurrence[seq]

Length[%]

gf=x FindGeneratingFunction[seq,x]

Series[gf=x*(2+3*x-2*x^2-x^3+4*x^4+10*x^5-14*x^6-32*x^7-29*x^8-2*x^9-21*x^10-140*x^11-140*x^12+126*x^13+80*x^14+127*x^15+143*x^16+695*x^17+401*x^18+462*x^19+582*x^20-8*x^21-490*x^22-660*x^23-721*x^24-960*x^25-714*x^26-925*x^27+25*x^28+206*x^29+255*x^30+494*x^31+155*x^32+443*x^33-118*x^34+80*x^35-71*x^36-172*x^37+78*x^38-105*x^39+79*x^40+7*x^41-28*x^42+33*x^43-7*x^44-4*x^45+3*x^46-x^47)/(1-2*x-2*x^2-4*x^3+8*x^4-2*x^5-2*x^6-23*x^7+14*x^8+31*x^9+31*x^10-45*x^11+50*x^12+83*x^13+122*x^14-141*x^15-54*x^16-105*x^17+36*x^18-85*x^19-275*x^20-222*x^21+63*x^22+90*x^23-140*x^24+253*x^25+399*x^26+234*x^27+190*x^28-87*x^29+59*x^30-219*x^31-222*x^32-189*x^33-270*x^34+152*x^35+56*x^36+123*x^37+158*x^38-41*x^39+75*x^40-62*x^41-12*x^42+21*x^43-30*x^44+7*x^45+4*x^46-3*x^47+x^48),{x,0,20}]

SeriesCoefficient[gf,{x,0,n}]

MinimumEdgeCoverCount

Table[GraphData[{"Grid",{3,n}},"MinimumEdgeCoverCount"],{n,3,5}]

Properties 4×n

CycleCount

A288637

seq=Table[GraphData[{"Grid",Sort[{4,n}]},"CycleCount"],{n,10}]

seq={0,6,40,213,1049,5034,23984,114069,542295,2577870,12253948,58249011,276885683,1316170990,6256394122,29739651711,141366874247,671984773580,3194266961582,15183887824311,72176324719925,343088799809408,1630866146364842,7752291502484181};

coef=FindLinearRecurrence[seq]

Take[seq,Length@coef]

LinearRecurrence[{9,-27,38,-29,11,1,-2},{0,6,40,213,1049,5034,23984},20]

FindSequenceFunction[seq]

gf=x FindGeneratingFunction[seq,x]

RootReduce[Refine[SeriesCoefficient[gf,{x,0,n}],n>0&&n∈Integers]]

Properties m×n

Arboricity

DeleteCases[Block[{m,n},{{m,n}="Grid"/.GraphData[#,"NotationRules"],2,GraphData[#,"Arboricity"]}]&/@Select[GraphData["Grid"],Length["Grid"/.GraphData[#,"NotationRules"]]==2&],{_,x_,x_}]

Monitor[Table[Arboricity[System`GridGraph[{n,n}]],{n,4},{m,n}],{m,n}]//Timing

BalabanIndex

Entity["Graph",{"Grid",{m,n}}]["BalabanIndex"]

Entity["Graph",{"Grid",{n,n}}]["BalabanIndex"]

DeleteCases[Block[{m,n},Sort[{{m,n}="Grid"/.GraphData[#,"NotationRules"],GraphData[#,"BalabanIndex"],XXX}&/@Select[GraphData["Grid"],Length["Grid"/.GraphData[#,"NotationRules"]]==2&]]],{_,x_,x_}]

ChordCount

DeleteCases[Block[{m,n},{{m,n}="Grid"/.GraphData[#,"NotationRules"],Piecewise[{{0,Min[m,n]==1},{Abs[n-m],Min[m,n]==2}},2 m n-m-n-8],GraphData[#,"ChordCount"]}]&/@Select[GraphData["Grid"],Length["Grid"/.GraphData[#,"NotationRules"]]==2&],{_,x_,x_}]

Circumference

Table[GraphData[{"Grid",{m,n}},"Circumference"],{n,10},{m,n}]//Column

(tabl=Table[GraphData[{"Grid",Sort[{m,n}]},"Circumference"],{n,2,10},{m,2,10}])//Column

FullSimplify[FindSequenceFunction[#,n-1]&/@tabl]

(tabl2=Table[Piecewise[{{Missing["NotApplicable"],Min[m,n]==1},{m n ,Mod[m,2]==0},{(1/2)((((-1))^n)-1)+m n,Mod[m,2]==1}}],{n,2,10},{m,2,10}])//Column

Simplify[Piecewise[{{Missing["NotApplicable"],Min[m,n]==1},{m n ,Mod[m,2]==0},{(1/2)((((-1))^n)-1)+m n,Mod[m,2]==1}}],#]&/@{
Mod[m,2]==1&&Mod[n,2]==1,
Mod[m,2]==0&&Mod[n,2]==0,
Mod[m,2]==1&&Mod[n,2]==0,
Mod[n,2]==1&&Mod[m,2]==0}//Column

(tabl2=Table[Piecewise[{{Missing["NotApplicable"],Min[m,n]==1}},m n-Mod[m n,2]],{n,2,10},{m,2,10}])//Column

tabl===tabl2

DeleteCases[Block[{m,n},{{m,n}=#,GraphData[{"Grid",#},"Circumference"],Piecewise[{{Missing["NotApplicable"],Min[m,n]==1}},m n-Mod[m n,2]]}]&/@Select[("Grid"/.GraphData[#,"NotationRules"])&/@GraphData["Grid"],Length[#]==2&],{_,x_,x_}]

Classes

Intersection@@(GraphData[#,"Classes"]&/@(Cases[("Grid"/.GraphData[#,"NotationRules"])&/@GraphData["Grid"],{m_,n_}:>{"Grid",{m,n}}]))

ConnectedDominatingSetCount

A291872

Table[GraphData[{"Grid",{m,n}},"ConnectedDominatingSetCount"],{n,10},{m,n}]//Column

data=Import["https://oeis.org/A291872/b291872.txt","Table"][[All,2]];

Table[data[[Binomial[i,2]+(1/2) (j-1) (2 i+j)+1]],{i,10},{j,i}]//Column

EdgeCount

DeleteCases[Block[{m,n},{{m,n}="Grid"/.GraphData[#,"NotationRules"],-m-n+2 m n,GraphData[#,"EdgeCount"]}]&/@Select[GraphData["Grid"],Length["Grid"/.GraphData[#,"NotationRules"]]==2&],{_,x_,x_}]

Table[{M[GridGraph[n,m]],(m-1)n+(n-1)m},{m,5},{n,5}]

Expand[(m-1)n+(n-1)m]

EdgeCoverCount

A286912

data=Import["https://oeis.org/A286912/b286912.txt","Table"][[All,2]];

Table[data[[Binomial[i,2]+(1/2) (j-1) (2 i+j)+1]],{i,10},{j,i}]//Column

Table[GraphData[{"Grid",{m,n}},"EdgeCoverCount"],{n,10},{m,n}]//Column

FibonacciCube

Entity["Graph",{"Grid",{m,n}}]["FibonacciCube"]

Cases[Flatten[Table[{{m,n},GraphData[{"Grid",{m,n}},"FibonacciCube"]},{n,10},{m,n}],1],{i_,True}:>i]

KirchhoffIndex

Entity["Graph",{"Grid",{m,n}}]["KirchhoffIndex"]

Entity["Graph",{"Grid",{n,n}}]["KirchhoffIndex"]

DeleteCases[Block[{m,n},Sort[{{m,n}="Grid"/.GraphData[#,"NotationRules"],GraphData[#,"KirchhoffIndex"],XXX}&/@Select[GraphData["Grid"],Length["Grid"/.GraphData[#,"NotationRules"]]==2&]]],{_,x_,x_}]

KirchhoffSumIndex

Entity["Graph",{"Grid",{m,n}}]["KirchhoffSumIndex"]

Entity["Graph",{"Grid",{n,n}}]["KirchhoffSumIndex"]

DeleteCases[Block[{m,n},Sort[{{m,n}="Grid"/.GraphData[#,"NotationRules"],GraphData[#,"KirchhoffSumIndex"],XXX}&/@Select[GraphData["Grid"],Length["Grid"/.GraphData[#,"NotationRules"]]==2&]]],{_,x_,x_}]

LucasCube

Entity["Graph",{"Grid",{m,n}}]["LucasCube"]

Cases[Flatten[Table[{{m,n},GraphData[{"Grid",{m,n}},"LucasCube"]},{n,10},{m,n}],1],{i_,True}:>i]

MaximalIrredundantSetCount

A291439

data=Rest[Import["https://oeis.org/A291439/b291439.txt","Table"]][[All,2]];

Table[data[[Binomial[i,2]+(1/2) (j-1) (2 i+j)+1]],{i,10},{j,i}]/._Part:>Nothing//Quiet//Column

Table[GraphData[{"Grid",{m,n}},"MaximalIrredundantSetCount"],{n,10},{m,n}]//Column//TraditionalForm

MinimalEdgeCoverCount

A288025

Block[{m,n},Sort[{{m,n}="Grid"/.GraphData[#,"NotationRules"],GraphData[#,"MinimalEdgeCoverCount"],Piecewise[{{2,Min[m,n]==1}},m n+2]}&/@Select[GraphData["Grid"],Length["Grid"/.GraphData[#,"NotationRules"]]==2&]]]

data=Import["https://oeis.org/A288025/b288025.txt","Table"][[All,2]];

Table[data[[Binomial[i,2]+(1/2) (j-1) (2 i+j)+1]],{i,10},{j,If[i==10,8,i]}]//Column

Table[GraphData[{"Grid",{m,n}},"MinimalEdgeCoverCount"],{n,10},{m,n}]//Column

Pell

Entity["Graph",{"Grid",{m,n}}]["Pell"]

Cases[Flatten[Table[{{m,n},GraphData[{"Grid",{m,n}},"Pell"]},{n,10},{m,n}],1],{i_,True}:>i]

Skewness

DeleteCases[{#2,GraphData[#2,"Skewness"],0}&@@@Select[{"Grid"/.GraphData[#,"NotationRules"],#}&/@GraphData["Grid"],Length[#[[1]]]==2&],{_,x_,x_}]

WienerIndex

DeleteCases[Block[{m,n},Sort[{{m,n}="Grid"/.GraphData[#,"NotationRules"],GraphData[#,"WienerIndex"],m*n*(n+m)*(m*n-1)/6}&/@Select[GraphData["Grid"],Length["Grid"/.GraphData[#,"NotationRules"]]==2&]]],{_,x_,x_}]

WienerSumIndex

Entity["Graph",{"Grid",{m,n}}]["WienerSumIndex"]

Entity["Graph",{"Grid",{n,n}}]["WienerSumIndex"]

DeleteCases[Block[{m,n},Sort[{{m,n}="Grid"/.GraphData[#,"NotationRules"],GraphData[#,"WienerSumIndex"],XXX}&/@Select[GraphData["Grid"],Length["Grid"/.GraphData[#,"NotationRules"]]==2&]]],{_,x_,x_}]

Properties n×n

Acyclic

Entity["Graph",{"Grid",{n,n}}]["Acylic"]

Table[GraphData[{"Grid",{n,n}},"Acyclic"],{n,20}]

AdjacencyMatrixCount

Entity["Graph",{"Grid",{n,n}}]["AdjacencyMatrixCount"]

A086829

seq=Table[GraphData[{"Grid",{n,n}},"AdjacencyMatrixCount"],{n,20}]

FindSequenceFunction[Take[seq,5],n]//Head//Timing

FindGeneratingFunction[seq,x]//Head//Timing

Table[Piecewise[{{1,n==1}},(n^2)!/8],{n,20}]==seq

Arboricity

Entity["Graph",{"Grid",{n,n}}]["Arboricity"]

Table[GraphData[{"Grid",{n,n}},"Arboricity"],{n,20}]

ArcTransitive

Entity["Graph",{"Grid",{n,n}}]["ArcTransitive"]

Table[GraphData[{"Grid",{n,n}},"ArcTransitive"],{n,20}]

ArcTransitivity

Entity["Graph",{"Grid",{n,n}}]["ArcTransitivity"]

Table[GraphData[{"Grid",{n,n}},"ArcTransitivity"],{n,20}]

AutomorphismCount

Entity["Graph",{"Grid",{n,n}}]["AutomorphismCount"]

Table[GraphData[{"Grid",{n,n}},"AutomorphismCount"],{n,20}]

BalabanIndex

Entity["Graph",{"Grid",{n,n}}]["BalabanIndex"]

seq=Table[GraphData[{"Grid",{n,n}},"BalabanIndex"],{n,20}]//Simplify

Bandwidth

Entity["Graph",{"Grid",{n,n}}]["Bandwidth"]

Table[GraphData[{"Grid",{n,n}},"Bandwidth"],{n,20}]

BridgeCount

Entity["Graph",{"Grid",{n,n}}]["BridgeCount"]

seq=Table[GraphData[{"Grid",{n,n}},"BridgeCount"],{n,20}]

BurningNumber

Entity["Graph",{"Grid",{n,n}}]["BurningNumber"]

seq=Table[GraphData[{"Grid",{n,n}},"BurningNumber"],{n,20}]

CharacteristicPolynomial

Entity["Graph",{"Grid",{n,n}}]["CharacteristicPolynomial"]

(poly=Factor@Table[GraphData[{"Grid",{n,n}},"CharacteristicPolynomial"][x],{n,k0=1,kmax=20}])//Column

Table[CharacteristicPolynomial[AdjacencyMatrix[GridGraph[{n,n}]],x],{n,5}]//Factor//Column

CoefficientList[Take[poly,4],x]//Column

FindLinearRecurrence[poly]//Head//Timing

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,k0,kmax}]

FullSimplify[poly2-poly]

ChordCount

Entity["Graph",{"Grid",{n,n}}]["ChordCount"]

seq=Table[GraphData[{"Grid",{n,n}},"ChordCount"],{n,20}]

Table[2 (-4-n+(n^2)),{n,20}]

gf=x FindGeneratingFunction[DeleteMissing@seq,x]

Simplify[SeriesCoefficient[gf,{x,0,n}],n>0]

Do[Print[{n,Length[Chords[System`GridGraph[{n,n}]]]//Timing}],{n,6}]

Factor[2 (-1+n) n-8]

Table[2 (-1+n) n-8,{n,20}]

GraphData[{"Grid",{3,3}},"Graph","Labeled"]

GraphData[{"Grid",{3,3}},"Chords"]

GraphData[{"Grid",{4,4}},"Graph","Labeled"]

Chords[GraphData[{"Grid",{4,4}}]]

ChordlessCycleCount

Entity["Graph",{"Grid",{n,n}}]["ChordlessCycleCount"]

A297664

seq=Table[GraphData[{"Grid",{n,n}},"ChordlessCycleCount"],{n,20}]

FindSequenceFunction[DeleteMissing[seq],n]//Head//Missing

gf=x FindGeneratingFunction[DeleteMissing@seq,x]//Head//Missing

ChromaticInvariant

Entity["Graph",{"Grid",{n,n}}]["ChromaticInvariant"]

A182517

seq=Table[GraphData[{"Grid",{n,n}},"ChromaticInvariant"],{n,20}]

FindLinearRecurrence[{3,72,11423,11187798,65460885384,2247082682913972,447548280314975144427}]//Head//Timing

FindSequenceFunction[{3,72,11423,11187798,65460885384},n]//Head//Timing

FindGeneratingFunction[{1,1,3,72,11423,11187798,65460885384,2247082682913972,447548280314975144427},x]//Head//Timing

Abs[Table[Derivative[1][ChromaticPolynomial[GridGraph[{n,n}]]][1],{n,7}]]//Timing

ChromaticNumber

Entity["Graph",{"Grid",{n,n}}]["ChromaticNumber"]

seq=Table[GraphData[{"Grid",{n,n}},"ChromaticNumber"],{n,20}]

ChromaticPolynomial

Entity["Graph",{"Grid",{n,n}}]["ChromaticPolynomial"]

row-reversed A182368

(poly=Table[GraphData[{"Grid",{n,n}},"ChromaticPolynomial"],{n,k0=1,kmax=20}]/.f_Function:>f[x])//Column

Length[DeleteMissing@poly]

Reverse/@CoefficientList[Table[System`ChromaticPolynomial[GridGraph[{n,n}],x],{n,5}],x]//Flatten

FindLinearRecurrence[DeleteMissing[poly]]//Head//Timing

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,k0,kmax}]

FullSimplify[poly2-poly]

Circumference

Entity["Graph",{"Grid",{n,n}}]["Circumference"]

seq=Table[GraphData[{"Grid",{n,n}},"Circumference"],{n,20}]

Table[Piecewise[{{Missing["NotApplicable"],n==1},{n^2,Mod[n,2]==0},{n^2-1,Mod[n,2]==1}}],{n,20}]==seq

Classes

classes1=Entity["Graph",{"Grid",{n,n}}]["Classes"]//CanonicalName

classes2=Intersection@@(GraphData[#,"Classes"]&/@(Cases[(GraphData[#,"NotationRules","Grid"])&/@GraphData["Grid"],{n_,n_}:>{"Grid",{n,n}}]))

Present in "Classes" property in GraphDataEntity but not reflected in paclet property:

Complement[classes1,classes2]

Should be added to "Classes" property in GraphDataEntity:

Complement[classes2,classes1]

ClawFree

Entity["Graph",{"Grid",{n,n}}]["ClawFree"]

seq=Table[GraphData[{"Grid",{n,n}},"ClawFree"],{n,20}]

CliqueCount

Entity["Graph",{"Grid",{n,n}}]["CliqueCount"]

seq=Table[GraphData[{"Grid",{n,n}},"CliqueCount"],{n,20}]

FindSequenceFunction[seq,n]//Factor

CliqueCoveringNumber

Entity["Graph",{"Grid",{n,n}}]["CliqueCoveringNumber"]

seq=Table[GraphData[{"Grid",{n,n}},"CliqueCoveringNumber"],{n,20}]

Table[Piecewise[{{n^2/2,Mod[n,2]==0},{(n^2+1)/2,Mod[n,2]==1}}],{n,20}]==seq

FindSequenceFunction[seq,n]

Table[(1/4)  (-(((-1))^n)+1+2  (n^2)),{n,20}]

FullSimplify[(1/4)  (-(((-1))^n)+1+2  (n^2)),Mod[n,2]==0]

FullSimplify[(1/4)  (-(((-1))^n)+1+2  (n^2)),Mod[n,2]==1]

CliqueNumber

Entity["Graph",{"Grid",{n,n}}]["CliqueNumber"]

seq=Table[GraphData[{"Grid",{n,n}},"CliqueNumber"],{n,20}]

CliquePolynomial

Entity["Graph",{"Grid",{n,n}}]["CliquePolynomial"][x]

(poly=Table[GraphData[{"Grid",{n,n}},"CliquePolynomial"],{n,k0=1,kmax=20}]/.f_Function:>f[x])//Column

coef=Factor/@FindLinearRecurrence[poly]

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[1+n x (2 (n-1) x+n),{n,k0,kmax}]

FullSimplify[poly2-poly]

ComplementOddChordlessCycleCount

Entity["Graph",{"Grid",{n,n}}]["ComplementOddChordlessCycleCount"]

seq=Table[GraphData[{"Grid",{n,n}},"ComplementOddChordlessCycleCount"],{n,20}]

ConnectedComponentCount

Entity["Graph",{"Grid",{n,n}}]["ConnectedComponentCount"]

seq=Table[GraphData[{"Grid",{n,n}},"ConnectedComponentCount"],{n,20}]

ConnectedDominatingSetCount

Entity["Graph",{"Grid",{n,n}}]["ConnectedDominatingSetCount"]

A287690

seq=Table[GraphData[{"Grid",{n,n}},"ConnectedDominatingSetCount"],{n,20}]

FindSequenceFunction[DeleteMissing@seq,n]//Head//Timing

FindGeneratingFunction[DeleteMissing@seq,x]//Head//Timing

ConnectedDominationNumber

Entity["Graph",{"Grid",{n,n}}]["ConnectedDominationNumber"]

seq=Table[GraphData[{"Grid",{n,n}},"ConnectedDominationNumber"],{n,20}]

FindSequenceFunction[seq,n]

ConnectedDominationPolynomial

Entity["Graph",{"Grid",{n,n}}]["ConnectedDominationPolynomial"]

(poly=Table[GraphData[{"Grid",{n,n}},"ConnectedDominationPolynomial"],{n,k0=1,kmax=20}]/.f_Function:>f[x])//Column

CoefficientList[Take[poly,5],x]

coef=Factor/@FindLinearRecurrence[DeleteMissing@poly]

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,k0,kmax}]

FullSimplify[poly2-poly]

ConnectedInducedSubgraphCount

Entity["Graph",{"Grid",{n,n}}]["ConnectedInducedSubgraphCount"]

A059525

seq=Table[GraphData[{"Grid",{n,n}},"ConnectedInducedSubgraphCount"],{n,20}]

FindLinearRecurrence[DeleteMissing@seq]//Head//Timing

FindSequenceFunction[DeleteMissing[seq],n]//Head//Timing

FindGeneratingFunction[DeleteMissing@seq,x]//Head//Timing

Table[Count[Subgraph[System`GridGraph[{n,n}],#]&/@Subsets[Range[n^2],{1,Infinity}],_?ConnectedGraphQ],{n,4}]//Timing

Table[With[{g=System`GridGraph[{n,n}]},Total[Boole[ConnectedGraphQ[Subgraph[g,#]]&/@Subsets[VertexList[g]]]]],{n,4}]-1

Table[Count[Subsets[Range[n^2],{1,Infinity}],_?(ConnectedGraphQ[Subgraph[System`GridGraph[{n,n}],#]]&)],{n,4}]//Timing

ConnectedInducedSubgraphPolynomial

Entity["Graph",{"Grid",{n,n}}]["ConnectedInducedSubgraphPolynomial"]

(poly=Table[GraphData[{"Grid",{n,n}},"ConnectedInducedSubgraphPolynomial"],{n,k0=1,kmax=20}]/.f_Function:>f[x])//Column

coef=Factor/@FindLinearRecurrence[poly]

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,6}]

FullSimplify[poly2-poly]

CrossingNumber

Entity["Graph",{"Grid",{n,n}}]["CrossingNumber"]

seq=Table[GraphData[{"Grid",{n,n}},"CrossingNumber"],{n,20}]

CycleCount

Entity["Graph",{"Grid",{n,n}}]["CycleCount"]

A140517

seq=Table[GraphData[{"Grid",{n,n}},"CycleCount"],{n,20}]

FindLinearRecurrence[Rest@seq]//Head//Timing

FindSequenceFunction[Rest@seq,n-1]//Head//Timing

FindGeneratingFunction[seq,x]//Head//Timing

CyclePolynomial

Entity["Graph",{"Grid",{n,n}}]["CyclePolynomial"]

(poly=Table[GraphData[{"Grid",{n,n}},"CyclePolynomial"],{n,k0=1,kmax=20}]/.f_Function:>f[x])//Column

coef=Factor/@FindLinearRecurrence[poly]

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,k0,kmax}]

FullSimplify[poly2-poly]

Cyclic

Entity["Graph",{"Grid",{n,n}}]["Cyclic"]

Table[GraphData[{"Grid",{n,n}},"Cyclic"],{n,20}]

CyclomaticNumber

Entity["Graph",{"Grid",{n,n}}]["CyclomaticNumber"]

seq=Table[GraphData[{"Grid",{n,n}},"CyclomaticNumber"],{n,20}]

FindSequenceFunction[seq,n]

DetourIndex

Entity["Graph",{"Grid",{n,n}}]["DetourIndex"]

seq=Table[GraphData[{"Grid",{n,n}},"DetourIndex"],{n,20}]

FindSequenceFunction[DeleteMissing[seq],n]//Head//Timing

FindLinearRecurrence[DeleteMissing@seq]//Head//Timing

FindGeneratingFunction[DeleteMissing[seq],x]//Head//Timing

Table[If[OddQ[n],(1/2)*(n-1)^3*(n+1)^3,(1/4)*n^2*(2*n^4-5*n^2+4)],{n,20}]==Take[seq,20]

DetourMatrix

Entity["Graph",{"Grid",{n,n}}]["DetourMatrix"]

MatrixForm/@Table[GraphData[{"Grid",{n,n}},"DetourMatrix"],{n,4}]

DetourPolynomial

Entity["Graph",{"Grid",{n,n}}]["DetourPolynomial"]

(poly=Table[GraphData[{"Grid",{n,n}},"DetourPolynomial"],{n,k0=1,kmax=20}]/.f_Function:>f[x])//Column

FindLinearRecurrence[DeleteMissing@poly]//Head//Timing

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,k0,kmax}]

FullSimplify[poly2-poly]

Diameter

Entity["Graph",{"Grid",{n,n}}]["Diameter"]

seq=Table[GraphData[{"Grid",{n,n}},"Diameter"],{n,20}]

FindSequenceFunction[seq,n]

DisorderNumber

Entity["Graph",{"Grid",{n,n}}]["DisorderNumber"]

https://arxiv.org/abs/2208.03788v3

Conjectured for ??:

seq=Table[GraphData[{"Grid",{n,n}},"DisorderNumber"],{n,20}]

FindSequenceFunction[DeleteMissing@seq,n]//Head//Timing

FindGeneratingFunction[DeleteMissing@seq,x]//Head//Timing

Table[Piecewise[{{0, n == 1}, {-3 + n^3, Mod[n, 2] == 0}, {-1 - n + n^3, Mod[n, 2] == 1}}, 0],{n,20}]

DistanceHereditary

Entity["Graph",{"Grid",{n,n}}]["DistanceHereditary"]

seq=Table[GraphData[{"Grid",{n,n}},"DistanceHereditary"],{n,20}]

DistanceMatrix

Entity["Graph",{"Grid",{n,n}}]["DistanceMatrix"]

MatrixForm/@Table[GraphData[{"Grid",{n,n}},"DistanceMatrix"],{n,5}]

MatrixForm/@Table[SparseArray[{i_,j_}:>Abs[i-j],n],{n,20}]

DistancePolynomial

Entity["Graph",{"Grid",{n,n}}]["DistancePolynomial"]

(poly=Table[GraphData[{"Grid",{n,n}},"DistancePolynomial"],{n,k0=1,kmax=20}]/.f_Function:>f[x])//Column

FindLinearRecurrence[Drop[poly,2]]//Head//Timing

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,k0,kmax}]

FullSimplify[poly2-poly]

DistinguishingNumber

Entity["Graph",{"Grid",{n,n}}]["DistinguishingNumber"]

seq=Table[GraphData[{"Grid",{n,n}},"DistinguishingNumber"],{n,20}]

DomaticNumber

Entity["Graph",{"Grid",{n,n}}]["DomaticNumber"]

Inferred for n > 10:

seq=Table[GraphData[{"Grid",{n,n}},"DomaticNumber"],{n,20}]

DominatingSetCount

Entity["Graph",{"Grid",{n,n}}]["DominatingSetCount"]

A133515

seq=Table[GraphData[{"Grid",{n,n}},"DominatingSetCount"],{n,20}]

FindLinearRecurrence[DeleteMissing[seq]]//Head//Timing

FindSequenceFunction[DeleteMissing[seq],n]//Head//Timing

FindGeneratingFunction[DeleteMissing[seq],x]//Head//Timing

DominationNumber

Entity["Graph",{"Grid",{n,n}}]["DominationNumber"]

A104519

seq=Table[GraphData[{"Grid",{n,n}},"DominationNumber"],{n,20}]

(seq=Monitor[Table[DominationNumber[GridGraph[{n,n}]],{n,12}],n])//Timing

Table[Piecewise[{{n-2,n≤6},{7,n==7},{10,n==8},{40,n==15}},Floor[n^2/5]-4],{n,3,51}]

seq={1,2,3,4,7,10,12,16,20,24,29,35,40,47,53,60,68,76,84,92,101,111,121,131,141,152,164,176,188,200,213,227,241,255,269,284,300,316,332,348,365,383,401,419,437,456,476,496,516};

Length[seq]

FindLinearRecurrence[seq]//Head//Timing

coef=FindLinearRecurrence[Drop[seq,13]]

LinearRecurrence[{2,-1,0,0,1,-2,1},Drop[seq,13],{-15,1}]

lr=LinearRecurrence[{2,-1,0,0,1,-2,1},{-3,-1,1,3,5,8,12},Length[seq]]

lr-seq

Position[lr-seq,Except[0,_Integer]]//Flatten

FindSequenceFunction[seq,n]

FindGeneratingFunction[seq,x]//Head//Timing

Series[-((x ((x^19)-2 (x^18)+(x^17)-(x^14)+2 (x^13)-3 (x^12)+2 (x^11)+(x^10)-2 (x^9)+2 (x^7)-(x^6)-(x^5)+2 (x^4)+1))/((((x-1))^3) ((x^4)+(x^3)+(x^2)+x+1))),{x,0,20}]

FullSimplify[SeriesCoefficient[-((x ((x^19)-2 (x^18)+(x^17)-(x^14)+2 (x^13)-3 (x^12)+2 (x^11)+(x^10)-2 (x^9)+2 (x^7)-(x^6)-(x^5)+2 (x^4)+1))/((((x-1))^3) ((x^4)+(x^3)+(x^2)+x+1))),{x,0,n}],n>0&&n∈(Integers)]

Table[(1/(25+5 I (Sqrt[5 (5-2 (Sqrt[5]))])))(-2 (((-1))^(6 n/5)) Root[5+25 ((#1)^2)+((#1)^4)&,2]+2 (((-1))^((1/5) (1+4 n))) Root[5+25 ((#1)^2)+((#1)^4)&,2]+(-18+n (4+n)) (5+Root[125+50 ((#1)^2)+((#1)^4)&,2])-2 (((-1))^(8 n/5)) Root[5-15 #1+15 ((#1)^2)-5 ((#1)^3)+((#1)^4)&,4]+2 (((-1))^(2 n/5)) Root[5-5 #1+5 ((#1)^2)+5 ((#1)^3)+((#1)^4)&,2]),{n,20}]//FullSimplify

DominationPolynomial

Entity["Graph",{"Grid",{n,n}}]["DominationPolynomial"]

(poly=Table[GraphData[{"Grid",{n,n}},"DominationPolynomial"],{n,k0=1,kmax=20}]/.f_Function:>f[x])//Column

CoefficientList[Take[poly,4],x]

coef=Factor/@FindLinearRecurrence[DeleteCases[poly,_Missing]]

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,k0,kmax}]

FullSimplify[poly2-poly]

EdgeChromaticNumber

Entity["Graph",{"Grid",{n,n}}]["EdgeChromaticNumber"]

seq=Table[GraphData[{"Grid",{n,n}},"EdgeChromaticNumber"],{n,20}]

EdgeConnectivity

Entity["Graph",{"Grid",{n,n}}]["EdgeConnectivity"]

Table[GraphData[{"Grid",{n,n}},"EdgeConnectivity"],{n,20}]

EdgeCount

Entity["Graph",{"Grid",{n,n}}]["EdgeCount"]

seq=Table[GraphData[{"Grid",{n,n}},"EdgeCount"],{n,20}]

FindSequenceFunction[seq,n]

EdgeCoverCount

Entity["Graph",{"Grid",{n,n}}]["EdgeCoverCount"]

A286913

EdgeCoverQ[GridGraph[{1,1}],{}]

seq=Table[GraphData[{"Grid",{n,n}},"EdgeCoverCount"],{n,20}]

FindLinearRecurrence[DeleteMissing@seq]//Head//Timing

FindSequenceFunction[DeleteMissing@seq,n]//Head//Timing

FindGeneratingFunction[DeleteMissing@seq,x]//Head//Timing

EdgeCoverNumber

Entity["Graph",{"Grid",{n,n}}]["EdgeCoverNumber"]

seq=Table[GraphData[{"Grid",{n,n}},"EdgeCoverNumber"],{n,20}]

Table[Ceiling[n^2/2],{n,20}]

FindSequenceFunction[seq,n]

gf=x FindGeneratingFunction[seq,x]

FullSimplify[SeriesCoefficient[gf,{x,0,n}],n>0]

FullSimplify[%,n>1&&Mod[n,2]==#]&/@{0,1}

EdgeCoverPolynomial

Entity["Graph",{"Grid",{n,n}}]["EdgeCoverPolynomial"]

(poly=Table[GraphData[{"Grid",{n,n}},"EdgeCoverPolynomial"],{n,k0=1,kmax=20}]/.f_Function:>f[x])//Column

CoefficientList[Take[poly,4],x]

coef=Factor/@FindLinearRecurrence[DeleteMissing@poly]

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,k0,kmax}]

FullSimplify[poly2-poly]

EulerianCycleCount

Entity["Graph",{"Grid",{n,n}}]["EulerianCycleCount"]

seq=Table[GraphData[{"Grid",{n,n}},"EulerianCycleCount"],{n,20}]

FaceCount

Entity["Graph",{"Grid",{n,n}}]["FaceCount"]

seq=Table[GraphData[{"Grid",{n,n}},"FaceCount"],{n,20}]

Table[PlanarFaceList[GridGraph[{n,n}]],{n,3}]//Column

Table[IGFaces[GridGraph[{n,n}]],{n,3}]//Column

{GraphData["K1","Faces"],GraphData["K1","FaceCount"]}

{GraphData["C4","Faces"],GraphData["C4","FaceCount"]}

FindLinearRecurrence[seq]

FindSequenceFunction[seq,n]

Table[2-2 n+(n^2),{n,20}]

gf=x FindGeneratingFunction[seq,x]

Factor/@FullSimplify[SeriesCoefficient[gf,{x,0,n}],n>0]

FibonacciCube

Entity["Graph",{"Grid",{n,n}}]["FibonacciCube"]

seq=Table[GraphData[{"Grid",{n,n}},"FibonacciCube"],{n,20}]

FlowPolynomial

Entity["Graph",{"Grid",{n,n}}]["FlowPolynomial"]

(poly=Table[GraphData[{"Grid",{n,n}},"FlowPolynomial"],{n,k0=1,kmax=20}]/.f_Function:>f[x])//Column

coef=Factor/@FindLinearRecurrence[Rest@DeleteMissing@poly]

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,k0,kmax}]

FullSimplify[poly2-poly]

FractionalChromaticNumber

Entity["Graph",{"Grid",{n,n}}]["FractionalChromaticNumber"]

seq=Table[GraphData[{"Grid",{n,n}},"FractionalChromaticNumber"],{n,20}]

FractionalEdgeChromaticNumber

Entity["Graph",{"Grid",{n,n}}]["FractionalEdgeChromaticNumber"]

seq=Table[GraphData[{"Grid",{n,n}},"FractionalEdgeChromaticNumber"],{n,20}]

Girth

Entity["Graph",{"Grid",{n,n}}]["Girth"]

seq=Table[GraphData[{"Grid",{n,n}},"Girth"],{n,20}]

Gonality

Entity["Graph",{"Grid",{n,n}}]["Gonality"]

seq=Table[GraphData[{"Grid",{n,n}},"Gonality"],{n,20}]

HamiltonConnected

Entity["Graph",{"Grid",{n,n}}]["HamiltonConnected"]

seq=Table[GraphData[{"Grid",{n,n}},"HamiltonConnected"],{n,20}]

HamiltonDecompositionCount

Entity["Graph",{"Grid",{n,n}}]["HamiltonDecompositionCount"]

seq=Table[GraphData[{"Grid",{n,n}},"HamiltonDecompositionCount"],{n,20}]

Hamiltonian

Entity["Graph",{"Grid",{n,n}}]["Hamiltonian"]

Table[GraphData[{"Grid",{n,n}},"Hamiltonian"],{n,20}]

HamiltonianCycleCount

Entity["Graph",{"Grid",{n,n}}]["HamiltonianCycleCount"]

A003763

seq=Table[GraphData[{"Grid",{n,n}},"HamiltonianCycleCount"],{n,20}]

seq[[2;;All;;2]]

HamiltonianNumber

Entity["Graph",{"Grid",{n,n}}]["HamiltonianNumber"]

seq=Table[GraphData[{"Grid",{n,n}},"HamiltonianNumber"],{n,20}]

HamiltonianPathCount

Entity["Graph",{"Grid",{n,n}}]["HamiltonianPathCount"]

A120443

seq=Table[GraphData[{"Grid",{n,n}},"HamiltonianPathCount"],{n,20}]

FindSequenceFunction[DeleteMissing@seq,n]//Head//Timing

FindGeneratingFunction[DeleteMissing@seq,x]//Head//Timing

HamiltonianWalkCount

Entity["Graph",{"Grid",{n,n}}]["HamiltonianWalkCount"]

seq=Table[GraphData[{"Grid",{n,n}},"HamiltonianWalkCount"],{n,20}]

HararyIndex

Entity["Graph",{"Grid",{n,n}}]["HararyIndex"]

seq=Table[GraphData[{"Grid",{n,n}},"HararyIndex"],{n,20}]

FindSequenceFunction[seq,n]//FullSimplify

HexagonCount

Entity["Graph",{"Grid",{n,n}}]["HexagonCount"]

seq=Table[GraphData[{"Grid",{n,n}},"HexagonCount"],{n,20}]

FindSequenceFunction[seq,n]

IdiosyncraticPolynomial

Entity["Graph",{"Grid",{n,n}}]["IdiosyncraticPolynomial"]

(poly=Table[GraphData[{"Grid",{n,n}},"IdiosyncraticPolynomial"],{n,k0=1,kmax=20}]/.f_Function:>f[x,y])//Column

coef=Factor/@FindLinearRecurrence[poly]

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,k0,kmax}]

FullSimplify[poly2-poly]

IndependenceNumber

Entity["Graph",{"Grid",{n,n}}]["IndependenceNumber"]

seq=Table[GraphData[{"Grid",{n,n}},"IndependenceNumber"],{n,20}]

FindSequenceFunction[seq,n]//FullSimplify

Table[Ceiling[n^2/2],{n,20}]==seq

FullSimplify[Subtract@@{Ceiling[n^2/2],(1/4) (((-1))^n) (-1+(((-1))^n) (1+2 (n^2)))},n∈Integers]

Table[%,{n,20}]

IndependencePolynomial

Entity["Graph",{"Grid",{n,n}}]["IndependencePolynomial"]

A232833 with trailing zeros dropped

(poly=Factor[Table[GraphData[{"Grid",{n,n}},"IndependencePolynomial"],{n,k0=1,kmax=20}]/.f_Function:>f[x]])//Column

CoefficientList[Take[poly,4],x]

FindLinearRecurrence[DeleteMissing@poly]//Head//Timing

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,k0,kmax}]

FullSimplify[poly2-poly]

IndependenceRatio

Entity["Graph",{"Grid",{n,n}}]["IndependenceRatio"]

seq=Table[GraphData[{"Grid",{n,n}},"IndependenceRatio"],{n,20}]

FindSequenceFunction[seq,n]//FullSimplify

Table[Ceiling[n^2/2]/n^2,{n,20}]==seq

IndependentEdgeSetCount

Entity["Graph",{"Grid",{n,n}}]["IndependentEdgeSetCount"]

A028420

seq=Table[GraphData[{"Grid",{n,n}},"IndependentEdgeSetCount"],{n,20}]

FindLinearRecurrence[DeleteMissing@seq]//Head//Timing

FindSequenceFunction[DeleteMissing@seq,n]//Head//Timing

FindGeneratingFunction[DeleteMissing@seq,x]//Head//Timing

Table[
With[{g=GridGraph[{n,n}]},Count[Subsets[EdgeList[g],Length@Flatten@FindIndependentEdgeSet[g]],_?(IndependentEdgeSetQ[g,#]&)]],
{n,4}
]//Timing

IndependentVertexSetCount

Entity["Graph",{"Grid",{n,n}}]["IndependentVertexSetCount"]

A006506

seq=Table[GraphData[{"Grid",{n,n}},"IndependentVertexSetCount"],{n,20}]

FindLinearRecurrence[seq]//Head//Timing

FindSequenceFunction[seq,n]//Head//Timing

FindGeneratingFunction[seq,x]//Head//Timing

Table[With[{g=System`GridGraph[{n,n}]},Count[Subsets[Range[n^2],Length@First@FindIndependentVertexSet[g]],_?(IndependentVertexSetQ[g,#]&)]],{n,5}]

IntersectionNumber

Entity["Graph",{"Grid",{n,n}}]["IntersectionNumber"]

seq=Table[GraphData[{"Grid",{n,n}},"IntersectionNumber"],{n,20}]

KirchhoffIndex

Entity["Graph",{"Grid",{n,n}}]["KirchhoffIndex"]

seq=Table[GraphData[{"Grid",{n,n}},"KirchhoffIndex"],{n,20}]

FindLinearRecurrence[Rest@seq]//Head//Timing

FindSequenceFunction[Rest@seq,n]//Head//Timing

FindGeneratingFunction[seq,x]//Head//Timing

(seq=Table[KirchhoffIndex[GridGraph[{n,n}]],{n,17}])//Timing

KirchhoffSumIndex

Entity["Graph",{"Grid",{n,n}}]["KirchhoffSumIndex"]

seq=Table[GraphData[{"Grid",{n,n}},"KirchhoffSumIndex"],{n,20}]

FindLinearRecurrence[Rest@seq]//Head//Timing

FindSequenceFunction[Rest@seq]//Head//Timing

FindGeneratingFunction[seq,x]//Head//Timing

(seq=Table[KirchhoffSumIndex[GridGraph[{n,n}]],{n,15}])//Timing

LaplacianMatrix

Entity["Graph",{"Grid",{n,n}}]["LaplacianMatrix"]

MatrixForm/@Table[GraphData[{"Grid",{n,n}},"LaplacianMatrix"],{n,5}]

LaplacianPolynomial

Entity["Graph",{"Grid",{n,n}}]["LaplacianPolynomial"]

(poly=Table[GraphData[{"Grid",{n,n}},"LaplacianPolynomial"],{n,k0=1,kmax=20}]/.f_Function:>f[x])//Column

coef=Factor/@FindLinearRecurrence[poly]

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,k0,kmax}]

FullSimplify[poly2-poly]

LeafCount

Entity["Graph",{"Grid",{n,n}}]["LeafCount"]

seq=Table[GraphData[{"Grid",{n,n}},"LeafCount"],{n,20}]

LongestCycleCount

Entity["Graph",{"Grid",{n,n}}]["LongestCycleCount"]

seq=Table[GraphData[{"Grid",{n,n}},"LongestCycleCount"],{n,20}]

LovaszNumber

Entity["Graph",{"Grid",{n,n}}]["LovaszNumber"]

seq=Table[GraphData[{"Grid",{n,n}},"LovaszNumber"],{n,20}]

LucasCube

Entity["Graph",{"Grid",{n,n}}]["LucasCube"]

seq=Table[GraphData[{"Grid",{n,n}},"LucasCube"],{n,20}]

MatchingGeneratingPolynomial

Entity["Graph",{"Grid",{n,n}}]["MatchingGeneratingPolynomial"]

A242861

(poly=Factor[Table[GraphData[{"Grid",{n,n}},"MatchingGeneratingPolynomial"],{n,k0=1,kmax=20}]/.f_Function:>f[x]])//Column

Position[poly,_Missing]//Flatten

FindLinearRecurrence[DeleteMissing@poly]//Head//Timing

b[n_,l_List]:=b[n,l]=Module[{k},
Which[n==0,1,Min[l]>0,b[n-1,l-1],True,For[k=1,l[[k]]>0,k++];Expand[If[n>1,x b[n,ReplacePart[l,k->2]],0]+If[k<Length[l]&&l[[k+1]]==0,x b[n,ReplacePart[l,{k->1,k+1->1}]],0]+b[n,ReplacePart[l,k->1]]]]
];T[n_]:=Function[{p},Table[Coefficient[p,x,i],{i,0,Exponent[p,x]}]][b[n,Array[0&,n]]];

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,k0,kmax}]

FullSimplify[poly2-poly]

MatchingNumber

Entity["Graph",{"Grid",{n,n}}]["MatchingNumber"]

seq=Table[GraphData[{"Grid",{n,n}},"MatchingNumber"],{n,20}]

FindSequenceFunction[seq,n]//FullSimplify

Table[Floor[n^2/2],{n,20}]

MatchingPolynomial

Entity["Graph",{"Grid",{n,n}}]["MatchingPolynomial"]

(poly=Factor[Table[GraphData[{"Grid",{n,n}},"MatchingPolynomial"],{n,k0=1,kmax=20}]/.f_Function:>f[x]])//Column

FindLinearRecurrence[DeleteMissing@poly]//Head//Timing

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,k0,kmax}]

FullSimplify[poly2-poly]

MaximalCliqueCount

Entity["Graph",{"Grid",{n,n}}]["MaximalCliqueCount"]

seq=Table[GraphData[{"Grid",{n,n}},"MaximalCliqueCount"],{n,20}]

FindSequenceFunction[seq,n]

gf=x FindGeneratingFunction[seq,x]

FullSimplify[SeriesCoefficient[gf,{x,0,n}],n>0]

MaximalIndependentEdgeSetCount

Entity["Graph",{"Grid",{n,n}}]["MaximalIndependentEdgeSetCount"]

A287595

seq=Table[GraphData[{"Grid",{n,n}},"MaximalIndependentEdgeSetCount"],{n,20}]

FindLinearRecurrence[DeleteMissing[seq]]//Head//Timing

FindSequenceFunction[DeleteMissing@seq,n]//Head//Timing

FindGeneratingFunction[DeleteMissing@seq,x]//Head//Timing

MaximalIndependentVertexSetCount

Entity["Graph",{"Grid",{n,n}}]["MaximalIndependentVertexSetCount"]

A197048

seq=Table[GraphData[{"Grid",{n,n}},"MaximalIndependentVertexSetCount"],{n,20}]

FindLinearRecurrence[DeleteMissing@seq]//Head//Timing

FindSequenceFunction[DeleteMissing@seq,n]//Head//Timing

FindGeneratingFunction[DeleteMissing@seq,x]//Head//Timing

MaximumCliqueCount

Entity["Graph",{"Grid",{n,n}}]["MaximumCliqueCount"]

seq=Table[GraphData[{"Grid",{n,n}},"MaximumCliqueCount"],{n,20}]

FindSequenceFunction[seq,n]//FunctionExpand

SeriesCoefficient[x FindGeneratingFunction[seq,x],{x,0,n}]

MaximumIndependentEdgeSetCount

Entity["Graph",{"Grid",{n,n}}]["MaximumIndependentEdgeSetCount"]

A137308

seq=Table[GraphData[{"Grid",{n,n}},"MaximumIndependentEdgeSetCount"],{n,20}]

FindLinearRecurrence[seq]//Head//Timing

FindLinearRecurrence[Rest@seq]//Head//Timing

FindSequenceFunction[seq,n]//Head//Timing

FindGeneratingFunction[seq,x]//Head//Timing

MaximumIndependentVertexSetCount

Entity["Graph",{"Grid",{n,n}}]["MaximumIndependentVertexSetCount"]

A000034

seq=Table[GraphData[{"Grid",{n,n}},"MaximumIndependentVertexSetCount"],{n,20}]

FindSequenceFunction[seq,n]//FullSimplify

Table[Piecewise[{{2,Mod[n,2]==0},{1,Mod[n,2]==1}}],{n,20}]

MaximumLeafNumber

Entity["Graph",{"Grid",{n,n}}]["MaximumLeafNumber"]

seq=Table[GraphData[{"Grid",{n,n}},"MaximumLeafNumber"],{n,20}]

MaximumVertexDegree

Entity["Graph",{"Grid",{n,n}}]["MaximumVertexDegree"]

seq=Table[GraphData[{"Grid",{n,n}},"MaximumVertexDegree"],{n,20}]

MeanDistance

Entity["Graph",{"Grid",{n,n}}]["MeanDistance"]

seq=Table[GraphData[{"Grid",{n,n}},"MeanDistance"],{n,20}]

FindSequenceFunction[seq,n]

Median

Entity["Graph",{"Grid",{n,n}}]["Median"]

seq=Table[GraphData[{"Grid",{n,n}},"Median"],{n,20}]

Meyniel

Entity["Graph",{"Grid",{n,n}}]["Meyniel"]

Inferred for n > 7:

seq=Table[GraphData[{"Grid",{n,n}},"Meyniel"],{n,20}]

Do[Print[{n,MeynielGraphQ[GridGraph[{n,n}]]//Timing}],{n,10}]

MinimalDominatingSetCount

Entity["Graph",{"Grid",{n,n}}]["MinimalDominatingSetCount"]

A290382

seq=Table[GraphData[{"Grid",{n,n}},"MinimalDominatingSetCount"],{n,20}]

FindLinearRecurrence[DeleteMissing@seq]

FindSequenceFunction[DeleteMissing@seq,n]

gf=x FindGeneratingFunction[DeleteMissing@seq,x]

MinimalDominationPolynomial

Entity["Graph",{"Grid",{n,n}}]["MinimalDominationPolynomial"]

(poly=Table[GraphData[{"Grid",{n,n}},"MinimalDominationPolynomial"],{n,20}]/.f_Function:>f[x])//Column

MinimalEdgeCoverCount

Entity["Graph",{"Grid",{n,n}}]["MinimalEdgeCoverCount"]

A288027

seq=Table[GraphData[{"Grid",{n,n}},"MinimalEdgeCoverCount"],{n,20}]

FindLinearRecurrence[DeleteMissing@seq]//Head//Timing

FindSequenceFunction[DeleteMissing@seq,n]//Head//Timing

FindGeneratingFunction[DeleteMissing@seq,x]//Head//Timing

MinimumConnectedDominatingSetCount

Entity["Graph",{"Grid",{n,n}}]["MinimumConnectedDominatingSetCount"]

seq=Table[GraphData[{"Grid",{n,n}},"MinimumConnectedDominatingSetCount"],{n,20}]

FindSequenceFunction[seq,n]

MinimumCoveringsByMaximalCliquesCount

Entity["Graph",{"Grid",{n,n}}]["MinimumCoveringsByMaximalCliquesCount"]

seq=Table[GraphData[{"Grid",{n,n}},"MinimumCoveringsByMaximalCliquesCount"],{n,20}]

MinimumDistinguishingLabelingCount

Entity["Graph",{"Grid",{n,n}}]["MinimumDistinguishingLabelingCount"]

seq=Table[GraphData[{"Grid",{n,n}},"MinimumDistinguishingLabelingCount"],{n,20}]

MinimumDominatingSetCount

Entity["Graph",{"Grid",{n,n}}]["MinimumDominatingSetCount"]

A347632

seq=Table[GraphData[{"Grid",{n,n}},"MinimumDominatingSetCount"],{n,20}]

FindLinearRecurrence[DeleteMissing@seq]//Head//Timing

FindSequenceFunction[DeleteMissing@seq,n]//Head//Timing

FindGeneratingFunction[DeleteMissing@seq,x]//Head//Timing

MinimumEdgeCoverCount

Entity["Graph",{"Grid",{n,n}}]["MinimumEdgeCoverCount"]

seq=Table[GraphData[{"Grid",{n,n}},"MinimumEdgeCoverCount"],{n,20}]

MinimumVertexDegree

Entity["Graph",{"Grid",{n,n}}]["MinimumVertexDegree"]

seq=Table[GraphData[{"Grid",{n,n}},"MinimumVertexDegree"],{n,20}]

MolecularTopologicalIndex

Entity["Graph",{"Grid",{n,n}}]["MolecularTopologicalIndex"]

seq=Table[GraphData[{"Grid",{n,n}},"MolecularTopologicalIndex"],{n,20}]

FindSequenceFunction[Rest@seq,n-1]//Factor

seq=Table[MolecularTopologicalIndex[GridGraph[{n,n}]],{n,20}]

Table[Piecewise[{{0,n==1}},(2/3) (12-42 n+26 (n^2)-(n^3)-5 (n^4)+4 (n^5))],{n,20}]

Nonhamiltonian

Entity["Graph",{"Grid",{n,n}}]["Nonhamiltonian"]

Table[GraphData[{"Grid",{n,n}},"Nonhamiltonian"],{n,20}]

NormalizedLaplacianMatrix

Entity["Graph",{"Grid",{n,n}}]["NormalizedLaplacianMatrix"]

MatrixForm/@Table[GraphData[{"Grid",{n,n}},"NormalizedLaplacianMatrix"],{n,20}]

OddChordlessCycleCount

Entity["Graph",{"Grid",{n,n}}]["OddChordlessCycleCount"]

seq=Table[GraphData[{"Grid",{n,n}},"OddChordlessCycleCount"],{n,20}]

PathCount

Entity["Graph",{"Grid",{n,n}}]["PathCount"]

A288032

seq=Table[GraphData[{"Grid",{n,n}},"PathCount"],{n,20}]

FindLinearRecurrence[DeleteMissing@seq]//Head//Timing

FindSequenceFunction[DeleteMissing@seq,n]//Head//Timing

FindGeneratingFunction[DeleteMissing@seq,x]//Head//Timing

PathPolynomial

Entity["Graph",{"Grid",{n,n}}]["PathPolynomial"]

(poly=Factor[Table[GraphData[{"Grid",{n,n}},"PathPolynomial"],{n,k0=1,kmax=20}]/.f_Function:>f[x]])//Column

CoefficientList[Take[poly,4],x]

coef=Factor/@FindLinearRecurrence[DeleteMissing@poly]

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,k0,kmax}]

FullSimplify[poly2-poly]

Pell

Entity["Graph",{"Grid",{n,n}}]["Pell"]

seq=Table[GraphData[{"Grid",{n,n}},"Pell"],{n,20}]

PentagonCount

Entity["Graph",{"Grid",{n,n}}]["PentagonCount"]

seq=Table[GraphData[{"CompleteBipartite",{n,n}},"PentagonCount"],{n,20}]

Perfect

Entity["Graph",{"Grid",{n,n}}]["Perfect"]

Table[GraphData[{"Grid",{n,n}},"Perfect"],{n,20}]

ProjectivePlaneCrossingNumber

Entity["Graph",{"Grid",{n,n}}]["ProjectivePlaneCrossingNumber"]

seq=Table[GraphData[{"Grid",{n,n}},"ProjectivePlaneCrossingNumber"],{n,20}]

Radius

Entity["Graph",{"Grid",{n,n}}]["Radius"]

seq=Table[GraphData[{"Grid",{n,n}},"Radius"],{n,20}]

Table[2Floor[n/2],{n,20}]==seq

RankPolynomial

Entity["Graph",{"Grid",{n,n}}]["RankPolynomial"]

(poly=Table[GraphData[{"Grid",{n,n}},"RankPolynomial"],{n,k0=1,kmax=20}]/.f_Function:>f[x,y])//Column

FindLinearRecurrence[DeleteMissing@poly]//Head//Timing

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,k0,kmax}]

FullSimplify[poly2-poly]

RectilinearCrossingNumber

Entity["Graph",{"Grid",{n,n}}]["RectilinearCrossingNumber"]

seq=Table[GraphData[{"Grid",{n,n}},"RectilinearCrossingNumber"],{n,20}]

ReliabilityPolynomial

Entity["Graph",{"Grid",{n,n}}]["ReliabilityPolynomial"]

(poly=Table[GraphData[{"Grid",{n,n}},"ReliabilityPolynomial"],{n,k0=1,kmax=20}]/.f_Function:>f[x])//Column

coef=Factor/@FindLinearRecurrence[Rest@DeleteMissing@poly]

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,k0,kmax}]

FullSimplify[poly2-poly]

SigmaPolynomial

Entity["Graph",{"Grid",{n,n}}]["SigmaPolynomial"]

(poly=Factor[Table[GraphData[{"Grid",{n,n}},"SigmaPolynomial"],{n,k0=1,kmax=20}]/.f_Function:>f[x]])//Column

coef=Factor/@FindLinearRecurrence[Rest@DeleteMissing@poly]

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,k0,kmax}]

FullSimplify[poly2-poly]

Skewness

Entity["Graph",{"Grid",{n,n}}]["Skewness"]

seq=Table[GraphData[{"Grid",{n,n}},"Skewness"],{n,20}]

SpanningTreeCount

Entity["Graph",{"Grid",{n,n}}]["SpanningTreeCount"]

A007341

seq=Table[GraphData[{"Grid",{n,n}},"SpanningTreeCount"],{n,20}]

FindLinearRecurrence[seq]//Head//Timing

FindSequenceFunction[seq,n]//Head//Timing

Table[Resultant[ChebyshevU[n-1,x/2],ChebyshevU[n-1,(4-x)/2],x],{n,5}]

Resultant[ChebyshevU[n-1,x/2],ChebyshevU[n-1,(4-x)/2],x]

Inactive[Resultant][ChebyshevU[n-1,x/2],ChebyshevU[n-1,(4-x)/2],x]//TraditionalForm

(n) = 2^(n^2-1) / n^2 * product_{n1=0..n-1, n2=0..n-1, n1 and n2 not both 0} (2 - cos(PI*n1/n) - cos(PI*n2/n) ).

DeleteCases[Table[{i,j},{i,0,n-1},{j,0,n-1}],{0,0}]

Product[Piecewise[{{1,i==j==0}},2-Cos[((π i)/n)]-Cos[((π j)/n)]],{i,0,n-1},{j,0,n-1}]

Table[
((2^((n^2)-1))/(n^2))Times@@(Function[{i,j},2-Cos[((π i)/n)]-Cos[((π j)/n)]]@@@DeleteCases[Flatten[Table[{i,j},{i,0,n-1},{j,0,n-1}],1],{0,0}]),
{n,8}]//RootReduce//Timing

SquareCount

Entity["Graph",{"Grid",{n,n}}]["SquareCount"]

seq=Table[GraphData[{"Grid",{n,n}},"SquareCount"],{n,20}]

FindSequenceFunction[seq,n]

StabilityIndex

Entity["Graph",{"Grid",{n,n}}]["StabilityIndex"]

seq=Table[GraphData[{"Grid",{n,n}},"StabilityIndex"],{n,20}]

seq[[2;;;;2]]

FindSequenceFunction[seq,n]//Head//Timing

FindSequenceFunction[seq[[2;;All;;2]],n]//Head//Timing

FindGeneratingFunction[seq[[2;;All;;2]],x]//Head//Timing

seq=Table[StabilityIndex[GridGraph[{n,n}]],{n,12}]

TopologicalIndex

Entity["Graph",{"Grid",{n,n}}]["TopologicalIndex"]

seq=Table[GraphData[{"Grid",{n,n}},"TopologicalIndex"],{n,20}]

seq[[2;;;;2]]

FindSequenceFunction[seq[[2;;All;;2]],n]

FindGeneratingFunction[seq,x]

seq=Table[StabilityIndex[GridGraph[{n,n}]],{n,12}]

ToroidalCrossingNumber

Entity["Graph",{"Grid",{n,n}}]["ToroidalCrossingNumber"]

seq=Table[GraphData[{"Grid",{n,n}},"ToroidalCrossingNumber"],{n,20}]

Traceable

Entity["Graph",{"Grid",{n,n}}]["Traceable"]

Table[GraphData[{"Grid",{n,n}},"Traceable"],{n,20}]

Table[GraphData[{"Grid",{n,n}},"Hamiltonian"],{n,20}]

TriangleCount

Entity["Graph",{"Grid",{n,n}}]["TriangleCount"]

seq=Table[GraphData[{"Grid",{n,n}},"TriangleCount"],{n,20}]

TuttePolynomial

Entity["Graph",{"Grid",{n,n}}]["TuttePolynomial"]

(poly=Table[GraphData[{"Grid",{n,n}},"TuttePolynomial"],{n,k0=1,kmax=20}]/.f_Function:>f[x,y])//Column

coef=Factor/@FindLinearRecurrence[poly]

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,k0,kmax}]

FullSimplify[poly2-poly]

Untraceable

Entity["Graph",{"Grid",{n,n}}]["Untraceable"]

Table[GraphData[{"Grid",{n,n}},"Untraceable"],{n,20}]

VertexConnectivity

Entity["Graph",{"Grid",{n,n}}]["VertexConnectivity"]

Table[GraphData[{"Grid",{n,n}},"VertexConnectivity"],{n,20}]

VertexCount

Entity["Graph",{"Grid",{n,n}}]["VertexCount"]

seq=Table[GraphData[{"Grid",{n,n}},"VertexCount"],{n,20}]

FindSequenceFunction[seq,n]

VertexCoverNumber

Entity["Graph",{"Grid",{n,n}}]["VertexCoverNumber"]

Related to but not the same as IndependenceNumber

seq=Table[GraphData[{"Grid",{n,n}},"VertexCoverNumber"],{n,20}]

FindSequenceFunction[seq,n]//FullSimplify

Table[Floor[n^2/2],{n,20}]

VertexCoverPolynomial

Entity["Graph",{"Grid",{n,n}}]["VertexCoverPolynomial"]

(poly=Table[GraphData[{"Grid",{n,n}},"VertexCoverPolynomial"],{n,k0=1,kmax=20}]/.f_Function:>f[x])//Column

CoefficientList[Take[poly,4],x]

FindLinearRecurrence[DeleteMissing@poly]//Head//Timing

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,k0,kmax}]

FullSimplify[poly2-poly]

VertexDegrees

Entity["Graph",{"Grid",{n,n}}]["VertexDegrees"]

Tally/@Table[GraphData[{"Grid",{n,n}},"VertexDegrees"],{n,20}]//Column

VertexTransitive

Entity["Graph",{"Grid",{n,n}}]["VertexTransitive"]

Table[GraphData[{"Grid",{n,n}},"VertexTransitive"],{n,20}]

WienerIndex

Entity["Graph",{"Grid",{n,n}}]["WienerIndex"]

A143945

m*n*(n+m)*(m*n-1)/6/.m->n

seq=Table[GraphData[{"Grid",{n,n}},"WienerIndex"],{n,20}]

FindSequenceFunction[seq,n]//Factor

seq=Table[(1/3) (-1+n) (n^3) (1+n),{n,20}]

FindLinearRecurrence[seq]

LinearRecurrence[{6,-15,20,-15,6,-1},{0,8,72,320,1000,2520},20]

gf=x FindGeneratingFunction[seq,x]

CoefficientList[Series[((8 x(1+3 x+(x^2)))/(((-1+x))^6)),{x,0,20}],x]

WienerSumIndex

Entity["Graph",{"Grid",{n,n}}]["WienerSumIndex"]

seq=Table[GraphData[{"Grid",{n,n}},"WienerSumIndex"],{n,20}]

FindLinearRecurrence[DeleteMissing@seq]//Head//Timing

FindSequenceFunction[DeleteMissing@seq,n]//Head//Timing

(seq=Table[WienerSumIndex[GridGraph[{n,n}]],{n,15}]);//Timing

Properties k×m×n

Arboricity

Probably 2

DeleteCases[Block[{k,m,n},{{k,m,n}="Grid"/.GraphData[#,"NotationRules"],XXX,GraphData[#,"Arboricity"]}]&/@Select[GraphData["Grid"],Length["Grid"/.GraphData[#,"NotationRules"]]==3&],{_,x_,x_}]

ChordCount

DeleteCases[Block[{k,m,n},{{k,m,n}="Grid"/.GraphData[#,"NotationRules"],3 k m n-k m-k n-m n,GraphData[#,"ChordCount"]}]&/@Select[GraphData["Grid"],Length["Grid"/.GraphData[#,"NotationRules"]]==3&],{_,x_,x_}]

Classes

Intersection@@(GraphData[#,"Classes"]&/@(Cases[("Grid"/.GraphData[#,"NotationRules"])&/@GraphData["Grid"],{k_,m_,n_}:>{"Grid",{k,m,n}}]))

EdgeCount

DeleteCases[Block[{k,m,n},{{k,m,n}="Grid"/.GraphData[#,"NotationRules"],3 k m n-k m-k n-m n,GraphData[#,"EdgeCount"]}]&/@Select[GraphData["Grid"],Length["Grid"/.GraphData[#,"NotationRules"]]==3&],{_,x_,x_}]

FibonacciCube

Entity["Graph",{"Grid",{k,m,n}}]["FibonacciCube"]

Cases[Flatten[Table[{{k,m,n},GraphData[{"Grid",{k,m,n}},"FibonacciCube"]},{n,5},{m,n},{k,m}],2],{i_,True}:>i]

LucasCube

Entity["Graph",{"Grid",{k,m,n}}]["LucasCube"]

Cases[Flatten[Table[{{k,m,n},GraphData[{"Grid",{k,m,n}},"LucasCube"]},{n,5},{m,n},{k,m}],2],{i_,True}:>i]

Pell

Entity["Graph",{"Grid",{k,m,n}}]["Pell"]

Cases[Flatten[Table[{{k,m,n},GraphData[{"Grid",{k,m,n}},"Pell"]},{n,5},{m,n},{k,m}],2],{i_,True}:>i]

Properties n×n×n

Acyclic

Table[GraphData[{"Grid",{n,n,n}},"Acyclic"],{n,10}]

AdjacencyMatrixCount

seq=Table[GraphData[{"Grid",{n,n,n}},"AdjacencyMatrixCount"],{n,5}]

Table[Piecewise[{{1,n==1}},(((n^3)!)/48)],{n,5}]

Arboricity

Probably n

Table[GraphData[{"Grid",{n,n,n}},"Arboricity"],{n,10}]

ArcTransitive

Table[GraphData[{"Grid",{n,n,n}},"ArcTransitive"],{n,10}]

ArcTransitivity

Table[GraphData[{"Grid",{n,n,n}},"ArcTransitivity"],{n,10}]

AutomorphismCount

Table[GraphData[{"Grid",{n,n,n}},"AutomorphismCount"],{n,10}]

BalabanIndex

Table[GraphData[{"Grid",{n,n,n}},"BalabanIndex"],{n,4}]

Bandwidth

Table[GraphData[{"Grid",{n,n,n}},"Bandwidth"],{n,10}]

BridgeCount

seq=Table[GraphData[{"Grid",{n,n,n}},"BridgeCount"],{n,10}]

BurningNumber

seq=Table[GraphData[{"Grid",{n,n,n}},"BurningNumber"],{n,10}]

CharacteristicPolynomial

(poly=Factor[Table[GraphData[{"Grid",{n,n,n}},"CharacteristicPolynomial"],{n,k0=1,kmax=10}]/.f_Function:>f[x]])//Column

coef=Factor/@FindLinearRecurrence[poly]

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,k0,kmax}]

FullSimplify[poly2-poly]

Chordal

Table[GraphData[{"Grid",{n,n,n}},"Chordal"],{n,10}]

ChordCount

seq=Table[GraphData[{"Grid",{n,n,n}},"ChordCount"],{n,10}]

Chords[GraphData[{"Grid",{3,3,3}}]]//Length//Timing

Table[3(n-1)n^2,{n,10}]

GraphData[{"Grid",{2,2,2}},"Chords"]

GraphData[{"Grid",{2,2,2}},"Edges","List"]

GraphData[{"Grid",{2,2,2}},"Graph",{"3D","Labeled"}]

Chordless

Table[GraphData[{"Grid",{n,n,n}},"Chordless"],{n,10}]

ChordlessCycleCount

seq=Table[GraphData[{"Grid",{n,n,n}},"ChordlessCycleCount"],{n,10}]

FindSequenceFunction[seq,n]

Chords

seq=Table[GraphData[{"Grid",{n,n,n}},"Chords"],{n,10}]

ChromaticInvariant

seq=Table[GraphData[{"Grid",{n,n,n}},"ChromaticInvariant"],{n,10}]

ChromaticNumber

seq=Table[GraphData[{"Grid",{n,n,n}},"ChromaticNumber"],{n,10}]

ChromaticPolynomial

(poly=Factor[Table[GraphData[{"Grid",{n,n,n}},"ChromaticPolynomial"],{n,k0=1,kmax=10}]/.f_Function:>f[x]])//Column

coef=Factor/@FindLinearRecurrence[poly]

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,k0,kmax}]

FullSimplify[poly2-poly]

Circumference

seq=Table[GraphData[{"Grid",{n,n,n}},"Circumference"],{n,10}]

FindSequenceFunction[Drop[seq,1],n-1]

gf=(x^2)FindGeneratingFunction[Rest[seq],x]

SeriesCoefficient[gf,{x,0,n}]

Classes

Intersection@@(GraphData[#,"Classes"]&/@(Cases[("Grid"/.GraphData[#,"NotationRules"])&/@GraphData["Grid"],{n_,n_,n_}:>{"Grid",{n,n,n}}]))

CliqueCount

seq=Table[GraphData[{"Grid",{n,n,n}},"CliqueCount"],{n,10}]

FindSequenceFunction[seq,n]//Factor

FullSimplify[Piecewise[{{(1+2 x) (1+6 x),n==2}},1+(n^3)x+3(n^2)(n-1)(x^2)]/.x->1]//Factor

CliqueCoveringNumber

seq=Table[GraphData[{"Grid",{n,n,n}},"CliqueCoveringNumber"],{n,10}]

FindSequenceFunction[seq,n]

FindSequenceFunction[Rest@seq,n-1]

gf=x FindGeneratingFunction[seq,x]

FullSimplify[SeriesCoefficient[gf,{x,0,n}],n>0]

Table[(1/4) (1+(((-1))^(1+n))+2 (n^3)),{n,10}]

CliqueNumber

seq=Table[GraphData[{"Grid",{n,n,n}},"CliqueNumber"],{n,10}]

CliquePolynomial

(poly=Factor[Table[GraphData[{"Grid",{n,n,n}},"CliquePolynomial"],{n,k0=1,kmax=10}]/.f_Function:>f[x]])//Column

FindSequenceFunction[Coefficient[poly,x],n]//Factor

FindSequenceFunction[Coefficient[poly,x,2],n]//Factor

poly2=Table[Piecewise[{{(1+2 x) (1+6 x),n==2}},1+(n^3)x+3(n^2)(n-1)(x^2)],{n,k0,kmax}]

FullSimplify[poly-poly2]

ComplementOddChordlessCycleCount

seq=Table[GraphData[{"Grid",{n,n,n}},"ComplementOddChordlessCycleCount"],{n,10}]

FindSequenceFunction[Take[seq,{3,5}],n]

ConnectedComponentCount

seq=Table[GraphData[{"Grid",{n,n,n}},"ConnectedComponentCount"],{n,10}]

ConnectedDominatingSetCount

seq=Table[GraphData[{"Grid",{n,n,n}},"ConnectedDominatingSetCount"],{n,10}]

FindSequenceFunction[seq,n]

ConnectedDominationNumber

seq=Table[GraphData[{"Grid",{n,n,n}},"ConnectedDominationNumber"],{n,10}]

FindSequenceFunction[seq,n]

ConnectedDominationPolynomial

(poly=Factor[Table[GraphData[{"Grid",{n,n,n}},"ConnectedDominationPolynomial"][x],{n,k0=1,kmax=10}]/.f_Function:>f[x]])//Column

coef=Factor/@FindLinearRecurrence[poly]

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,k0,kmax}]

FullSimplify[poly2-poly]

ConnectedInducedSubgraphCount

A289743

seq=Table[GraphData[{"Grid",{n,n,n}},"ConnectedInducedSubgraphCount"],{n,6}]

FindSequenceFunction[DeleteMissing[seq],n]

ConnectedInducedSubgraphPolynomial

(poly=Factor[Table[GraphData[{"Grid",{n,n,n}},"ConnectedInducedSubgraphPolynomial"],{n,k0=1,kmax=10}]/.f_Function:>f[x]])//Column

coef=Factor/@FindLinearRecurrence[poly]

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,6}]

FullSimplify[poly2-poly]

CrossingNumber

seq=Table[GraphData[{"Grid",{n,n,n}},"CrossingNumber"],{n,10}]

CycleCount

A234620

seq=Table[GraphData[{"Grid",{n,n,n}},"CycleCount"],{n,10}]

CyclePolynomial

(poly=Factor[Table[GraphData[{"Grid",{n,n,n}},"CyclePolynomial"],{n,k0=1,kmax=10}]/.f_Function:>f[x]])//Column

coef=Factor/@FindLinearRecurrence[poly]

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,k0,kmax}]

FullSimplify[poly2-poly]

Cyclic

Table[GraphData[{"Grid",{n,n,n}},"Cyclic"],{n,10}]

CyclomaticNumber

seq=Table[GraphData[{"Grid",{n,n,n}},"CyclomaticNumber"],{n,10}]

FindSequenceFunction[seq,n]//Factor

DetourIndex

seq=Table[GraphData[{"Grid",{n,n,n}},"DetourIndex"],{n,10}]

DetourMatrix

MatrixForm/@Table[GraphData[{"Grid",{n,n,n}},"DetourMatrix"],{n,5}]

MatrixForm/@Table[SparseArray[{i_,j_}:>Abs[i-j],n],{n,10}]

DetourPolynomial

(poly=Factor[Table[GraphData[{"Grid",{n,n,n}},"DetourPolynomial"],{n,k0=1,kmax=10}]/.f_Function:>f[x]])//Column

coef=Factor/@FindLinearRecurrence[poly]

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,k0,kmax}]

FullSimplify[poly2-poly]

Diameter

seq=Table[GraphData[{"Grid",{n,n,n}},"Diameter"],{n,10}]

FindSequenceFunction[seq,n]

DistanceMatrix

MatrixForm/@Table[GraphData[{"Grid",{n,n,n}},"DistanceMatrix"],{n,10}]

MatrixForm/@Table[SparseArray[{i_,j_}:>Abs[i-j],n],{n,10}]

DistancePolynomial

(poly=Factor[Table[GraphData[{"Grid",{n,n,n}},"DistancePolynomial"],{n,k0=1,kmax=10}]/.f_Function:>f[x]])//Column

coef=Factor/@FindLinearRecurrence[poly]

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,k0,kmax}]

FullSimplify[poly2-poly]

DistinguishingNumber

seq=Table[GraphData[{"Grid",{n,n,n}},"DistinguishingNumber"],{n,10}]

DomaticNumber

seq=Table[GraphData[{"Grid",{n,n,n}},"DomaticNumber"],{n,10}]

DominatingSetCount

seq=Table[GraphData[{"Grid",{n,n,n}},"DominatingSetCount"],{n,10}]

DominationNumber

A269706

seq=Table[GraphData[{"Grid",{n,n,n}},"DominationNumber"],{n,10}]

FindLinearRecurrence[DeleteMissing[seq]]

FindSequenceFunction[DeleteMissing[seq],n]

gf=x FindGeneratingFunction[DeleteMissing[seq],x]

DominationPolynomial

(poly=Factor[Table[GraphData[{"Grid",{n,n,n}},"DominationPolynomial"],{n,k0=1,kmax=10}]/.f_Function:>f[x]])//Column

coef=Factor/@FindLinearRecurrence[poly]

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,k0,kmax}]

FullSimplify[poly2-poly]

EdgeChromaticNumber

seq=Table[GraphData[{"Grid",{n,n,n}},"EdgeChromaticNumber"],{n,10}]

EdgeConnectivity

Table[GraphData[{"Grid",{n,n,n}},"EdgeConnectivity"],{n,10}]

EdgeCount

seq=Table[GraphData[{"Grid",{n,n,n}},"EdgeCount"],{n,10}]

FindSequenceFunction[seq,n]

EdgeCoverCount

seq=Table[GraphData[{"Grid",{n,n,n}},"EdgeCoverCount"],{n,10}]

EdgeCoverNumber

seq=Table[GraphData[{"Grid",{n,n,n}},"EdgeCoverNumber"],{n,10}]

FindSequenceFunction[seq,n]

gf=(x^2) FindGeneratingFunction[Rest@seq,x]

Table[Piecewise[{{0,n==1}},Ceiling[n^3/2]],{n,10}]

EdgeCoverPolynomial

(poly=Factor[Table[GraphData[{"Grid",{n,n,n}},"EdgeCoverPolynomial"],{n,k0=1,kmax=10}]/.f_Function:>f[x]])//Column

coef=Factor/@FindLinearRecurrence[poly]

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,k0,kmax}]

FullSimplify[poly2-poly]

EulerianCycleCount

seq=Table[GraphData[{"Grid",{n,n,n}},"EulerianCycleCount"],{n,10}]

FaceCount

seq=Table[GraphData[{"Grid",{n,n,n}},"FaceCount"],{n,10}]

FibonacciCube

Entity["Graph",{"Grid",{n,n,n}}]["FibonacciCube"]

seq=Table[GraphData[{"Grid",{n,n,n}},"FibonacciCube"],{n,10}]

FlowPolynomial

(poly=Factor[Table[GraphData[{"Grid",{n,n,n}},"FlowPolynomial"],{n,k0=1,kmax=10}]/.f_Function:>f[x]])//Column

coef=Factor/@FindLinearRecurrence[poly]

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,k0,kmax}]

FullSimplify[poly2-poly]

FractionalChromaticNumber

seq=Table[GraphData[{"Grid",{n,n,n}},"FractionalChromaticNumber"],{n,10}]

FractionalEdgeChromaticNumber

seq=Table[GraphData[{"Grid",{n,n,n}},"FractionalEdgeChromaticNumber"],{n,10}]

Girth

seq=Table[GraphData[{"Grid",{n,n,n}},"Girth"],{n,10}]

Gonality

seq=Table[GraphData[{"Grid",{n,n,n}},"Gonality"],{n,10}]

HamiltonConnected

seq=Table[GraphData[{"Grid",{n,n,n}},"HamiltonConnected"],{n,10}]

HamiltonDecompositionCount

seq=Table[GraphData[{"Grid",{n,n,n}},"HamiltonDecompositionCount"],{n,10}]

Hamiltonian

Table[GraphData[{"Grid",{n,n,n}},"Hamiltonian"],{n,10}]

HamiltonianCycleCount

seq=Table[GraphData[{"Grid",{n,n,n}},"HamiltonianCycleCount"],{n,10}]

HamiltonianNumber

seq=Table[GraphData[{"Grid",{n,n,n}},"HamiltonianNumber"],{n,10}]

HamiltonianPathCount

A193346(n)/2

seq=Table[GraphData[{"Grid",{n,n,n}},"HamiltonianPathCount"],{n,10}]

2{0,72,2480304,27746717207772000}

HamiltonianWalkCount

seq=Table[GraphData[{"Grid",{n,n,n}},"HamiltonianWalkCount"],{n,10}]

HararyIndex

seq=Table[GraphData[{"Grid",{n,n,n}},"HararyIndex"],{n,10}]

FindSequenceFunction[seq,n]

FindGeneratingFunction[seq,x]

HexagonCount

seq=Table[GraphData[{"Grid",{n,n,n}},"HexagonCount"],{n,10}]

FindSequenceFunction[seq,n]//Factor

IdiosyncraticPolynomial

(poly=Factor[Table[GraphData[{"Grid",{n,n,n}},"IdiosyncraticPolynomial"],{n,k0=1,kmax=10}]/.f_Function:>f[x,y]])//Column

coef=Factor/@FindLinearRecurrence[DeleteMissing@poly]

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,k0,kmax}]

FullSimplify[poly2-poly]

IndependenceNumber

seq=Table[GraphData[{"Grid",{n,n,n}},"IndependenceNumber"],{n,10}]

FindSequenceFunction[seq,n]

Table[Ceiling[(n^3)/2],{n,10}]

IndependencePolynomial

(poly=Factor[Table[GraphData[{"Grid",{n,n,n}},"IndependencePolynomial"],{n,k0=1,kmax=10}]/.f_Function:>f[x]])//Column

CoefficientList[Take[poly,4],x]

coef=Factor/@FindLinearRecurrence[DeleteMissing@poly]

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,k0,kmax}]

FullSimplify[poly2-poly]

IndependenceRatio

seq=Table[GraphData[{"Grid",{n,n,n}},"IndependenceRatio"],{n,10}]

FindSequenceFunction[seq,n]

Table[Ceiling[(n^3)/2]/(n^3),{n,10}]

FullSimplify[Ceiling[(n^3)/2]/(n^3),Mod[n,2]==#]&/@{0,1}

Table[Piecewise[{{1/2,Mod[n,2]==0},{((n^3+1)/(2(n^3))),Mod[n,2]==1}}],{n,10}]

Table[Piecewise[{{1/2,Mod[n,2]==0},{(1/2)+(1/(2(n^3))),Mod[n,2]==1}}],{n,10}]

IndependentEdgeSetCount

A033535

seq=Table[GraphData[{"Grid",{n,n,n}},"IndependentEdgeSetCount"],{n,10}]

FindLinearRecurrence[DeleteMissing[seq]]

FindSequenceFunction[DeleteMissing[seq],n]

gf=x FindGeneratingFunction[DeleteMissing[seq],x]

IndependentVertexSetCount

A292702

seq=Table[GraphData[{"Grid",{n,n,n}},"IndependentVertexSetCount"],{n,10}]

FindSequenceFunction[DeleteMissing@seq,n]

IntersectionNumber

seq=Table[GraphData[{"Grid",{n,n,n}},"IntersectionNumber"],{n,10}]

KirchhoffIndex

seq=Table[GraphData[{"Grid",{n,n,n}},"KirchhoffIndex"],{n,10}]

FindSequenceFunction[seq,n]

KirchhoffSumIndex

seq=Table[GraphData[{"Grid",{n,n,n}},"KirchhoffSumIndex"],{n,10}]

FindSequenceFunction[seq,n]

LaplacianMatrix

MatrixForm/@Table[GraphData[{"Grid",{n,n,n}},"LaplacianMatrix"],{n,10}]

LaplacianPolynomial

(poly=Factor[Table[GraphData[{"Grid",{n,n,n}},"LaplacianPolynomial"],{n,k0=1,kmax=10}]/.f_Function:>f[x]])//Column

coef=Factor/@FindLinearRecurrence[poly]

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,k0,kmax}]

FullSimplify[poly2-poly]

LeafCount

seq=Table[GraphData[{"Grid",{n,n,n}},"LeafCount"],{n,10}]

LongestCycleCount

seq=Table[GraphData[{"Grid",{n,n,n}},"LongestCycleCount"],{n,10}]

LovaszNumber

seq=Table[GraphData[{"Grid",{n,n,n}},"LovaszNumber"],{n,10}]

LucasCube

Entity["Graph",{"Grid",{n,n,n}}]["LucasCube"]

seq=Table[GraphData[{"Grid",{n,n,n}},"LucasCube"],{n,10}]

MatchingGeneratingPolynomial

(poly=Factor[Table[GraphData[{"Grid",{n,n,n}},"MatchingGeneratingPolynomial"],{n,k0=1,kmax=10}]/.f_Function:>f[x]])//Column

CoefficientList[Take[poly,3],x]

coef=Factor/@FindLinearRecurrence[poly]

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,k0,kmax}]

FullSimplify[poly2-poly]

MatchingNumber

seq=Table[GraphData[{"Grid",{n,n,n}},"MatchingNumber"],{n,10}]

FindSequenceFunction[seq,n]

Table[Floor[(n^3)/2],{n,10}]

MatchingPolynomial

(poly=Factor[Table[GraphData[{"Grid",{n,n,n}},"MatchingPolynomial"],{n,k0=1,kmax=10}]/.f_Function:>f[x]])//Column

coef=Factor/@FindLinearRecurrence[poly]

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,k0,kmax}]

FullSimplify[poly2-poly]

MaximalCliqueCount

seq=Table[GraphData[{"Grid",{n,n,n}},"MaximalCliqueCount"],{n,10}]

FindSequenceFunction[seq,n]

gf=x FindGeneratingFunction[seq,x]

FullSimplify[SeriesCoefficient[gf,{x,0,n}],n>0]

MaximalIndependentEdgeSetCount

seq=Table[GraphData[{"Grid",{n,n,n}},"MaximalIndependentEdgeSetCount"],{n,10}]

MaximalIndependentVertexSetCount

seq=Table[GraphData[{"Grid",{n,n,n}},"MaximalIndependentVertexSetCount"],{n,10}]

MaximumCliqueCount

seq=Table[GraphData[{"Grid",{n,n,n}},"MaximumCliqueCount"],{n,10}]

FindSequenceFunction[seq,n]

gf=x FindGeneratingFunction[seq,x]

Simplify[SeriesCoefficient[gf,{x,0,n}],n>0]

MaximumIndependentEdgeSetCount

seq=Table[GraphData[{"Grid",{n,n,n}},"MaximumIndependentEdgeSetCount"],{n,10}]

MaximumIndependentVertexSetCount

Probably 1, 2, 1, 2,

seq=Table[GraphData[{"Grid",{n,n,n}},"MaximumIndependentVertexSetCount"],{n,10}]

Do[Print[{n,FindIndependentVertexSet[GridGraph[{n,n,n}],{Ceiling[(n^3)/2]},All]//Timing}],{n,5}]

MaximumLeafNumber

seq=Table[GraphData[{"Grid",{n,n,n}},"MaximumLeafNumber"],{n,10}]

MaximumVertexDegree

seq=Table[GraphData[{"Grid",{n,n,n}},"MaximumVertexDegree"],{n,10}]

MeanDistance

seq=Table[GraphData[{"Grid",{n,n,n}},"MeanDistance"],{n,10}]

FindSequenceFunction[seq,n]

MinimalDominatingSetCount

seq=Table[GraphData[{"Grid",{n,n,n}},"MinimalDominatingSetCount"],{n,10}]

MinimumCliqueCoveringCount

seq=Table[GraphData[{"Grid",{n,n,n}},"MinimumCliqueCoveringCount"],{n,10}]

MinimumConnectedDominatingSetCount

seq=Table[GraphData[{"Grid",{n,n,n}},"MinimumConnectedDominatingSetCount"],{n,10}]

FindSequenceFunction[seq,n]

MinimumDistinguishingLabelingCount

seq=Table[GraphData[{"Grid",{n,n,n}},"MinimumDistinguishingLabelingCount"],{n,10}]

MinimumDominatingSetCount

seq=Table[GraphData[{"Grid",{n,n,n}},"MinimumDominatingSetCount"],{n,10}]

MinimumEdgeCoverCount

seq=Table[GraphData[{"Grid",{n,n,n}},"MinimumEdgeCoverCount"],{n,10}]

MinimumVertexDegree

seq=Table[GraphData[{"Grid",{n,n,n}},"MinimumVertexDegree"],{n,10}]

MolecularTopologicalIndex

seq=Table[GraphData[{"Grid",{n,n,n}},"MolecularTopologicalIndex"],{n,10}]

seq=Table[MolecularTopologicalIndex[GridGraph[{n,n,n}]],{n,20}]

FindLinearRecurrence[Rest@seq]

FindSequenceFunction[Rest@seq,n]//Factor

Nonhamiltonian

Table[GraphData[{"Grid",{n,n,n}},"Nonhamiltonian"],{n,10}]

NormalizedLaplacianMatrix

MatrixForm/@Table[GraphData[{"Grid",{n,n,n}},"NormalizedLaplacianMatrix"],{n,10}]

OddChordlessCycleCount

seq=Table[GraphData[{"Grid",{n,n,n}},"OddChordlessCycleCount"],{n,10}]

PathCount

A292139

seq=Table[GraphData[{"Grid",{n,n,n}},"PathCount"],{n,10}]

PathPolynomial

(poly=DeleteMissing@Factor[Table[GraphData[{"Grid",{n,n,n}},"PathPolynomial"],{n,k0=1,kmax=10}]/.f_Function:>f[x]])//Column

CoefficientList[Take[poly,UpTo[4]],x]//Column

coef=Factor/@FindLinearRecurrence[DeleteMissing@poly]

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,k0,kmax}]

FullSimplify[poly2-poly]

Pell

Entity["Graph",{"Grid",{n,n,n}}]["Pell"]

seq=Table[GraphData[{"Grid",{n,n,n}},"Pell"],{n,10}]

PentagonCount

seq=Table[GraphData[{"Grid",{n,n,n}},"PentagonCount"],{n,10}]

Perfect

Table[GraphData[{"Grid",{n,n,n}},"Perfect"],{n,10}]

ProjectivePlaneCrossingNumber

seq=Table[GraphData[{"Grid",{n,n,n}},"ProjectivePlaneCrossingNumber"],{n,10}]

Radius

seq=Table[GraphData[{"Grid",{n,n,n}},"Radius"],{n,10}]

Do[Print[{n,GraphRadius[GridGraph[{n,n,n}]]//Timing}],{n,20}];

FindSequenceFunction[seq,n]//FullSimplify

Table[(6n+3(-1)^n-3)/4,{n,10}]

Table[3Ceiling[(n-1)/2],{n,20}]

Table[3Floor[n/2],{n,20}]

RankPolynomial

(poly=Factor[Table[GraphData[{"Grid",{n,n,n}},"RankPolynomial"],{n,k0=1,kmax=10}]/.f_Function:>f[x,y]])//Column

coef=Factor/@FindLinearRecurrence[poly]

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,k0,kmax}]

FullSimplify[poly2-poly]

RectilinearCrossingNumber

seq=Table[GraphData[{"Grid",{n,n,n}},"RectilinearCrossingNumber"],{n,10}]

ReliabilityPolynomial

(poly=Factor[Table[GraphData[{"Grid",{n,n,n}},"ReliabilityPolynomial"],{n,k0=1,kmax=10}]/.f_Function:>f[x]])//Column

coef=Factor/@FindLinearRecurrence[poly]

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,k0,kmax}]

FullSimplify[poly2-poly]

SigmaPolynomial

(poly=Factor[Table[GraphData[{"Grid",{n,n,n}},"SigmaPolynomial"],{n,k0=1,kmax=10}]/.f_Function:>f[x]])//Column

coef=Factor/@FindLinearRecurrence[poly]

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,k0,kmax}]

FullSimplify[poly2-poly]

SpanningTreeCount

A071763

seq=Table[GraphData[{"Grid",{n,n,n}},"SpanningTreeCount"],{n,5}]

Table[2^(n^3-1)/n^3 Product[Piecewise[{{1,i==j==k==0}},3-Cos[Pi i/n]-Cos[Pi j/n]-Cos[Pi k/n]],{i,0,n-1},{j,0,n-1},{k,0,n-1}],{n,12}]//Round

SquareCount

seq=Table[GraphData[{"Grid",{n,n,n}},"SquareCount"],{n,10}]

FindSequenceFunction[seq,n]//Factor

StabilityIndex

seq=Table[GraphData[{"Grid",{n,n,n}},"StabilityIndex"],{n,10}]

TopologicalIndex

seq=Table[GraphData[{"Grid",{n,n,n}},"TopologicalIndex"],{n,10}]

ToroidalCrossingNumber

seq=Table[GraphData[{"Grid",{n,n,n}},"ToroidalCrossingNumber"],{n,10}]

Traceable

Table[GraphData[{"Grid",{n,n,n}},"Traceable"],{n,10}]

TriangleCount

seq=Table[GraphData[{"Grid",{n,n,n}},"TriangleCount"],{n,10}]

TuttePolynomial

(poly=Factor[Table[GraphData[{"Grid",{n,n,n}},"TuttePolynomial"],{n,k0=1,kmax=10}]/.f_Function:>f[x,y]])//Column

coef=Factor/@FindLinearRecurrence[poly]

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,k0,kmax}]

FullSimplify[poly2-poly]

Untraceable

Table[GraphData[{"Grid",{n,n,n}},"Untraceable"],{n,10}]

VertexConnectivity

Table[GraphData[{"Grid",{n,n,n}},"VertexConnectivity"],{n,10}]

VertexCount

seq=Table[GraphData[{"Grid",{n,n,n}},"VertexCount"],{n,10}]

FindSequenceFunction[seq,n]

VertexCoverNumber

Related to but not the same as IndependenceNumber

seq=Table[GraphData[{"Grid",{n,n,n}},"VertexCoverNumber"],{n,10}]

FindSequenceFunction[seq,n]

Table[Floor[(n^3)/2],{n,10}]

VertexCoverPolynomial

(poly=Factor[Table[GraphData[{"Grid",{n,n,n}},"VertexCoverPolynomial"],{n,k0=1,kmax=10}]/.f_Function:>f[x]])//Column

coef=Factor/@FindLinearRecurrence[DeleteMissing@poly]

ToPolynomialRecurrence[p,x,n,coef]

FormattedPolynomialRecurrence[p,x,n,coef]//TraditionalForm

TeXForm[%]

LinearRecurrence[coef,poly,{2-k0,Length[coef]-k0+1}]

FullSimplify[RSolve[Prepend[Table[p[k+k0-1,x]==poly[[k]],{k,Length[coef]}],ToPolynomialRecurrence[p,x,n,coef]],p[n,x],n],n∈Integers&&n>0]

gf=Factor[(z^k0)FindGeneratingFunction[poly,z]]

FullSimplify[SeriesCoefficient[gf,{z,0,n}],n>0]

poly2=Table[XXX,{n,k0,kmax}]

FullSimplify[poly2-poly]

VertexDegrees

seq=Table[GraphData[{"Grid",{n,n,n}},"VertexDegrees"],{n,10}]

VertexTransitive

Table[GraphData[{"Grid",{n,n,n}},"VertexTransitive"],{n,10}]

WienerIndex

A292045

seq=Table[GraphData[{"Grid",{n,n,n}},"WienerIndex"],{n,10}]

FindSequenceFunction[seq,n]//Factor

seq=Table[(n-1)(n+1)(n^5)/2,{n,30}]

coef=FindLinearRecurrence[seq]

Take[seq,Length@coef]

LinearRecurrence[{8,-28,56,-70,56,-28,8,-1},{0,48,972,7680,37500,136080,403368,1032192},20]

gf=x FindGeneratingFunction[seq,x]

CoefficientList[Series[((12 x (4+49 x+104 (x^2)+49 (x^3)+4 (x^4)))/(((-1+x))^8)),{x,0,20}],x]

WienerSumIndex

seq=Table[GraphData[{"Grid",{n,n,n}},"WienerSumIndex"],{n,10}]

FindSequenceFunction[DeleteMissing@seq,n]

Properties any

Classes

Intersection@@(GraphData[#,"Classes"]&/@GraphData["Grid"])

EdgeCount

https://stash.wolfram.com/projects/KERN/repos/kernel/browse/StartUp/Network/GraphConstructors.m#175

r[k]/.RSolve[r[k]==(r[k-1]) f[k]+(f[k]-1) Product[f[i],{i,k-1}]&&r[2]==(f[1]-1) f[2]+f[1] (f[2]-1),r[k],k]

EdgeCountFormula[f_]:=Module[{i},Simplify[Product[f[[1+K[1]]],{K[1],1,-1+Length[f]}]*Sum[((-1+f[[1+K[2]]])*Product[f[[i]],{i,K[2]}])/Product[f[[1+K[1]]],{K[1],1,K[2]}],{K[2],0,-1+Length[f]}]]
]

Product[Subscript[f,i+1],{i,1,n-1}]Sum[((Subscript[f,j+1]-1)Product[Subscript[f,i],{i,j}])/Product[Subscript[f,i+1],{i,1,j}],{j,0,n-1}]//TraditionalForm

With[{f={a,b,c}},Product[Subscript[f,i+1],{i,1,Length[f]-1}]Sum[((Subscript[f,j+1]-1)Product[Subscript[f,i],{i,j}])/Product[Subscript[f,i+1],{i,1,j}],{j,0,Length[f]-1}]/.Subscript:>Part]//Expand

EdgeCountFormula2[f_]:=Times@@Rest[f]Sum[(f[[j+1]]-1)Times@@Take[f,j]/Times@@Take[f,{2,j+1}],{j,0,Length[f]-1}]

EdgeCountFormula2[f_]:=Times@@Rest[f]Sum[(f[[j]]-1)Times@@Take[f,j-1]/Times@@Take[f,{2,j}],{j,1,Length[f]}]

EdgeCountFormula2[f_]:=Times@@Rest[f]Total[MapIndexed[(#-1)Times@@Take[f,#2[[1]]-1]/Times@@Take[f,{2,#2[[1]]}]&,f]]

inds=Reverse[NestList[Most,{i,j,k,l,m},4]];

e1=Expand[EdgeCount[GridGraph[#]]]&/@inds

e2=Expand[EdgeCountFormula[#]]&/@inds

e3=Expand[EdgeCountFormula2[#]]&/@inds

e1===e2===e3

FibonacciCube

Entity["Graph",{"Grid",{i,j,k,l}}]["FibonacciCube"]

GraphData[{"FibonacciCube","Grid"}]

LucasCube

Entity["Graph",{"Grid",{i,j,k,l}}]["LucasCube"]

GraphData[{"LucasCube","Grid"}]

Pell

Entity["Graph",{"Grid",{i,j,k,l}}]["Pell"]

GraphData[{"Pell","Grid"}]

Embeddings

<<MathWorld`Graphs`

{"Grid", {2, 2, n}} planar

PlanarGridEmbedding[2,2,m_]:=Module[{n},
ChangeVertices[GridGraph[2,2,m],Flatten[{#1,#2,#4,#3}&@@@Partition[Table[2Floor[(n+3)/4]Through[{Cos,Sin}[(Mod[n-1,4]+1)π/2-π/4]],{n,4m}],4],1]]
]

graphs=Table[PlanarGridEmbedding[2,2,n],{n,3,5}];

ShowLabeledGraph/@graphs

Vertices/@graphs

Faces/@graphs

{"Grid", {2, 2, 3}}

GraphData[{"Grid",{2,2,3}},"StandardName"]

All

GraphData[{"Grid",{2,2,3}},"Graph","All"]//StyleGraphs

Planar

GraphData[{"Grid",{2,2,3}},"Planar"]

GraphData[{"Grid",{2,2,3}},"Graph","Planar"]//StyleGraphs

MinimalCrossing

GraphData[{"Grid",{2,2,3}},{"RCN","CN"}]

GraphData[{"Grid",{2,2,3}},"Graph","MinimalCrossing"]//StyleGraphs

MinimalCrossing construction

GraphPlot@RotateGraph[MinimalCrossingGraph[GraphData[{"Grid",{2,2,3}}],"CrossingNumber"->-1]]

v={};
g=Graph[Range[Length[v]],UndirectedEdge@@@{},VertexCoordinates->v,VertexLabels->Automatic]

RecognizeGraph[g]

RectilinearCrossingCount[g]

Tutte embeddings

<<IGraphM`

faces=ReverseSort@SymmetricallyDistinctFaces[GraphData[{"Grid",{2,2,3}}]]

Tally[ReverseSort[Length/@faces]]

IGLayoutTutte[GraphData[{"Grid",{2,2,3}}],"OuterFace"->#]&/@faces

gs=Annotate[#,{VertexLabels->None,ImageSize->Tiny}]&/@{}

Tutte embedding construction 4 #2

GraphPlot[RotateGraph[,-Pi/2]]

v=Join[{{0,0},{1,0},{1,1},{0,1}},Flatten[Table[{i/3,j/5},{i,2},{j,4}],1]];
g=Graph[Range[Length[v]],UndirectedEdge@@@{e[1,2,3,4,1,5,9,2],e[5,6,7,8,4,6,10,3,12,11,10,9],{8,12},{7,11}},VertexCoordinates->v,VertexLabels->Automatic]

RecognizeGraph[g]

Halin

GraphData[{"Grid",{2,2,3}},"Graph","Halin"]//StyleGraphs

LCF

GraphData[{"Grid",{2,2,3}},"LCFSignature"]

GraphData[{"Grid",{2,2,3}},"Graph","LCF"]//StyleGraphs

UnitDistance

GraphData[{"Grid",{2,2,3}},"UnitDistance"]

UnitDistanceGraphQ[GraphData[{"Grid",{2,2,3}}],Debug->True]//Timing

GraphData[{"Grid",{2,2,3}},"Graph","UnitDistance"]//StyleGraphs

Select[%,!FreeQ[GraphEmbedding[#],_?InexactNumberQ]&]

Select[UnitDistanceEmbeddingRefine/@Complement@@(GraphData[{"Grid",{2,2,3}},"Graph",#]&/@{"All","UnitDistance"}),UnitDistanceGraphEmbeddingQ]

FindUnitDistanceEmbedding[GraphData[{"Grid",{2,2,3}}],MaxIterations->5000,"ReturnWithMessage"->True]//Timing

UnitDistance FindSubgraphUnitDistanceEmbedding

{{"Grid",{2,2,3}},l=FindSubgraphUnitDistanceEmbedding[GraphData[{"Grid",{2,2,3}}],TimeConstraint->300,"Results"->All]//Timing}

gs=UniqueEmbeddings[l]

gs={,,,,,,,,};

Matchstick

GraphData[{"Grid",{2,2,3}},"Graph","Matchstick"]//StyleGraphs

Default embedding

GraphPlot@GraphData[{"Grid",{2,2,3}},"Edges"]

v={};
g=Graph[Range[Length[v]],UndirectedEdge@@@{},VertexCoordinates->v,VertexLabels->Automatic]

RecognizeGraph[g]

3D default

Graph3D[GraphData[{"Grid",{2,2,3}},"Edges"]]

3D All

GraphData[{"Grid",{2,2,3}},"Graph",{"3D","All"}]

3D UnitDistance

GraphData[{"Grid",{2,2,3}},"Graph",{"3D","UnitDistance"}]

3D Polyhedron

GraphData[{"Grid",{2,2,3}},"Graph",{"3D","Polyhedron"}]

Graphics3D[{FaceForm[Green,Red],GraphData[{"Grid",{2,2,3}},"Polyhedron"]}]

3D Canonical

GraphData[{"Grid",{2,2,3}},"Graph",{"3D","Canonical"}]

Graphics3D[{Opacity[.5],Red,GraphData[{"Grid",{2,2,3}},"Polyhedron"],Yellow,Sphere[]}]

3D Canonical construction

Graphics3D[{FaceForm[Green,Red],poly=GraphPolyhedron[GraphData[{"Grid",{2,2,3}}],1]}]

(can=FindCanonicalPolyhedron[poly,WorkingPrecision->100,MaxIterations->50000,PrecisionGoal->20,"ProgressInterval"->500,"TangentFactor"->1/10,"PlanarFactor"->1/10,Debug->True])//Timing

SimplePolyhedronQ[can]

If[%===False,Quit[]]

Graphics3D[{Opacity[.5],Red,can,Yellow,Sphere[]}]

(lens=Mean/@Split[Sort[PolyhedronEdgeLengths[can]],Abs[#1-#2]<1.*^-10&])//N

v=PolyhedronCoordinates[can];

colors=With[{n=Length[lens]},Table[Hue[i/n],{i,0,n-1}]]

Graphics3D[{Thick,Sequence@@Nearest[Thread[lens->colors],EuclideanDistance@@v[[#]]],Line[v[[#]]]}&/@PolyhedronEdges[can],Boxed->False]

g=PolyhedronGraph[can]

{"Grid", {2, 2, 4}}

GraphData[{"Grid",{2,2,4}},"StandardName"]

Primary

GraphData[{"Grid",{2,2,4}}]//StyleGraphs[#,ImageSize->Small]&

All

GraphData[{"Grid",{2,2,4}},"Graph","All"]//StyleGraphs

Planar

GraphData[{"Grid",{2,2,4}},"Planar"]

GraphData[{"Grid",{2,2,4}},"Graph","Planar"]//StyleGraphs

MinimalCrossing

GraphData[{"Grid",{2,2,4}},{"RCN","CN"}]

GraphData[{"Grid",{2,2,4}},"Graph","MinimalCrossing"]//StyleGraphs

MinimalCrossing construction

GraphPlot@RotateGraph[MinimalCrossingGraph[GraphData[{"Grid",{2,2,4}}],"CrossingNumber"->-1]]

v={};
g=Graph[Range[Length[v]],UndirectedEdge@@@{},VertexCoordinates->v,VertexLabels->Automatic]

RecognizeGraph[g]

RectilinearCrossingCount[g]

Tutte embeddings

faces=ReverseSort@SymmetricallyDistinctFaces[GraphData[{"Grid",{2,2,4}}]]

Tally[ReverseSort[Length/@faces]]

IGLayoutTutte[GraphData[{"Grid",{2,2,4}}],"OuterFace"->#]&/@faces

gs=Annotate[#,{VertexLabels->None,ImageSize->Tiny}]&/@{,}

Tutte embedding construction 4 #1

GraphPlot[RotateGraph[]]

v={};
g=Graph[Range[Length[v]],UndirectedEdge@@@{},VertexCoordinates->v,VertexLabels->Automatic]

RecognizeGraph[g]

Tutte embedding construction 4 #2

GraphPlot[RotateGraph[]]

Clear[e]

e[l__]:=Sequence@@Partition[{l},2,1]

v=Join[{{0,0},{1,0},{0,1},{1,1}},Flatten[Table[{i/7,j/3},{j,2},{i,6}],1]];
g=Graph[Range[Length[v]],UndirectedEdge@@@{e[1,2,4,3,1,5,6,7,8,9,10,16,15,14,13,12,11,5],e[11,3,13,7,1],e[16,4,14,8,2,10],{6,12},{9,15}},VertexCoordinates->v,VertexLabels->Automatic]

RecognizeGraph[g]

Tutte embedding construction 4 #3

GraphPlot[RotateGraph[,-Pi/2]]

v={{0,0},{1,0},{1,1},{0,1},{1/3,1/5},{2/3,1/5},{1/3,2/5},{2/3,2/5},{1/3,3/5},{2/3,3/5},{1/3,4/5},{2/3,4/5},{1/3+1/9,3/5+1/15},{1/3+2/9,3/5+1/15},{1/3+1/9,3/5+2/15},{1/3+2/9,3/5+2/15}};
g=Graph[Range[Length[v]],UndirectedEdge@@@{e[1,2,3,4,1,5,6,2],e[7,4,11,12,3,8,7],e[5,7,9,11,15,16,14,10,8,6],e[10,12,16],e[15,13,14],e[10,9,13]},VertexCoordinates->v,VertexLabels->Automatic]

RecognizeGraph[g]

Halin

GraphData[{"Grid",{2,2,4}},"Graph","Halin"]//StyleGraphs

LCF

GraphData[{"Grid",{2,2,4}},"LCFSignature"]

GraphData[{"Grid",{2,2,4}},"Graph","LCF"]//StyleGraphs

UnitDistance

GraphData[{"Grid",{2,2,4}},"UnitDistance"]

UnitDistanceGraphQ[GraphData[{"Grid",{2,2,4}}],Debug->True]//Timing

GraphData[{"Grid",{2,2,4}},"Graph","UnitDistance"]//StyleGraphs

Select[%,!FreeQ[GraphEmbedding[#],_?InexactNumberQ]&]

Select[UnitDistanceEmbeddingRefine/@Complement@@(GraphData[{"Grid",{2,2,4}},"Graph",#]&/@{"All","UnitDistance"}),UnitDistanceGraphEmbeddingQ]

FindUnitDistanceEmbedding[GraphData[{"Grid",{2,2,4}}],MaxIterations->5000,"ReturnWithMessage"->True]//Timing

UnitDistance FindSubgraphUnitDistanceEmbedding

{{"Grid",{2,2,4}},l=FindSubgraphUnitDistanceEmbedding[GraphData[{"Grid",{2,2,4}}],TimeConstraint->300,"Results"->All]//Timing}

gs=UniqueEmbeddings[l]

gs={,,,,,,,,};

Matchstick

GraphData[{"Grid",{2,2,4}},"Graph","Matchstick"]//StyleGraphs

Default embedding

GraphPlot@GraphData[{"Grid",{2,2,4}},"Edges"]

v={};
g=Graph[Range[Length[v]],UndirectedEdge@@@{},VertexCoordinates->v,VertexLabels->Automatic]

RecognizeGraph[g]

3D default

Graph3D[GraphData[{"Grid",{2,2,4}},"Edges"]]

3D All

GraphData[{"Grid",{2,2,4}},"Graph",{"3D","All"}]

3D UnitDistance

GraphData[{"Grid",{2,2,4}},"Graph",{"3D","UnitDistance"}]

3D Polyhedron

GraphData[{"Grid",{2,2,4}},"Graph",{"3D","Polyhedron"}]

Graphics3D[{FaceForm[Green,Red],GraphData[{"Grid",{2,2,4}},"Polyhedron"]}]

3D Canonical

GraphData[{"Grid",{2,2,4}},"Graph",{"3D","Canonical"}]

Graphics3D[{Opacity[.5],Red,GraphData[{"Grid",{2,2,4}},"Polyhedron"],Yellow,Sphere[]}]

3D Canonical construction

Graphics3D[{FaceForm[Green,Red],poly=GraphPolyhedron[GraphData[{"Grid",{2,2,4}}],1]}]

(can=FindCanonicalPolyhedron[poly,WorkingPrecision->100,MaxIterations->50000,PrecisionGoal->20,"ProgressInterval"->500,"TangentFactor"->1/10,"PlanarFactor"->1/10,Debug->True])//Timing

SimplePolyhedronQ[can]

Graphics3D[{Opacity[.5],Red,can,Yellow,Sphere[]}]

(lens=Mean/@Split[Sort[PolyhedronEdgeLengths[can]],Abs[#1-#2]<1.*^-10&])//N

v=PolyhedronCoordinates[can];

colors=With[{n=Length[lens]},Table[Hue[i/n],{i,0,n-1}]]

Graphics3D[{Thick,Sequence@@Nearest[Thread[lens->colors],EuclideanDistance@@v[[#]]],Line[v[[#]]]}&/@PolyhedronEdges[can],Boxed->False]

g=PolyhedronGraph[can]

{"Grid", {2, 2, 5}}

GraphData[{"Grid",{2,2,5}},"StandardName"]

Primary

GraphData[{"Grid",{2,2,5}}]//StyleGraphs[#,ImageSize->Small]&

All

GraphData[{"Grid",{2,2,5}},"Graph","All"]//StyleGraphs

Planar

GraphData[{"Grid",{2,2,5}},"Planar"]

GraphData[{"Grid",{2,2,5}},"Graph","Planar"]//StyleGraphs

MinimalCrossing

GraphData[{"Grid",{2,2,5}},{"RCN","CN"}]

GraphData[{"Grid",{2,2,5}},"Graph","MinimalCrossing"]//StyleGraphs

MinimalCrossing construction

GraphPlot@RotateGraph[MinimalCrossingGraph[GraphData[{"Grid",{2,2,5}}],"CrossingNumber"->-1]]

v={};
g=Graph[Range[Length[v]],UndirectedEdge@@@{},VertexCoordinates->v,VertexLabels->Automatic]

RecognizeGraph[g]

RectilinearCrossingCount[g]

Tutte embeddings

faces=ReverseSort@SymmetricallyDistinctFaces[GraphData[{"Grid",{2,2,5}}]]

Tally[ReverseSort[Length/@faces]]

IGLayoutTutte[GraphData[{"Grid",{2,2,5}}],"OuterFace"->#]&/@faces

gs=Annotate[#,{VertexLabels->None,ImageSize->Tiny}]&/@{,}

Tutte embedding construction 4 #1

GraphPlot[RotateGraph[]]

v={};
g=Graph[Range[Length[v]],UndirectedEdge@@@{},VertexCoordinates->v,VertexLabels->Automatic]

RecognizeGraph[g]

Tutte embedding construction 4 #2

GraphPlot[RotateGraph[,-Pi/2],VertexSize->{"Scaled",.01}]

v={{0,0},{1,0},{1,1},{0,1},{1/7,1/9},{6/7,1/9},{1/7,2/9},{6/7,2/9},{1/7,3/9},{6/7,3/9},{1/7,8/9},{6/7,8/9},{2/7,4/9},{5/7,4/9},{2/7,7/9},{5/7,7/9},{3/7,5/9},{4/7,5/9},{3/7,6/9},{4/7,6/9}};
g=Graph[Range[Length[v]],UndirectedEdge@@@{e[1,2,3,4,1,5,6,2],e[5,7,9,11,12,10,8,6],e[9,13,17,19,15,11,4,7,8,3,12,16,20,18,14,10,9],e[13,15,16,14,13],{19,20},{17,18}},VertexCoordinates->v,VertexLabels->Automatic]

RecognizeGraph[g]

Tutte embedding construction 4 #3

GraphPlot[RotateGraph[,-Pi/2]]

v=Join[{{0,0},{1,0},{1,1},{0,1}},Flatten[Table[{i,j/7},{j,6},{i,{1/3,2/3}}],1],{{1/3+2/9,5/7+2/21},{1/3+1/9,5/7+2/21},{1/3+2/9,5/7+1/21},{1/3+1/9,5/7+1/21}}];
g=Graph[Range[Length[v]],UndirectedEdge@@@{e[1,2,3,4,1,5,6,2,10,9,1],e[4,11,12,3,16,15,4],e[5,7,9,11,13,15,18,17,16,14,12,10,8,6],{7,8},e[13,20,19,14,13],{18,20},{17,19}},VertexCoordinates->v,VertexLabels->Automatic]

RecognizeGraph[g]

Halin

GraphData[{"Grid",{2,2,5}},"Graph","Halin"]//StyleGraphs

LCF

GraphData[{"Grid",{2,2,5}},"LCFSignature"]

GraphData[{"Grid",{2,2,5}},"Graph","LCF"]//StyleGraphs

UnitDistance

GraphData[{"Grid",{2,2,5}},"UnitDistance"]

UnitDistanceGraphQ[GraphData[{"Grid",{2,2,5}}],Debug->True]//Timing

GraphData[{"Grid",{2,2,5}},"Graph","UnitDistance"]//StyleGraphs

Select[%,!FreeQ[GraphEmbedding[#],_?InexactNumberQ]&]

Select[UnitDistanceEmbeddingRefine/@Complement@@(GraphData[{"Grid",{2,2,5}},"Graph",#]&/@{"All","UnitDistance"}),UnitDistanceGraphEmbeddingQ]

FindUnitDistanceEmbedding[GraphData[{"Grid",{2,2,5}}],MaxIterations->5000,"ReturnWithMessage"->True]//Timing

UnitDistance FindSubgraphUnitDistanceEmbedding

{{"Grid",{2,2,5}},l=FindSubgraphUnitDistanceEmbedding[GraphData[{"Grid",{2,2,5}}],TimeConstraint->300,"Results"->All]//Timing}

gs=UniqueEmbeddings[l]

gs={,,,,,,,,,};

Matchstick

GraphData[{"Grid",{2,2,5}},"Graph","Matchstick"]//StyleGraphs

Default embedding

GraphPlot@GraphData[{"Grid",{2,2,5}},"Edges"]

v={};
g=Graph[Range[Length[v]],UndirectedEdge@@@{},VertexCoordinates->v,VertexLabels->Automatic]

RecognizeGraph[g]

3D default

Graph3D[GraphData[{"Grid",{2,2,5}},"Edges"]]

3D All

GraphData[{"Grid",{2,2,5}},"Graph",{"3D","All"}]

3D UnitDistance

GraphData[{"Grid",{2,2,5}},"Graph",{"3D","UnitDistance"}]

3D Polyhedron

GraphData[{"Grid",{2,2,5}},"Graph",{"3D","Polyhedron"}]

Graphics3D[{FaceForm[Green,Red],GraphData[{"Grid",{2,2,5}},"Polyhedron"]}]

3D Canonical

GraphData[{"Grid",{2,2,5}},"Graph",{"3D","Canonical"}]

Graphics3D[{Opacity[.5],Red,GraphData[{"Grid",{2,2,5}},"Polyhedron"],Yellow,Sphere[]}]

3D Canonical construction

Graphics3D[{FaceForm[Green,Red],poly=GraphPolyhedron[GraphData[{"Grid",{2,2,5}}],1]}]

(can=FindCanonicalPolyhedron[poly,WorkingPrecision->100,MaxIterations->50000,PrecisionGoal->20,"ProgressInterval"->500,"TangentFactor"->1/10,"PlanarFactor"->1/10,Debug->True])//Timing

can=Polyhedron[];

(can=FindCanonicalPolyhedron[can,WorkingPrecision->100,MaxIterations->50000,PrecisionGoal->20,"ProgressInterval"->500,"TangentFactor"->1/10,"PlanarFactor"->1/10,Debug->True])//Timing

SimplePolyhedronQ[can]

Graphics3D[{Opacity[.5],Red,can,Yellow,Sphere[]}]

(lens=Mean/@Split[Sort[PolyhedronEdgeLengths[can]],Abs[#1-#2]<1.*^-10&])//N

v=PolyhedronCoordinates[can];

colors=With[{n=Length[lens]},Table[Hue[i/n],{i,0,n-1}]]

Graphics3D[{Thick,Sequence@@Nearest[Thread[lens->colors],EuclideanDistance@@v[[#]]],Line[v[[#]]]}&/@PolyhedronEdges[can],Boxed->False]

g=PolyhedronGraph[can]

{"Grid", {2, 3, 4}}

GraphData[{"Grid",{2,3,4}},"StandardName"]

All

GraphData[{"Grid",{2,3,4}},"Graph","All"]//StyleGraphs

LCF

GraphData[{"Grid",{2,3,4}},"LCFSignature"]

GraphData[{"Grid",{2,3,4}},"Graph","LCF"]//StyleGraphs

UnitDistance

UnitDistanceGraphQ[GraphData[{"Grid",{2,3,4}}],Debug->True]

GraphData[{"Grid",{2,3,4}},"Graph","UnitDistance"]//StyleGraphs

Select[%,!FreeQ[GraphEmbedding[#],_?InexactNumberQ]&]

Select[UnitDistanceEmbeddingRefine/@Complement@@(GraphData[{"Grid",{2,3,4}},"Graph",#]&/@{"All","UnitDistance"}),UnitDistanceGraphEmbeddingQ]

l=FindSubgraphIsomorphism[GraphData[{"Grid",{2,3,4}}],"Results"->All]//Timing

gs=UniqueEmbeddings[l]

Matchstick

GraphData[{"Grid",{2,3,4}},"Graph","Matchstick"]//StyleGraphs

MinimalCrossing

GraphData[{"Grid",{2,3,4}},{"RCN","CN"}]

GraphData[{"Grid",{2,3,4}},"Graph","MinimalCrossing"]//StyleGraphs

3D

GraphData[{"Grid",{2,3,4}},"Graph","3D"]

Graph3D[GraphData[{"Grid",{2,3,4}},"Edges"]]

Default embedding

g=GraphPlot@GraphData[{"Grid",{2,3,4}},"Edges"]

v={};
g=Graph[Range[Length[v]],UndirectedEdge@@@{},VertexCoordinates->v,VertexLabels->Automatic]

RecognizeGraph[g]

MinimalCrossing Construction

GraphData[{"Grid",{2,3,4}},"V"]

GraphPlot@RotateGraph[MinimalCrossingGraph[GraphData[{"Grid",{2,3,4}}],"CrossingNumber"->4],Pi/4]

v={{0,-1},{5,-1},{1,0},{4,0},{2,1},{3,1},{1,2},{4,2},{2,3},{3,3},{2,4},{3,4},{2,5},{3,5},{2,6},{3,6},{1,7},{4,7},{2,8},{3,8},{1,9},{4,9},{0,10},{5,10}};
g=RotateGraph[Graph[Range[Length[v]],UndirectedEdge@@@{e[1,2,24,23,1,3,4,2],e[3,7,17,21,22,18,8,4,6,5,3],e[7,8,10,9,7],e[5,9,11,13,15,19,20,16,14,12,10,6],e[1,17,18,2],e[19,21,23],e[20,22,24],e[17,15,16,18],{11,12},e[7,13,14,8]},VertexCoordinates->v,VertexLabels->Automatic],Pi/2]

RecognizeGraph[g]

RectilinearCrossingCount[g]

{"Grid", {2, 3, 5}}

GraphData[{"Grid",{2,3,5}},"StandardName"]

Primary

GraphData[{"Grid",{2,3,5}}]//StyleGraphs[#,ImageSize->Small]&

All

GraphData[{"Grid",{2,3,5}},"Graph","All"]//StyleGraphs

Inexact

Select[GraphData[{"Grid",{2,3,5}},"Graph","All"],(!FreeQ[GraphEmbedding[#],_?InexactNumberQ]&)]//StyleGraphs

Embedding types

GraphDataEmbeddings[GraphData[{"Grid",{2,3,5}},"EdgeList"]]

Default embedding

GraphPlot@GraphData[{"Grid",{2,3,5}},"Edges"]

v={};
g=Graph[Range[Length[v]],UndirectedEdge@@@{},VertexCoordinates->v,VertexLabels->Automatic]

RecognizeGraph[g]

Degenerate

GraphData[{"Grid",{2,3,5}},"Graph","Degenerate"]//StyleGraphs

DegenerateGraphEmbeddingTypes/@GraphData[{"Grid",{2,3,5}},"Graph","Degenerate"]

Bilateral

GraphData[{"Grid",{2,3,5}},"Graph","Bilateral"]//StyleGraphs

Circular

GraphData[{"Grid",{2,3,5}},"Graph","Circular"]//StyleGraphs

Circular construction

Length[hc=FindHamiltonianCycle[GraphData[{"Grid",{2,3,5}}],All][[All,All,1]]]

Length[bilat=DeleteDuplicatesBy[
DeleteMissing[BilaterallyRotatedGraph@CircularEmbeddingFromHamiltonianCycle[GraphData[{"Grid",{2,3,5}}],#]&/@hc],
CircularCanonicalGraphEmbedding]]//Timing

bilat

Length[quad=DeleteDuplicatesBy[Union@Select[bilat,BilateralGraphEmbeddingQ[#,Axis->"X"]&],CircularCanonicalGraphEmbedding[#,4]&]]

quad

Planar

GraphData[{"Grid",{2,3,5}},"Planar"]

GraphData[{"Grid",{2,3,5}},"Graph","Planar"]//StyleGraphs

MinimalCrossing

GraphData[{"Grid",{2,3,5}},{"RCN","CN"}]

GraphData[{"Grid",{2,3,5}},"Graph","MinimalCrossing"]//StyleGraphs

MinimalCrossing construction

(cn=CrossingNumber[GraphData[{"Grid",{2,3,5}}],TimeConstraint->1])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Grid",{2,3,5}}],TimeConstraint->10])//AbsoluteTiming

Union[Select[Table[RotateGraph[MinimalCrossingGraph[GraphData[{"Grid",{2,3,5}}],"CrossingNumber"->cn,RandomSeed->n]],{n,50}],Max[OuterFace[#]]<=GraphData[{"Grid",{2,3,5}},"V"]&]]//Timing

GraphPlot@RotateGraph[,Pi/4]

Table[MinimalCrossingGraph[GraphData[{"Grid",{2,3,5}}],"CrossingNumber"->cn,RandomSeed->i],{i,50}]//Union

v={};
g=Graph[Range[Length[v]],UndirectedEdge@@@{},VertexCoordinates->v,VertexLabels->Automatic]

RecognizeGraph[g]

RectilinearCrossingCount[g]

Circulant

GraphData[{"Grid",{2,3,5}},"Circulant"]

GraphData[{"Grid",{2,3,5}},"Graph","Circulant"]//StyleGraphs

Halin

GraphData[{"Grid",{2,3,5}},"Halin"]

GraphData[{"Grid",{2,3,5}},"Graph","Halin"]//StyleGraphs

Rigid

GraphData[{"Grid",{2,3,5}},"Rigid"]

GraphData[{"Grid",{2,3,5}},"Graph","Rigid"]//StyleGraphs

Flexible

GraphData[{"Grid",{2,3,5}},"Flexible"]

GraphData[{"Grid",{2,3,5}},"Graph","Flexible"]//StyleGraphs

LCF

GraphData[{"Grid",{2,3,5}},"LCF"]

GraphData[{"Grid",{2,3,5}},"HamiltonianCycleCount"]

GraphData[{"Grid",{2,3,5}},"LCFSignature"]

GraphData[{"Grid",{2,3,5}},"LCFNotations"]

GraphData[{"Grid",{2,3,5}},"Graph","LCF"]//StyleGraphs

UnitDistance

GraphData[{"Grid",{2,3,5}},"UnitDistance"]

UnitDistanceGraphQ[GraphData[{"Grid",{2,3,5}}],Debug->True]//Timing

GraphData[{"Grid",{2,3,5}},"Graph","UnitDistance"]//StyleGraphs

Select[%,!FreeQ[GraphEmbedding[#],_?InexactNumberQ]&]

UnitDistance by refinement

UnitDistanceEmbeddingRefine[Graph[GraphData[{"Grid",{2,3,5}},"VertexList"],GraphData[{"Grid",{2,3,5}},"EdgeList"]],MaxIterations->500]

UnitDistanceGraphEmbeddingQ[%]

UnitDistanceEmbeddingRefine[Annotate[#,VertexCoordinates->N[GraphEmbedding[#]]],MaxIterations->500]&/@Complement@@(GraphData[{"Grid",{2,3,5}},"Graph",#]&/@{"All","UnitDistance"})

Select[%,UnitDistanceGraphEmbeddingQ]

UnitDistance by FindUnitDistanceEmbedding

FindUnitDistanceEmbedding[GraphData[{"Grid",{2,3,5}}],MaxIterations->5000,"ReturnWithMessage"->True]//Timing

FindUnitDistanceEmbedding[GraphData[{"Grid",{2,3,5}}],MaxIterations->5000,"ReturnWithMessage"->False]//Quiet//Timing

UnitDistance by FindSubgraphUnitDistanceEmbedding

{{"Grid",{2,3,5}},l=FindSubgraphUnitDistanceEmbedding[GraphData[{"Grid",{2,3,5}}],TimeConstraint->300,"Results"->All]//Timing}

gs=SortBy[UniqueEmbeddings[l],Replace[RectilinearCrossingCount[#],Infinity->0]&]

gs={,,};

Matchstick

GraphData[{"Grid",{2,3,5}},"Matchstick"]

GraphData[{"Grid",{2,3,5}},"Graph","Matchstick"]//StyleGraphs

3D default

Graph3D[GraphData[{"Grid",{2,3,5}},"Edges"]]

3D All

GraphData[{"Grid",{2,3,5}},"Graph",{"3D","All"}]

3D UnitDistance

GraphData[{"Grid",{2,3,5}},"Graph",{"3D","UnitDistance"}]

3D Polyhedron

GraphData[{"Grid",{2,3,5}},"Polyhedral"]

GraphData[{"Grid",{2,3,5}},"Graph",{"3D","Polyhedron"}]

{"Grid", {2, 4, 4}}

GraphData[{"Grid",{2,4,4}},"StandardName"]

Primary

GraphData[{"Grid",{2,4,4}}]//StyleGraphs[#,ImageSize->Small]&

All

GraphData[{"Grid",{2,4,4}},"Graph","All"]//StyleGraphs

Inexact

Select[GraphData[{"Grid",{2,4,4}},"Graph","All"],(!FreeQ[GraphEmbedding[#],_?InexactNumberQ]&)]//StyleGraphs

Embedding types

GraphDataEmbeddings[GraphData[{"Grid",{2,4,4}},"EdgeList"]]

Default embedding

GraphPlot@GraphData[{"Grid",{2,4,4}},"Edges"]

v={};
g=Graph[Range[Length[v]],UndirectedEdge@@@{},VertexCoordinates->v,VertexLabels->Automatic]

RecognizeGraph[g]

Degenerate

GraphData[{"Grid",{2,4,4}},"Graph","Degenerate"]//StyleGraphs

DegenerateGraphEmbeddingTypes/@GraphData[{"Grid",{2,4,4}},"Graph","Degenerate"]

Bilateral

GraphData[{"Grid",{2,4,4}},"Graph","Bilateral"]//StyleGraphs

Circular

GraphData[{"Grid",{2,4,4}},"Graph","Circular"]//StyleGraphs

Circular construction

Length[hc=FindHamiltonianCycle[GraphData[{"Grid",{2,4,4}}],All][[All,All,1]]]

Length[bilat=DeleteDuplicatesBy[
DeleteMissing[BilaterallyRotatedGraph@CircularEmbeddingFromHamiltonianCycle[GraphData[{"Grid",{2,4,4}}],#]&/@hc],
CircularCanonicalGraphEmbedding]]//Timing

gs=bilat

Length[quad=DeleteDuplicatesBy[Union@Select[bilat,BilateralGraphEmbeddingQ[#,Axis->"X"]&],CircularCanonicalGraphEmbedding[#,4]&]]

quad

Planar

GraphData[{"Grid",{2,4,4}},"Planar"]

GraphData[{"Grid",{2,4,4}},"Graph","Planar"]//StyleGraphs

MinimalCrossing

GraphData[{"Grid",{2,4,4}},{"RCN","CN"}]

GraphData[{"Grid",{2,4,4}},"Graph","MinimalCrossing"]//StyleGraphs

MinimalCrossing construction

(cn=CrossingNumber[GraphData[{"Grid",{2,4,4}}],TimeConstraint->1])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Grid",{2,4,4}}],TimeConstraint->10])//AbsoluteTiming

Union[Select[Table[RotateGraph[MinimalCrossingGraph[GraphData[{"Grid",{2,4,4}}],"CrossingNumber"->cn,RandomSeed->n]],{n,500}],Max[OuterFace[#]]<=GraphData[{"Grid",{2,4,4}},"V"]&]]//Timing

GraphPlot[Annotate[RotateGraph[#,Pi/4],ImageSize->Medium]]&/@{,,,,}

{,,,,}

Table[MinimalCrossingGraph[GraphData[{"Grid",{2,4,4}}],"CrossingNumber"->cn,RandomSeed->i],{i,50}]//Union

{#,#2+1}&@@@{{4,7},{5,7},{4,8},{5,8},{2,9},{7,9},{3,10},{6,10},{3,11},{6,11},{2,12},{7,12},{1,13},{8,13},{0,14},{9,14}}

v={#/9,#2/15}&@@@{{0,0},{9,0},{1,1},{8,1},{3,2},{6,2},{4,3},{5,3},{3,4},{6,4},{4,5},{5,5},{3,6},{6,6},
{4,7},{5,7},{4,8},{5,8},{3,9},{6,9},{2,10},{7,10},{3,11},{6,11},{3,12},{6,12},{2,13},{7,13},{1,14},{8,14},{0,15},{9,15}
};
g=Graph[Range[Length[v]],UndirectedEdge@@@{e[1,2,32,31,1,5,6,2,4],e[8,7],e[3,1],e[3,29,30,4,22,28,27,21,3,9,10,4],e[31,29,27,25,26,28,30,32],e[9,13,19,23,25],e[26,24,20,14,10],e[21,23,24,22,14,13,21],{21,22},e[5,7,11,15,17,19,20,18,16,12,8,6],{17,18},e[13,15,16,14],{5,9},{6,10},e[9,11,12,10],{3,4}},VertexCoordinates->v,VertexLabels->Automatic]

GraphData[{"Grid",{2,4,4}},"V"]

RecognizeGraph[g]

RectilinearCrossingCount[g]

Circulant

GraphData[{"Grid",{2,4,4}},"Circulant"]

GraphData[{"Grid",{2,4,4}},"Graph","Circulant"]//StyleGraphs

Halin

GraphData[{"Grid",{2,4,4}},"Halin"]

GraphData[{"Grid",{2,4,4}},"Graph","Halin"]//StyleGraphs

Rigid

GraphData[{"Grid",{2,4,4}},"Rigid"]

GraphData[{"Grid",{2,4,4}},"Graph","Rigid"]//StyleGraphs

Flexible

GraphData[{"Grid",{2,4,4}},"Flexible"]

GraphData[{"Grid",{2,4,4}},"Graph","Flexible"]//StyleGraphs

LCF

GraphData[{"Grid",{2,4,4}},"LCF"]

GraphData[{"Grid",{2,4,4}},"HamiltonianCycleCount"]

GraphData[{"Grid",{2,4,4}},"LCFSignature"]

GraphData[{"Grid",{2,4,4}},"LCFNotations"]

GraphData[{"Grid",{2,4,4}},"Graph","LCF"]//StyleGraphs

UnitDistance

GraphData[{"Grid",{2,4,4}},"UnitDistance"]

UnitDistanceGraphQ[GraphData[{"Grid",{2,4,4}}],Debug->True]//Timing

GraphData[{"Grid",{2,4,4}},"Graph","UnitDistance"]//StyleGraphs

Select[%,!FreeQ[GraphEmbedding[#],_?InexactNumberQ]&]

UnitDistance by refinement

UnitDistanceEmbeddingRefine[Graph[GraphData[{"Grid",{2,4,4}},"VertexList"],GraphData[{"Grid",{2,4,4}},"EdgeList"]],MaxIterations->500]

UnitDistanceGraphEmbeddingQ[%]

UnitDistanceEmbeddingRefine[Annotate[#,VertexCoordinates->N[GraphEmbedding[#]]],MaxIterations->500]&/@Complement@@(GraphData[{"Grid",{2,4,4}},"Graph",#]&/@{"All","UnitDistance"})

Select[%,UnitDistanceGraphEmbeddingQ]

UnitDistance by FindUnitDistanceEmbedding

FindUnitDistanceEmbedding[GraphData[{"Grid",{2,4,4}}],MaxIterations->5000,"ReturnWithMessage"->True]//Timing

FindUnitDistanceEmbedding[GraphData[{"Grid",{2,4,4}}],MaxIterations->5000,"ReturnWithMessage"->False]//Quiet//Timing

UnitDistance by FindSubgraphUnitDistanceEmbedding

{{"Grid",{2,4,4}},l=FindSubgraphUnitDistanceEmbedding[GraphData[{"Grid",{2,4,4}}],TimeConstraint->300,"Results"->All]//Timing}

gs=SortBy[UniqueEmbeddings[l],Replace[RectilinearCrossingCount[#],Infinity->0]&]

gs={,,,};

Matchstick

GraphData[{"Grid",{2,4,4}},"Matchstick"]

GraphData[{"Grid",{2,4,4}},"Graph","Matchstick"]//StyleGraphs

3D default

Graph3D[GraphData[{"Grid",{2,4,4}},"Edges"]]

3D All

GraphData[{"Grid",{2,4,4}},"Graph",{"3D","All"}]

3D UnitDistance

GraphData[{"Grid",{2,4,4}},"Graph",{"3D","UnitDistance"}]

3D Polyhedron

GraphData[{"Grid",{2,4,4}},"Polyhedral"]

GraphData[{"Grid",{2,4,4}},"Graph",{"3D","Polyhedron"}]

GraphData

n×k up to 5

Table[Print[GraphDataString[{"Grid",{m,n}},GridGraph[m,n],120]],{n,2,5},{m,2,n}]

Print[GraphDataString[{"Grid",{5,5}},GridGraph[5,5],10]]

file=OpenAppend["grid.m"]

Do[WriteString[file,GraphDataString[GridGraph[n,n],
"Name"->"("<>ToString[n]<>","<>ToString[n]<>")-grid graph",
"StandardName"->{"Grid",{n,n}},
"Classes"->{"Grid"},
"NotationRules"->{"Grid"->{n,n}},
"Information"->"GridGraph",
Debug->True,
TimeConstraint->300
]],{n,6,10}]

k×m×n up to 5

Table[Print[GraphDataString[{"Grid",{k,m,n}},GridGraph[k,m,n],10]],{k,2,5},{m,k,5},{n,m,5}]

Do[WriteString[file,GraphDataString[GridGraph[n,n,n],
"Name"->"("<>ToString[n]<>","<>ToString[n]<>","<>ToString[n]<>")-grid graph",
"StandardName"->{"Grid",{n,n,n}},
"Classes"->{"Grid"},
"NotationRules"->{"Grid"->{n,n,n}},
"Information"->"GridGraph",
Debug->True,
TimeConstraint->60
]],{n,6,10}]

Up to 10

new=Select[Flatten[Table[{k,n},{k,2,10},{n,k,10}],1],Quiet[Head[RecognizeGraph[GraphData[{"Grid",#}]]]]===RecognizeGraph&]

file=OpenWrite["~/grid.m"]

WriteString[file,GraphDataString[g=GridGraph[#],
"Name"->"("<>ToString[#[[1]]]<>","<>ToString[#[[2]]]<>")\[Hyphen]grid graph",
"Embeddings"->{Round[GraphEmbedding[g]]},
"EmbeddingClasses"->{"Grid","IntegerCoordinates","MinimalCrossing","Planar","Primary","UnitDistance"},
"StandardName"->{"Grid",#},
"Classes"->{"Grid"},
"Notation"->Row[{Subscript["P",#[[1]]],"×",Subscript["P",#[[2]]]}],
"NotationRules"->{"Grid"->#},
"Information"->"GridGraph",
"Skip"->{"MatchingPolynomial","IndependencePolynomial","ChromaticPolynomial","Bandwidth","RankPolynomial","CliqueCoveringNumber"},
Debug->True,
TimeConstraint->10
]]&/@new;

file=OpenAppend["~/grid.m"]

WriteString[file,GraphDataString[g=GridGraph[#],
"Name"->"("<>ToString[#[[1]]]<>","<>ToString[#[[2]]]<>")\[Hyphen]grid graph",
"Embeddings"->{Round[GraphEmbedding[g]]},
"EmbeddingClasses"->{"Grid","IntegerCoordinates","MinimalCrossing","Planar","Primary","UnitDistance"},
"StandardName"->{"Grid",#},
"Classes"->{"Grid"},
"Notation"->Row[{Subscript["P",#[[1]]],"×",Subscript["P",#[[2]]]}],
"NotationRules"->{"Grid"->#},
"Information"->"GridGraph",
"Skip"->{"MatchingPolynomial","IndependencePolynomial","ChromaticPolynomial","Bandwidth","RankPolynomial","CliqueCoveringNumber"},
Debug->True,
TimeConstraint->10
]]&/@Drop[new,5];

Close[file]

11-20

<<MathWorld`Graphs`

file=OpenAppend["~/grid.m"]

Do[
WriteString[file,
GraphDataString[GridGraph1[{n,n}],
"StandardName"->{"Grid",{n,n}},
"Name"->"("<>ToString[n]<>","<>ToString[n]<>")\[Hyphen]grid graph",
"NotationRules"->{"Grid"->{n,n}},
"Classes"->{"Grid"},
"Information"->"GridGraph",
"Skip"->{"Arboricity","ConnectedInducedSubgraphPolynomial","ConnectedInducedSubgraphs","EigenvectorCentralities","IdiosyncraticPolynomial","MatchingGeneratingPolynomial","MaximumIndependentEdgeSets","MaximumIndependentVertexSets","MinimumDistinguishingLabelings","MinimumDominatingSet","SpanningTreeCount","TopologicalIndex","TuttePolynomial"},
TimeConstraint->1,
Debug->True
]],
{n,17,20}
];

Close[file]