KC Graph

Author

Eric W. Weisstein
December 29, 2024

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

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

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

Source

Knuth, D.E.  The Art of Computer Programing, Vol. 4, Pre-Fascicle 7A, §7.2.2.3, p. 22, 2024.

Properties

EdgeCount

DeleteCases[{#,{n,r}=GraphData[#,"NotationRules","KC"],GraphData[#,"EdgeCount"],r(n+1)n/2}&/@GraphData["KC"],{_,_,x_,x_}]

MinimumVertexDegree == MaximumVertexDegree == n+1

DeleteCases[{#,GraphData[#,"NotationRules","KC"][[1]]+1,GraphData[#,"MinimumVertexDegree"],GraphData[#,"MaximumVertexDegree"]}&/@GraphData["KC"],{_,x_,x_,x_}]

Regular

Complement@@GraphData/@{"KC","Regular"}

VertexCount

DeleteCases[{#,{n,r}=GraphData[#,"NotationRules","KC"],GraphData[#,"VertexCount"],r n}&/@GraphData["KC"],{_,_,x_,x_}]

Classes that are Class

<<MathWorld`Graphs`

GraphClassesThatAre["KC"]

Intersection@@(GraphData[#,"Classes"]&/@GraphData["KC"])

Table

TextGrid[Table[{n,r,RecognizeGraph@KCGraph[n,r]},{n,10},{r,3,8}],Dividers->All]

CirculantIndices[GraphData@{"ZeroTwoNonbipartite",{5,3}}]

CirculantGraphQ[GraphData@{"ZeroTwoNonbipartite",{5,3}}]

RookGraph[3,3]//RecognizeGraph

Gracefulness

Knuth, D.E.  The Art of Computer Programing, Vol. 4, Pre-Fascicle 7A, §7.2.2.3, p. 22, 2024.

graceful=RecognizeGraph/@Table[KCGraph[3,r],{r,4,10,2}]

GraphData[#,"Graceful"]&/@graceful

GraphData[#,"GracefulLabelingCount"]&/@graceful

ungraceful=DeleteCases[RecognizeGraph/@Table[KCGraph[3,r],{r,3,20,2}],{}]

GraphData[#,"Graceful"]&/@ungraceful

rules=Rule[#,{}]&/@ungraceful

GraphDataCountTable

GraphDataCountTable["KC"]

Parametrized families

<<MathWorld`Graphs`

Alkane

seq=Table[GraphData[{"Alkane",n},"KC"],{n,10}]

AlternatingGroupGraph

seq=Table[GraphData[{"AlternatingGroupGraph",n},"KC"],{n,2,6}]

Andrasfai

seq=Table[GraphData[{"Andrasfai",n},"KC"],{n,20}]

Antelope n×n

seq=Table[GraphData[{"Antelope",{n,n}},"KC"],{n,20}]

Antiprism

Entity["Graph",{"Antiprism",n}]["KC"]

seq=Table[GraphData[{"Antiprism",n},"KC"],{n,3,25}]

Apollonian

seq=Table[GraphData[{"Apollonian",n},"KC"],{n,5}]

Barbell

seq=Table[GraphData[{"Barbell",n},"KC"],{n,3,20}]

Bishop n×n

seq=Table[GraphData[{"Bishop",{n,n}},"KC"],{n,20}]

BlackBishop n×n

seq=Table[GraphData[{"BlackBishop",{n,n}},"KC"],{n,20}]

Book

seq=Table[GraphData[{"Book",n},"KC"],{n,20}]

Bruhat

seq=Table[GraphData[{"Bruhat",n},"KC"],{n,6}]

Camel n×n

seq=Table[GraphData[{"Camel",{n,n}},"KC"],{n,20}]

Centipede

seq=Table[GraphData[{"Centipede",n},"KC"],{n,10}]

CocktailParty

seq=Table[GraphData[{"CocktailParty",n},"KC"],{n,20}]

Complete

Entity["Graph",{"Complete",n}]["KC"]

seq=Table[GraphData[{"Complete",n},"KC"],{n,30}]

CompleteBipartite n×n

Entity["Graph",{"CompleteBipartite",{n,n}}]["KC"]

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

CompleteBipartite m×n

Entity["Graph",{"CompleteBipartite",{m,n}}]["KC"]

DeleteCases[Flatten[Table[{
{m,n},
GraphData[{"CompleteBipartite",{m,n}},"KC"],
Piecewise[{{True,m==n==2}},False]
},{n,10},{m,n}],1],{_,x_,x_}]

CompleteTripartite n×n×n

Entity["Graph",{"CompleteTripartite",{n,n,n}}]["KC"]

seq=Table[GraphData[{"CompleteTripartite",{n,n,n}},"KC"],{n,10}]

CompleteTripartite k×m×n

Entity["Graph",{"CompleteTripartite",{k,m,n}}]["KC"]

DeleteCases[Flatten[Table[{
{k,m,n},
GraphData[{"CompleteTripartite",{k,m,n}},"KC"],
Piecewise[{{True,k==m==n==1}},False]
},{n,10},{m,n},{k,m}],2],{_,x_,x_}]

CrossedPrism

seq=Table[GraphData[{"CrossedPrism",2n},"KC"],{n,2,12}]

Crown

seq=Table[GraphData[{"Crown",n},"KC"],{n,20}]

CubeConnectedCycle

Entity["Graph",{"CubeConnectedCycle",n}]["KC"]

seq=Table[GraphData[{"CubeConnectedCycle",n},"KC"],{n,3,8}]

Cycle

Entity["Graph",{"Cycle",n}]["KC"]

seq=Table[GraphData[{"Cycle",n},"KC"],{n,3,30}]

CycleComplement

seq=Table[GraphData[{"CycleComplement",n},"KC"],{n,3,20}]

DiagonalIntersection

seq=Table[GraphData[{"DiagonalIntersection",n},"KC"],{n,3,14}]

Dipyramid

seq=Table[GraphData[{"Dipyramid",n},"KC"],{n,3,20}]

DorogovtsevGoltsevMendes

seq=Table[GraphData[{"DorogovtsevGoltsevMendes",n},"KC"],{n,0,7}]

DoubleCone

seq=Table[GraphData[{"DoubleCone",n},"KC"],{n,3,20}]

Empty

Entity["Graph",{"Empty",n}]["KC"]

seq=Table[GraphData[{"Empty",n},"KC"],{n,30}]

FibonacciCube

seq=Table[GraphData[{"FibonacciCube",n},"KC"],{n,15}]

Fiveleaper n×n

seq=Table[GraphData[{"Fiveleaper",{n,n}},"KC"],{n,20}]

Flower

seq=Table[GraphData[{"Flower",n},"KC"],{n,5,20}]

FoldedCube

seq=Table[GraphData[{"FoldedCube",n},"KC"],{n,2,10}]

Gear

seq=Table[GraphData[{"Gear",n},"KC"],{n,3,20}]

Giraffe n×n

seq=Table[GraphData[{"Giraffe",{n,n}},"KC"],{n,20}]

Goldberg

seq=Table[GraphData[{"Goldberg",n},"KC"],{n,3,20}]

Grid n×n

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

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

Grid m×n

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

Sort@DeleteCases[Flatten[Table[{
{m,n},
GraphData[{"Grid",{m,n}},"KC"],
Piecewise[{{True,m==n==2}},False]
},{n,10},{m,n}],1],{_,x_,x_}]

Grid n×n×n

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

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

Grid k×m×n

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

Sort@DeleteCases[Flatten[Table[{
{k,m,n},
GraphData[{"Grid",{k,m,n}},"KC"],
Piecewise[{{True,k==m==n==2||(Min[k,m,n]==1&&Max[k,m,n]==2&&k m n==4)}},False]
},{n,5},{m,n},{k,m}],2],{_,x_,x_}]

HalvedCube

seq=Table[GraphData[{"HalvedCube",n},"KC"],{n,10}]

Hanoi

seq=Table[GraphData[{"Hanoi",n},"KC"],{n,6}]

Helm

seq=Table[GraphData[{"Helm",n},"KC"],{n,3,20}]

Hypercube

Entity["Graph",{"Hypercube",n}]["KC"]

seq=Table[GraphData[{"Hypercube",n},"KC"],{n,0,10}]

KC

DeleteCases[Flatten[Table[{
{m,n},
GraphData[{"KC",{m,n}},"KC"],
True
},{n,3,10},{m,10}],1],{_,x_,x_}]

Keller

Entity["Graph",{"Keller",n}]["KC"]

seq=Table[GraphData[{"Keller",n},"KC"],{n,5}]

King n×n

seq=Table[GraphData[{"King",{n,n}},"KC"],{n,20}]

King m×n

DeleteCases[Flatten[Table[{
{m,n},
GraphData[{"King",{m,n}},"KC"],
False
},{n,10},{m,n}],1],{_,x_,x_}]

Knight n×n

Entity["Graph",{"Knight",{n,n}}]["KC"]

seq=Table[GraphData[{"Knight",{n,n}},"KC"],{n,20}]

Knight m×n

Entity["Graph",{"Knight",{m,n}}]["KC"]

DeleteCases[Flatten[Table[{
{m,n},
GraphData[{"Knight",{m,n}},"KC"],
False
},{n,10},{m,n}],1],{_,x_,x_}]

KP

Select[GraphData["KP"],GraphData[#,"KC"]&]

DeleteCases[Flatten[Table[{
{m,n},
GraphData[{"KP",{m,n}},"KC"],
False
},{n,3,10},{m,10}],1],{_,x_,x_}]

Ladder

Entity["Graph",{"Ladder",n}]["KC"]

seq=Table[GraphData[{"Ladder",n},"KC"],{n,20}]

LadderRung

seq=Table[GraphData[{"LadderRung",n},"KC"],{n,20}]

LindgrenSousselier

seq=Table[GraphData[{"LindgrenSousselier",n},"KC"],{n,11}]

LucasCube

seq=Table[GraphData[{"LucasCube",n},"KC"],{n,15}]

MengerSponge

seq=Table[GraphData[{"MengerSponge",n},"KC"],{n,3}]

MoebiusLadder

Entity["Graph",{"MoebiusLadder",n}]["KC"]

seq=Table[GraphData[{"MoebiusLadder",n},"KC"],{n,3,25}]

Mycielski

Entity["Graph",{"Mycielski",n}]["KC"]

seq=Table[GraphData[{"Mycielski",n},"KC"],{n,11}]

Odd

Entity["Graph",{"Odd",n}]["KC"]

seq=Table[GraphData[{"Odd",n},"KC"],{n,7}]

Pan

seq=Table[GraphData[{"Pan",n},"KC"],{n,3,20}]

Path

Entity["Graph",{"Path",n}]["KC"]

seq=Table[GraphData[{"Path",n},"KC"],{n,20}]

PathComplement

seq=Table[GraphData[{"PathComplement",n},"KC"],{n,20}]

Pell

seq=Table[GraphData[{"Pell",n},"KC"],{n,9}]

PlummerToft

seq=Table[GraphData[{"PlummerToft",n},"KC"],{n,20}]

Prism

Entity["Graph",{"Prism",n}]["KC"]

seq=Table[GraphData[{"Prism",n},"KC"],{n,3,25}]

Queen n×n

seq=Table[GraphData[{"Queen",{n,n}},"KC"],{n,20}]

Rook n×n

seq=Table[GraphData[{"Rook",{n,n}},"KC"],{n,20}]

RookComplement n×n

seq=Table[GraphData[{"RookComplement",{n,n}},"KC"],{n,20}]

SierpinskiCarpet

seq=Table[GraphData[{"SierpinskiCarpet",n},"KC"],{n,4}]

SierpinskiGasket

seq=Table[GraphData[{"SierpinskiGasket",n},"KC"],{n,7}]

SierpinskiTetrahedron

seq=Table[GraphData[{"SierpinskiTetrahedron",n},"KC"],{n,6}]

Spoke n×n

seq=Table[GraphData[{"Spoke",{n,n}},"KC"],{n,5}]

StackedBook

seq=Table[GraphData[{"StackedBook",{n,n}},"KC"],{n,10}]

StackedPrism

seq=Table[GraphData[{"StackedPrism",{n,n}},"KC"],{n,3,5}]

Star

Entity["Graph",{"Star",n}]["KC"]

seq=Table[GraphData[{"Star",n},"KC"],{n,25}]

Sun

seq=Table[GraphData[{"Sun",n},"KC"],{n,3,20}]

Sunlet

seq=Table[GraphData[{"Sunlet",n},"KC"],{n,3,20}]

Tetrahedral

seq=Table[GraphData[{"Tetrahedral",n},"KC"],{n,6,10}]

TorusGrid n×n

seq=Table[GraphData[{"TorusGrid",{n,n}},"KC"],{n,3,20}]

Transposition

Entity["Graph",{"Transposition",n}]["KC"]

seq=Table[GraphData[{"Transposition",n},"KC"],{n,6}]

Trapezohedron

Entity["Graph",{"Trapezohedron",n}]["KC"]

seq=Table[GraphData[{"Trapezohedron",n},"KC"],{n,3,20}]

Triangular

seq=Table[GraphData[{"Triangular",n},"KC"],{n,2,20}]

TriangularGrid

seq=Table[GraphData[{"TriangularGrid",n},"KC"],{n,0,20}]

TriangularHoneycombAcuteKnight

seq=Table[GraphData[{"TriangularHoneycombAcuteKnight",n},"KC"],{n,20}]

TriangularHoneycombBishop

seq=Table[GraphData[{"TriangularHoneycombBishop",n},"KC"],{n,20}]

TriangularHoneycombObtuseKnight

seq=Table[GraphData[{"TriangularHoneycombObtuseKnight",n},"KC"],{n,20}]

TriangularHoneycombQueen

seq=Table[GraphData[{"TriangularHoneycombQueen",n},"KC"],{n,20}]

TriangularHoneycombRook

seq=Table[GraphData[{"TriangularHoneycombRook",n},"KC"],{n,20}]

TriangularSnake

seq=Table[GraphData[{"TriangularSnake",n},"KC"],{n,1,20,2}]

Web

seq=Table[GraphData[{"Web",n},"KC"],{n,3,20}]

Wheel

Entity["Graph",{"Wheel",n}]["KC"]

seq=Table[GraphData[{"Wheel",n},"KC"],{n,4,20}]

WheelComplement

seq=Table[GraphData[{"WheelComplement",n},"KC"],{n,4,20}]

WhiteBishop n×n

seq=Table[GraphData[{"WhiteBishop",{n,n}},"KC"],{n,2,20}]

WhiteCamel n×n

seq=Table[GraphData[{"Bishop",{n,n}},"KC"],{n,{5}}]

Zebra n×n

seq=Table[GraphData[{"Zebra",{n,n}},"KC"],{n,20}]

GraphData

GraphDataClassString

GraphDataClassString["KC"]

AddIndexedClass

<<MathWorld`Graphs`

rules=Flatten[Table[RecognizeGraph[KCGraph[n,r],"Cache"->"InternalOnly"]->{n,r},{n,30},{r,3,30}]]

addrules=DeleteCases[rules,HoldPattern[{}->_]]

AddIndexedClass["KC",addrules,"14.3"]

RenameGraphFiles[]

GraphDataString

<<MathWorld`Graphs`

new=Cases[Flatten[Table[RecognizeGraph[KCGraph[n,r],"Cache"->"InternalOnly"]->{n,r},{n,10},{r,3,10}]],HoldPattern[{}->nr_]:>nr]

Length[new]

todo={{10,4},{10,5},{10,6},{10,7},{10,8},{10,9},{10,10}};

file=OpenAppend["~/kc.m"]

WriteString[file,
GraphDataString[KCGraph[#,#2],
"StandardName"->{"KC",{#,#2}},
"Name"->"("<>ToString[#]<>","<>ToString[#]<>")\[Hyphen]KC graph",
"Classes"->{"KC"},
"NotationRules"->{"KC"->{#,#2}},
"Information"->"KCGraph",
"Notation"->Row[{Subscript["K",#1],"\[Square]",Subscript["C",#2]}],
"Skip"->{"Arboricity","ChromaticPolynomial","ConnectedDominatingSet","ConnectedInducedSubgraphPolynomial","ConnectedInducedSubgraphs","ConstructionNumber","Cycles","CyclicEdgeConnectivity","ErdosSequence","GracefulLabeling","HadwigerNumber","HamiltonianPaths","IntersectionNumber","IrredundancePolynomial","IrredundantSets","LinklesslyEmbeddable","MatchingGeneratingPolynomial","MaximalIndependentEdgeSet","MinimumConnectedDominatingSet","MinimumEdgeCuts","MinimumPathCoverings","MinimumVertexCuts","Minors","ProjectivePlanar","QuadraticEmbeddingConstant","Skewness","Thickness","TuttePolynomial","VertexCuts"},
TimeConstraint->10
]]&@@@todo;

Close[file]