Square-Free Graph

Author

Eric W. Weisstein
January 6, 2024

This notebook downloaded from http://mathworld.wolfram.com/notebooks/GraphTheory/Square-FreeGraph.nb.

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

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

Counts

All

A006786

Total[Boole[Get[#]]]&/@FileNames["*.m",FileNameJoin[{$GraphDataDirectory,"Nodes","SquareFree"}]]

Table[Total[Boole[SquareFreeGraphQ/@Graphs[n]]],{n,10}]//Timing

Table[Length@GraphData["SquareFree",n],{n,10}]

Connected

A077269

Table[Total[Boole[Get[FileNameJoin[{$GraphDataDirectory,"Nodes","SquareFree","SquareFree_"<>If[n<10,"0",""]<>ToString[n]<>".m"}]][[ConnectedGraphIndices[n]]]]],{n,10}]

Table[Total[Boole[SquareFreeGraphQ/@ConnectedGraphs[n]]],{n,10}]//Timing

Table[Length@GraphData[{"SquareFree","Connected"},n],{n,10}]

Disconnected

Not in OEIS 2017-05-16

Table[Total[Boole[Get[FileNameJoin[{$GraphDataDirectory,"Nodes","SquareFree","SquareFree_"<>If[n<10,"0",""]<>ToString[n]<>".m"}]][[DisconnectedGraphIndices[n]]]]],{n,10}]

Table[Length@GraphData[{"SquareFree","Disconnected"},n],{n,10}]

Figures

All

GraphicsGrid[Map[Show[GraphData[#]//StyleGraphs,PlotLabel->TextCell[GraphData[#,"Name"],PageWidth->80,TextAlignment->Center],BaseStyle->Directive[Black,Italic,10,FontFamily->"Times"]]&,Flatten[Partition[#,UpTo[7]]&/@(GraphData["SquareFree",#]&/@Range[5]),1],{2}],ImageSize->700,Alignment->Top,Dividers->All]

Connected

GraphicsGrid[Map[Show[GraphData[#]//StyleGraphs,PlotLabel->TextCell[GraphData[#,"Name"],PageWidth->80,TextAlignment->Center],BaseStyle->Directive[Black,Italic,10,FontFamily->"Times"]]&,Flatten[Partition[#,UpTo[7]]&/@(GraphData[{"Connected","SquareFree"},#]&/@Range[6]),1],{2}],ImageSize->500,Alignment->Top,Dividers->All]

Parametrized families

Alkane

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

AlternatingGroupGraph

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

Andrasfai

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

Antelope n×n

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

Antiprism

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

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

Apollonian

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

Barbell

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

BlackBishop n×n

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

Bishop n×n

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

Book

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

Bruhat

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

Camel n×n

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

Centipede

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

CocktailParty

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

Complete

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

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

CompleteBipartite m×n

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

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

CompleteBipartite n×n

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

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

CompleteTripartite k×m×n

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

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

CompleteTripartite n×n×n

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

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

CrossedPrism

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

Crown

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

CubeConnectedCycle

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

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

Cycle

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

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

CycleComplement

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

DiagonalIntersection

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

Dipyramid

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

DorogovtsevGoltsevMendes

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

DoubleCone

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

Empty

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

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

FibonacciCube

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

Fiveleaper n×n

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

Flower

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

FoldedCube

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

Gear

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

GeneralizedPetersen

DeleteCases[{nr=GraphData[#,"NotationRules","GeneralizedPetersen"],Divisible@@nr,GraphData[#,"SquareFree"]}&/@GraphData["GeneralizedPetersen"],{_,x_,x_}]

Giraffe n×n

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

Goldberg

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

Grid m×n

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

DeleteCases[Flatten[Table[{
{m,n},
GraphData[{"Grid",{m,n}},"SquareFree"],
Piecewise[{{True,Min[m,n]==1}},False]
},{n,10},{m,n}],1],{_,x_,x_}]

Grid n×n

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

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

Grid k×m×n

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

DeleteCases[Sort@Flatten[Table[{
{k,m,n},
GraphData[{"Grid",{k,m,n}},"SquareFree"],
Piecewise[{{True,k m n==Max[k,m,n]}},False]
},{n,5},{m,n},{k,m}],2],
{_,x_,x_}]

Grid n×n×n

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

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

HalvedCube

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

Hanoi

seq=Table[GraphData[{"Hanoi",n},"SquareFree"],{n,5}]

Helm

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

Hypercube

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

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

Keller

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

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

King n×n

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

Knight m×n

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

DeleteCases[Flatten[Table[{
{m,n},
GraphData[{"Knight",{m,n}},"SquareFree"],
Piecewise[{{True,Min[m,n]<3||(Min[m,n]==3&&Max[m,n]<5)}},False]
},{n,10},{m,n}],1],{_,x_,x_}]

Knight n×n

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

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

Ladder

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

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

LadderRung

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

LucasCube

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

MengerSponge

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

MoebiusLadder

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

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

Mycielski

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

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

Odd

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

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

Pan

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

Path

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

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

PathComplement

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

Pell

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

Prism

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

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

Queen n×n

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

Rook n×n

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

RookComplement n×n

seq=Table[GraphData[{"RookComplement",{n,n}},"SquareFree"],{n,10}]

SierpinskiCarpet

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

SierpinskiGasket

seq=Table[GraphData[{"SierpinskiGasket",n},"SquareFree"],{n,5}]

SierpinskiTetrahedron

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

Spoke n×n

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

StackedBook

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

StackedPrism

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

Star

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

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

Sun

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

Sunlet

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

TorusGrid n×n

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

Transposition

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

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

Trapezohedron

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

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

Triangular

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

TriangularGrid

seq=Table[GraphData[{"TriangularGrid",n},"SquareFree"],{n,0,10}]

TriangularHoneycombAcuteKnight

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

TriangularHoneycombBishop

seq=Table[GraphData[{"TriangularHoneycombBishop",n},"SquareFree"],{n,9}]

TriangularHoneycombObtuseKnight

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

TriangularHoneycombQueen

seq=Table[GraphData[{"TriangularHoneycombQueen",n},"SquareFree"],{n,10}]

TriangularHoneycombRook

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

TriangularSnake

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

Web

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

Wheel

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

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

WheelComplement

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

WhiteBishop n×n

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

Zebra n×n

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

Table

Sort[{GraphData[#,"Name"],GraphData[#,"VertexCount"]}&/@GraphData["SquareFree"],Last[#1]<=Last[#2]&]//TableForm