Triangle-Free Graph

Author

Eric W. Weisstein
January 6, 2024

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

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

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

Counts

All

A006785

1, 2, 3, 7, 14, 38, 107, 410, 1897, 12172, 105071, 1262180, 20797002, 467871369, 14232552452, 581460254001, 31720840164950

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

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

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

Connected

A024607

1, 1, 1, 3, 6, 19, 59, 267, 1380, 9832, 90842, 1144061, 19425052, 445781050, 13743625184, 566756900370, 31125101479652

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

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

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

Disconnected

Not in OEIS 2017-05-16

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

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

Figures

Connected

GraphicsGrid[Flatten[Table[Partition[GraphData/@GraphData[{"Connected","TriangleFree"},n]/.g_System`Graph:>SetProperty[g,{VertexSize->If[n==1,.025,{"Scaled",.1}],System`VertexStyle->Red,System`EdgeStyle->Black}],UpTo[7]],{n,6}],1],ImageSize->500,Spacings->80]

All

GraphicsGrid[Flatten[Table[Partition[GraphData/@GraphData["TriangleFree",n]/.g_System`Graph:>SetProperty[g,{VertexSize->If[n==1,.025,{"Scaled",.1}],System`VertexStyle->Red,System`EdgeStyle->Black}],UpTo[7]],{n,5}],1],ImageSize->500,Spacings->80]

Parametrized families

Alkane

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

AlternatingGroupGraph

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

Andrasfai

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

Antelope n×n

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

Antiprism

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

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

Apollonian

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

Barbell

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

BlackBishop n×n

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

Bishop n×n

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

Book

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

Bruhat

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

Camel n×n

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

Centipede

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

CocktailParty

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

Complete

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

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

CompleteBipartite m×n

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

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

CompleteBipartite n×n

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

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

CompleteTripartite k×m×n

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

DeleteCases[Flatten[Table[{
{k,m,n},
GraphData[{"CompleteTripartite",{k,m,n}},"TriangleFree"],
False
},{n,10},{m,n},{k,m}],2],{_,x_,x_}]

CompleteTripartite n×n×n

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

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

CrossedPrism

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

Crown

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

CubeConnectedCycle

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

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

Cycle

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

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

CycleComplement

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

DiagonalIntersection

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

Dipyramid

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

DorogovtsevGoltsevMendes

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

DoubleCone

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

Empty

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

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

FibonacciCube

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

Fiveleaper n×n

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

Flower

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

FoldedCube

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

Gear

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

GeneralizedPetersen

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

Giraffe n×n

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

Goldberg

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

Grid m×n

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

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

Grid n×n

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

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

Grid k×m×n

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

DeleteCases[Sort@Flatten[Table[{
{k,m,n},
GraphData[{"Grid",{k,m,n}},"TriangleFree"],
True
},{n,5},{m,n},{k,m}],2],
{_,x_,x_}]

Grid n×n×n

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

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

HalvedCube

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

Hanoi

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

Helm

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

Hypercube

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

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

Keller

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

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

King n×n

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

Knight m×n

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

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

Knight n×n

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

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

Ladder

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

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

LadderRung

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

LucasCube

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

MengerSponge

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

MoebiusLadder

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

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

Mycielski

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

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

Odd

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

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

Pan

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

Path

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

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

PathComplement

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

Pell

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

Prism

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

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

Queen n×n

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

Rook n×n

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

RookComplement n×n

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

SierpinskiCarpet

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

SierpinskiGasket

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

SierpinskiTetrahedron

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

Spoke n×n

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

StackedBook

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

StackedPrism

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

Star

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

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

Sun

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

Sunlet

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

TorusGrid n×n

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

Transposition

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

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

Trapezohedron

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

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

Triangular

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

TriangularGrid

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

TriangularHoneycombAcuteKnight

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

TriangularHoneycombBishop

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

TriangularHoneycombObtuseKnight

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

TriangularHoneycombQueen

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

TriangularHoneycombRook

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

TriangularSnake

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

Web

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

Wheel

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

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

WheelComplement

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

WhiteBishop n×n

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

Zebra n×n

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