Coprime Graph

Author

Eric W. Weisstein
June 28, 2026

This notebook downloaded from https://mathworld.wolfram.com/notebooks/GraphTheory/CoprimeGraph.nb.

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

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

Examples

GraphData["Coprime"]

Table[CoprimeGraph[n,VertexLabels->"Name"],{n,12}]

Figure

GraphicsGrid[Partition[StyleGraphs@Table[CoprimeGraph[n,VertexLabels->Automatic,GraphLayout->"CircularEmbedding"],{n,8}],UpTo[4]],Dividers->All]

Embeddings

<<MathWorld`Graphs`

{"Coprime", 1} == "SingletonGraph"

Names

GraphData[{"Coprime",1},"StandardName"]

GraphData[{"Coprime",1},"StandardNames"]

{"Coprime", 2} == {"Path", 2}

Names

GraphData[{"Coprime",2},"StandardName"]

GraphData[{"Coprime",2},"StandardNames"]

{"Coprime", 3} == "TriangleGraph"

Names

GraphData[{"Coprime",3},"StandardName"]

GraphData[{"Coprime",3},"StandardNames"]

{"Coprime", 4} == "DiamondGraph"

Names

GraphData[{"Coprime",4},"StandardName"]

GraphData[{"Coprime",4},"StandardNames"]

{"Coprime", 5} == {"Dipyramid", 3}

Names

GraphData[{"Coprime",5},"StandardName"]

GraphData[{"Coprime",5},"StandardNames"]

{"Coprime", 6}

Names

GraphData[{"Coprime",6},"StandardName"]

GraphData[{"Coprime",6},"StandardNames"]

HouseOfGraphs

hogid=GraphData[{"Coprime",6},"NotationRules","HouseOfGraphs"]

HouseOfGraphsLookup[hogid]

HouseOfGraphsGraph[hogid]//StyleGraphs[#,ImageSize->Small]&

HouseOfGraphs construction

HouseOfGraphsGraph[hogid]

GraphPlot@

v=CirclePoints[{1,Pi/2},4];
v=Join[v,Subdivide[{0,0},v[[3]],3][[2;;-2]]];
Graph[Range@Length@v,{},VertexCoordinates->v,VertexLabels->Automatic]

g=RotateGraph[FindCorrespondingGraph[,v],Pi]

RecognizeGraph@g

DegenerateGraphEmbeddingTypes@g

Wikidata

GraphData[{"Coprime",6},"WikidataID"]

GraphData[{"Coprime",6},"WikidataID","URL"]

Primary

GraphData[{"Coprime",6}]//StyleGraphs[#,ImageSize->Small]&

All

GraphData[{"Coprime",6},"Graph","All"]//StyleGraphs

CurvedEdge

GraphData[{"Coprime",6},"Graph","CurvedEdge"]//StyleGraphs

Inexact

Select[GraphData[{"Coprime",6},"Graph","All"],(!FreeQ[GraphEmbedding[#],_?InexactNumberQ]&)]//StyleGraphs

Degenerate

GraphData[{"Coprime",6},"Graph","Degenerate"]//StyleGraphs

DegenerateGraphEmbeddingTypes/@GraphData[{"Coprime",6},"Graph","Degenerate"]//Column

Embeddings

GraphDataEmbeddings[GraphData[{"Coprime",6}]]

Default embedding

g0=RotateGraph[GraphPlot[Graph[GraphData[{"Coprime",6},"VertexList"],GraphData[{"Coprime",6},"Edges"]]],-Pi/2]

g=RotateGraph[FindCorrespondingGraph[,CirclePoints[{1,Pi/2},6]],Pi]

RecognizeGraph@g

g=FindCorrespondingGraph[,{{0,0},{1/2,0},{1,0},{1,1},{0,1},{1/2,1+Sqrt[3]/2}}]

RecognizeGraph@g

gs={,};

Configuration

GraphData[{"Coprime",6},"Configuration"]

configurations=GraphData[{"Coprime",6},"Graph","Configuration"]//StyleGraphs

GeneralizedPetersen

GraphData[{"Coprime",6},"Graph","GeneralizedPetersen"]//StyleGraphs

IGraph

GraphData[{"Coprime",6},"Graph","IGraph"]//StyleGraphs

CompleteKPartite

GraphData[{"Coprime",6},"Graph","CompleteKPartite"]//StyleGraphs

Bipartite

GraphData[{"Coprime",6},"Bipartite"]

GraphData[{"Coprime",6},"Graph","Bipartite"]//StyleGraphs

Bilateral

GraphData[{"Coprime",6},"Graph","Bilateral"]//StyleGraphs

Grid[DeleteCases[Monitor[{g=#,BilateralGraphEmbeddingTypes[#],GraphSymmetryGroup[#]}&/@GraphData[{"Coprime",6},"Graph","All"],g],{_,_,TransformationGroup[{}]}],Dividers->All,Alignment->{{Center,{Left}}}]//Quiet

Circular

GraphData[{"Coprime",6},"Graph","Circular"]//StyleGraphs

Circular construction All

GraphData[{"Coprime",6},"Hamiltonian"]

GraphData[{"Coprime",6},"HamiltonianCycles"]

GraphData[{"Coprime",6},"HamiltonianCycleCount"]

GraphData[{"Coprime",6},"LCF"]

GraphData[{"Coprime",6},"LCFSignature"]

Length[hc=FindHamiltonianCycle[GraphData[{"Coprime",6}],All][[All,All,1]]]//Timing

Length[hcsym=SymmetricHamiltonianCycles[GraphData[{"Coprime",6}],hc,ProgressReporting->True]]//Timing

GroupBy[SymmetricHamiltonianCycleGraph[GraphData[{"Coprime",6}],#]&/@hcsym,GraphSymmetryGroup]

Planar

GraphData[{"Coprime",6},"Planar"]

GraphData[{"Coprime",6},"Graph","Planar"]//StyleGraphs

Planar construction

PlanarGraphEmbedding[GraphData[{"Coprime",6}],GraphLayout->#]&/@{"TutteLayout","DavidsonHarelLayout"}

Table[PlanarGraphEmbedding[GraphData[{"Coprime",6}]],10]

PlanarGraphEmbeddings

GraphData[{"Coprime",6},"PlanarEmbeddingCount"]

(plemb=PlanarGraphEmbeddings[GraphData[{"Coprime",6}],Debug->True])//Timing

Length[plemb]

MinimalCrossing

GraphData[{"Coprime",6},"CN"]

(gs=GraphData[{"Coprime",6},"Graph","MinimalCrossing"])//StyleGraphs

GraphCrossingCount/@gs

GraphCrossingDiagram/@gs

MinimalRectilinearCrossing

GraphData[{"Coprime",6},"RCN"]

GraphData[{"Coprime",6},"Graph","MinimalRectilinearCrossing"]//StyleGraphs

MinimalCrossing construction Tutte

(cn=CrossingNumber[GraphData[{"Coprime",6}],TimeConstraint->1])//AbsoluteTiming

(g=MinimalCrossingGraph[GraphData[{"Coprime",6}],"CrossingNumber"->cn])//PolyhedralGraphQ//AbsoluteTiming

MinimalLocalCrossing

GraphData[{"Coprime",6},{"LocalCrossingNumber","RectilinearLocalCrossingNumber"}]

GraphData[{"Coprime",6},"Graph","MinimalLocalCrossing"]//StyleGraphs

MinimalRectilinearLocalCrossing

GraphData[{"Coprime",6},{"LocalCrossingNumber","RectilinearLocalCrossingNumber"}]

GraphData[{"Coprime",6},"Graph","MinimalRectilinearLocalCrossing"]//StyleGraphs

Circulant

GraphData[{"Coprime",6},"Circulant"]

GraphData[{"Coprime",6},"Graph","Circulant"]//StyleGraphs

Circulant construction

GraphData[{"Coprime",6},"NotationRules","Circulant"]

(ci=CirculantIndices[GraphData[{"Coprime",6}]])//AbsoluteTiming

CirculantGraph1@@@ci

Cases[GraphData[{"Coprime",6},"StandardNames"],{"Circulant",i_}:>i]

CirculantGraph1@@@%

Complement graph

compl=GraphData[{"Coprime",6},"ComplementGraph","Name"]

GraphData[compl,"Graph","All"]

gs=GraphComplement/@%

Select[%,!DegenerateGraphEmbeddingQ[#]&]

Line graph

GraphData[{"Coprime",6},"Line"]

LineGraphQ[GraphData[{"Coprime",6}]]//Timing

RootGraph

roots=Select[GraphData[All],GraphData[#,"LineGraph","Name"]==={"Coprime",6}&]

RootGraph[GraphData[{"Coprime",6}]]

Halin

GraphData[{"Coprime",6},"Halin"]

GraphData[{"Coprime",6},"Graph","Halin"]//StyleGraphs

Rigid

GraphData[{"Coprime",6},"Rigid"]

GraphData[{"Coprime",6},"Graph","Rigid"]//StyleGraphs

Flexible

GraphData[{"Coprime",6},"Flexible"]

GraphData[{"Coprime",6},"Graph","Flexible"]//StyleGraphs

Voltage

GraphData[{"Coprime",6},"Graph","Voltage"]//StyleGraphs

Voltage construction

gs=VoltageGraph[GraphData[{"Coprime",6}],"MaxResults"->20,Debug->True]

Length[gs]

RecognizeGraph/@gs

VoltageGraphNotation/@gs//Column

EmbeddingClasses/@gs//Column

GraphSymmetryGroup/@gs//Column

LCF

GraphData[{"Coprime",6},"LCF"]

GraphData[{"Coprime",6},"HamiltonianCycleCount"]

GraphData[{"Coprime",6},"LCFSignature"]

GraphData[{"Coprime",6},"LCFNotations"]

GraphData[{"Coprime",6},"Graph","LCF"]//StyleGraphs

Tally[LCFNotation[#][[2]]&/@%]

UnitDistance

GraphData[{"Coprime",6},"UnitDistance"]

UnitDistanceGraphQ[GraphData[{"Coprime",6}],Debug->True]//Timing

GraphData[{"Coprime",6},"Graph","UnitDistance"]//StyleGraphs

UnitDistance by refinement of default embeddings

Graph[edge list]

(g=UnitDistanceEmbeddingRefine[Graph[GraphData[{"Coprime",6},"EdgeList"]],MaxIterations->500])//Timing

UnitDistanceGraphEmbeddingQ[g]

Graph[vertex list, edge list]

(g=UnitDistanceEmbeddingRefine[Graph[GraphData[{"Coprime",6},"VertexList"],GraphData[{"Coprime",6},"EdgeList"]],MaxIterations->500])//Timing

UnitDistanceGraphEmbeddingQ[g]

UnitDistance by refinement of existing embeddings

gs=UnitDistanceEmbeddingRefine[Graph[VertexList[#],EdgeList[#],VertexCoordinates->GraphEmbedding[#]],MaxIterations->500]&/@Complement@@(GraphData[{"Coprime",6},"Graph",#]&/@{"All","UnitDistance"})

TextGrid[
gdata=SortBy[
{#,DegenerateGraphEmbeddingQ[#],GraphSymmetryGroup[#],Max[Abs[EdgeLengths[#]-1]]}&/@gs,
Last
],
Dividers->All
]

Cases[gdata,{__,0.}]

Symmetric:

gs=Cases[
gdata,
{g_,_,sym:Except[TransformationGroup[{}]],diff_}:>{
HighlightGraph[g1=BilateralGraph[CenterGraph[g],"ReturnNonbilateralGraph"->True],Flatten[FindCoincidentVertices[g1]]],
sym,
diff
}]

UnitDistance by FindUnitDistanceEmbedding  (random embeddings returning on messages)

gs=FindUnitDistanceEmbedding[GraphData[{"Coprime",6}],50,"ReturnWithMessage"->True];//Quiet//Timing

gdata=SortBy[
{#,Max[Abs[EdgeLengths[#]-1]]}&/@gs,
Last
]

Cases[gdata,{g_?UnitDistanceGraphEmbeddingQ,_}:>g]

SymmetricEmebddings=Select[gdata,GraphSymmetryGroup[#[[1]]]=!=TransformationGroup[{}]&]

UnitDistance by FindUnitDistanceEmbedding  (random embedding waiting until UD is found)

FindUnitDistanceEmbedding[GraphData[{"Coprime",6}],"ReturnWithMessage"->False]//Quiet//Timing

Matchstick

GraphData[{"Coprime",6},"Matchstick"]

GraphData[{"Coprime",6},"Graph","Matchstick"]//StyleGraphs

3D default

Graph3D[GraphData[{"Coprime",6},"Edges"]]

3D construction

3D All

GraphData[{"Coprime",6},"Graph",{"3D","All"}]

3D UnitDistance construction Random

GraphData[{"Coprime",6},"Dimension"]

(g=UnitDistanceEmbeddingRefine[
Graph3D[
GraphData[{"Coprime",6},"VertexList"],
GraphData[{"Coprime",6},"EdgeList"]
],
WorkingPrecision->25])//Timing

EdgeLengths[g]

UnitDistanceGraphEmbeddingQ[g]

3D UnitDistance

GraphData[{"Coprime",6},"Graph",{"3D","UnitDistance"}]

3D Polyhedron

GraphData[{"Coprime",6},"Polyhedral"]

GraphData[{"Coprime",6},"Graph",{"3D","Polyhedron"}]

{"Coprime", 7}

Names

GraphData[{"Coprime",7},"StandardName"]

GraphData[{"Coprime",7},"StandardNames"]

HouseOfGraphs

hogid=GraphData[{"Coprime",7},"NotationRules","HouseOfGraphs"]

HouseOfGraphsLookup[hogid]

HouseOfGraphsGraph[hogid]//StyleGraphs[#,ImageSize->Small]&

Wikidata

GraphData[{"Coprime",7},"WikidataID"]

GraphData[{"Coprime",7},"WikidataID","URL"]

Primary

GraphData[{"Coprime",7}]//StyleGraphs[#,ImageSize->Small]&

All

GraphData[{"Coprime",7},"Graph","All"]//StyleGraphs

CurvedEdge

GraphData[{"Coprime",7},"Graph","CurvedEdge"]//StyleGraphs

Inexact

Select[GraphData[{"Coprime",7},"Graph","All"],(!FreeQ[GraphEmbedding[#],_?InexactNumberQ]&)]//StyleGraphs

Degenerate

GraphData[{"Coprime",7},"Graph","Degenerate"]//StyleGraphs

DegenerateGraphEmbeddingTypes/@GraphData[{"Coprime",7},"Graph","Degenerate"]//Column

Embeddings

GraphDataEmbeddings[GraphData[{"Coprime",7}]]

Default embedding

g0=GraphPlot[Graph[GraphData[{"Coprime",7},"VertexList"],GraphData[{"Coprime",7},"Edges"]]]

Configuration

GraphData[{"Coprime",7},"Configuration"]

configurations=GraphData[{"Coprime",7},"Graph","Configuration"]//StyleGraphs

GeneralizedPetersen

GraphData[{"Coprime",7},"Graph","GeneralizedPetersen"]//StyleGraphs

IGraph

GraphData[{"Coprime",7},"Graph","IGraph"]//StyleGraphs

CompleteKPartite

GraphData[{"Coprime",7},"Graph","CompleteKPartite"]//StyleGraphs

Bipartite

GraphData[{"Coprime",7},"Bipartite"]

GraphData[{"Coprime",7},"Graph","Bipartite"]//StyleGraphs

Bilateral

GraphData[{"Coprime",7},"Graph","Bilateral"]//StyleGraphs

Grid[DeleteCases[Monitor[{g=#,BilateralGraphEmbeddingTypes[#],GraphSymmetryGroup[#]}&/@GraphData[{"Coprime",7},"Graph","All"],g],{_,_,TransformationGroup[{}]}],Dividers->All,Alignment->{{Center,{Left}}}]//Quiet

Circular

GraphData[{"Coprime",7},"Graph","Circular"]//StyleGraphs

Circular construction All

GraphData[{"Coprime",7},"Hamiltonian"]

GraphData[{"Coprime",7},"HamiltonianCycles"]

GraphData[{"Coprime",7},"HamiltonianCycleCount"]

GraphData[{"Coprime",7},"LCF"]

GraphData[{"Coprime",7},"LCFSignature"]

Length[hc=FindHamiltonianCycle[GraphData[{"Coprime",7}],All][[All,All,1]]]//Timing

CircularEmbeddingFromHamiltonianCycle[GraphData[{"Coprime",7}],#]&/@hc

Length[hcsym=SymmetricHamiltonianCycles[GraphData[{"Coprime",7}],hc,ProgressReporting->True]]//Timing

GroupBy[SymmetricHamiltonianCycleGraph[GraphData[{"Coprime",7}],#]&/@hcsym,GraphSymmetryGroup]

Planar

GraphData[{"Coprime",7},"Planar"]

GraphData[{"Coprime",7},"Graph","Planar"]//StyleGraphs

MinimalCrossingNumber crossings.uos.de [verified 3]

CrossingNumber[GraphData[{"Coprime",7}],Method->"WebCompute"]//AbsoluteTiming

DateString[]

MinimalCrossingNumber: "EmbeddingScheme" -> 1

(cn=CrossingNumber[GraphData[{"Coprime",7}],"EmbeddingScheme"->1,TimeConstraint->1])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",7}],"EmbeddingScheme"->1,TimeConstraint->10])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",7}],"EmbeddingScheme"->1,TimeConstraint->60])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",7}],"EmbeddingScheme"->1,TimeConstraint->3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",7}],"EmbeddingScheme"->1,TimeConstraint->5 3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",7}],"EmbeddingScheme"->1,TimeConstraint->86400])//AbsoluteTiming

MinimalCrossingNumber: "EmbeddingScheme" -> 2

(cn=CrossingNumber[GraphData[{"Coprime",7}],"EmbeddingScheme"->2,TimeConstraint->1])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",7}],"EmbeddingScheme"->2,TimeConstraint->10])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",7}],"EmbeddingScheme"->2,TimeConstraint->60])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",7}],"EmbeddingScheme"->2,TimeConstraint->3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",7}],"EmbeddingScheme"->2,TimeConstraint->5 3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",7}],"EmbeddingScheme"->2,TimeConstraint->86400])//AbsoluteTiming

MinimalCrossingNumber: "EmbeddingScheme" -> 3

(cn=CrossingNumber[GraphData[{"Coprime",7}],"EmbeddingScheme"->3,TimeConstraint->1])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",7}],"EmbeddingScheme"->3,TimeConstraint->10])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",7}],"EmbeddingScheme"->3,TimeConstraint->60])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",7}],"EmbeddingScheme"->3,TimeConstraint->3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",7}],"EmbeddingScheme"->3,TimeConstraint->5 3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",7}],"EmbeddingScheme"->3,TimeConstraint->86400])//AbsoluteTiming

MinimalCrossing

GraphData[{"Coprime",7},"CN"]

(gs=GraphData[{"Coprime",7},"Graph","MinimalCrossing"])//StyleGraphs

GraphCrossingCount/@gs

GraphCrossingDiagram/@gs

MinimalRectilinearCrossing

GraphData[{"Coprime",7},"RCN"]

GraphData[{"Coprime",7},"Graph","MinimalRectilinearCrossing"]//StyleGraphs

MinimalCrossing construction Tutte

(cn=CrossingNumber[GraphData[{"Coprime",7}],TimeConstraint->1])//AbsoluteTiming

(g=MinimalCrossingGraph[GraphData[{"Coprime",7}],"CrossingNumber"->cn])//PolyhedralGraphQ//AbsoluteTiming

MinimalCrossing construction Random 1k [96 s: 2/0/0]

(cn=CrossingNumber[GraphData[{"Coprime",7}],TimeConstraint->1])//AbsoluteTiming

Length[diagrams=DistinctMinimalCrossingDiagramData[
GraphData[{"Coprime",7}],
1000,
"CrossingNumber"->cn,
EdgeShapeFunction->"BezierEdge"
]]//AbsoluteTiming

diagrams

No crossing points on the boundary:

Length[diagrams0=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==0&],"Graph",{}]]//Timing

Take[diagrams0,UpTo[10]]

One crossing point on the boundary:

Length[diagrams1=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==1&],"Graph",{}]]//Timing

Take[diagrams1,UpTo[10]]

graphs=#["Graph"]&/@diagrams;

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[#]
}&/@graphs;//AbsoluteTiming

MaxMemoryUsed[]/10^9.GB

Symmetric embeddings:

Length[SymmetricMinimalEmbeddingData=DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]
]//AbsoluteTiming

SymmetricMinimalEmbeddingData

SymmetricMinimalEmbeddingGraphs=SymmetricMinimalEmbeddingData[[All,1]]

GraphCrossingCount/@SymmetricMinimalEmbeddingGraphs

GraphCrossingDiagram/@SymmetricMinimalEmbeddingGraphs

MinimalCrossing construction Random 5k [567 s: 2/0/0]

(cn=CrossingNumber[GraphData[{"Coprime",7}],TimeConstraint->1])//AbsoluteTiming

Length[diagrams=DistinctMinimalCrossingDiagramData[
GraphData[{"Coprime",7}],
5000,
"CrossingNumber"->cn,
EdgeShapeFunction->"BezierEdge"
]]//AbsoluteTiming

No crossing points on the boundary:

Length[diagrams0=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==0&],"Graph",{}]]//Timing

Take[diagrams0,UpTo[10]]

One crossing point on the boundary:

Length[diagrams1=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==1&],"Graph",{}]]//Timing

Take[diagrams1,UpTo[10]]

graphs=#["Graph"]&/@diagrams;

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[#]
}&/@graphs;//AbsoluteTiming

MaxMemoryUsed[]/10^9.GB

Symmetric embeddings:

Length[SymmetricMinimalEmbeddingData=DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]
]//AbsoluteTiming

SymmetricMinimalEmbeddingData

SymmetricMinimalEmbeddingGraphs=SymmetricMinimalEmbeddingData[[All,1]]

GraphCrossingCount/@SymmetricMinimalEmbeddingGraphs

GraphCrossingDiagram/@SymmetricMinimalEmbeddingGraphs

MinimalCrossing construction Random 20k [2648 s: 2/0/0]

(cn=CrossingNumber[GraphData[{"Coprime",7}],TimeConstraint->1])//AbsoluteTiming

Length[diagrams=DistinctMinimalCrossingDiagramData[
GraphData[{"Coprime",7}],
20*^3,
"CrossingNumber"->cn,
EdgeShapeFunction->"BezierEdge"
]]//AbsoluteTiming

No crossing points on the boundary:

Length[diagrams0=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==0&],"Graph",{}]]//Timing

Take[diagrams0,UpTo[10]]

One crossing point on the boundary:

Length[diagrams1=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==1&],"Graph",{}]]//Timing

Take[diagrams1,UpTo[10]]

graphs=#["Graph"]&/@diagrams;

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[#]
}&/@graphs;//AbsoluteTiming

MaxMemoryUsed[]/10^9.GB

Symmetric embeddings:

Length[SymmetricMinimalEmbeddingData=DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]
]//AbsoluteTiming

SymmetricMinimalEmbeddingData

SymmetricMinimalEmbeddingGraphs=SymmetricMinimalEmbeddingData[[All,1]]

GraphCrossingCount/@SymmetricMinimalEmbeddingGraphs

GraphCrossingDiagram/@SymmetricMinimalEmbeddingGraphs

MinimalCrossing construction Random 1k [old]

(cn=CrossingNumber[GraphData[{"Coprime",7}],TimeConstraint->1])//AbsoluteTiming

(RandomGraphs=Table[MinimalCrossingGraph[GraphData[{"Coprime",7}],"CrossingNumber"->cn,RandomSeed->n],{n,1000}]//Union);//Timing

RandomGraphsWithOuterCrossingPointCounts={
#,
Count[OuterFace[#],_?(GreaterThan[GraphData[{"Coprime",7},"V"]])]
}&/@RandomGraphs;

Small numbers of crossing points on the boundary:

Cases[RandomGraphsWithOuterCrossingPointCounts,{g_,0}:>g]

Cases[RandomGraphsWithOuterCrossingPointCounts,{g_,1}:>g]

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[
#,
AdditionalData->Join[Table[True,GraphData[{"Coprime",7},"V"]],Table[False,cn]],
SameTest->Equal
]
}&/@RandomGraphs;

MaxMemoryUsed[]/10^9.GB

DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]/.g_Graph:>BilateralGraph[CenterGraph@g,"ReturnNonbilateralGraph"->True]

MinimalCrossing construction Random 20k [old]

(cn=CrossingNumber[GraphData[{"Coprime",7}],TimeConstraint->1])//AbsoluteTiming

(RandomGraphs=Table[MinimalCrossingGraph[GraphData[{"Coprime",7}],"CrossingNumber"->cn,RandomSeed->n],{n,20000}]//Union);//Timing

RandomGraphsWithOuterCrossingPointCounts={
#,
Count[OuterFace[#],_?(GreaterThan[GraphData[{"Coprime",7},"V"]])]
}&/@RandomGraphs;

Small numbers of crossing points on the boundary:

Cases[RandomGraphsWithOuterCrossingPointCounts,{g_,0}:>g]

Cases[RandomGraphsWithOuterCrossingPointCounts,{g_,1}:>g]

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[
#,
AdditionalData->Join[Table[True,GraphData[{"Coprime",7},"V"]],Table[False,cn]],
SameTest->Equal
]
}&/@RandomGraphs;

MaxMemoryUsed[]/10^9.GB

DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]/.g_Graph:>BilateralGraph[CenterGraph@g,"ReturnNonbilateralGraph"->True]

MinimalLocalCrossing

GraphData[{"Coprime",7},{"LocalCrossingNumber","RectilinearLocalCrossingNumber"}]

GraphData[{"Coprime",7},"Graph","MinimalLocalCrossing"]//StyleGraphs

MinimalRectilinearLocalCrossing

GraphData[{"Coprime",7},{"LocalCrossingNumber","RectilinearLocalCrossingNumber"}]

GraphData[{"Coprime",7},"Graph","MinimalRectilinearLocalCrossing"]//StyleGraphs

MinimaRectilinearlLocalCrossing construction 1000

AdjacentCrossingsQ[g_Graph,cn_Integer]:=Module[{a=AdjacencyList[g],n=VertexCount[g]-cn},Max[Take[a,-cn]]>n]

(cn=CrossingNumber[GraphData[{"Coprime",7}],TimeConstraint->10])//AbsoluteTiming

(gs=Select[Table[MinimalCrossingGraph[GraphData[{"Coprime",7}],"CrossingNumber"->cn,RandomSeed->i],{i,1000}],!AdjacentCrossingsQ[#,cn]&]//Union)//Timing

MinimaRectilinearlLocalCrossing construction 20000

AdjacentCrossingsQ[g_Graph,cn_Integer]:=Module[{a=AdjacencyList[g],n=VertexCount[g]-cn},Max[Take[a,-cn]]>n]

(cn=CrossingNumber[GraphData[{"Coprime",7}],TimeConstraint->10])//AbsoluteTiming

(gs=Select[Table[MinimalCrossingGraph[GraphData[{"Coprime",7}],"CrossingNumber"->cn,RandomSeed->i],{i,20000}],!AdjacentCrossingsQ[#,cn]&]//Union)//Timing

Circulant

GraphData[{"Coprime",7},"Circulant"]

GraphData[{"Coprime",7},"Graph","Circulant"]//StyleGraphs

Circulant construction

GraphData[{"Coprime",7},"NotationRules","Circulant"]

(ci=CirculantIndices[GraphData[{"Coprime",7}]])//AbsoluteTiming

CirculantGraph1@@@ci

Cases[GraphData[{"Coprime",7},"StandardNames"],{"Circulant",i_}:>i]

CirculantGraph1@@@%

Complement graph

compl=GraphData[{"Coprime",7},"ComplementGraph","Name"]

GraphData[compl,"Graph","All"]

gs=GraphComplement/@%

Select[%,!DegenerateGraphEmbeddingQ[#]&]

Line graph

GraphData[{"Coprime",7},"Line"]

LineGraphQ[GraphData[{"Coprime",7}]]//Timing

RootGraph

roots=Select[GraphData[All],GraphData[#,"LineGraph","Name"]==={"Coprime",7}&]

Halin

GraphData[{"Coprime",7},"Halin"]

GraphData[{"Coprime",7},"Graph","Halin"]//StyleGraphs

Rigid

GraphData[{"Coprime",7},"Rigid"]

GraphData[{"Coprime",7},"Graph","Rigid"]//StyleGraphs

Flexible

GraphData[{"Coprime",7},"Flexible"]

GraphData[{"Coprime",7},"Graph","Flexible"]//StyleGraphs

Voltage

GraphData[{"Coprime",7},"Graph","Voltage"]//StyleGraphs

Voltage construction

gs=VoltageGraph[GraphData[{"Coprime",7}],"MaxResults"->20,Debug->True]

Length[gs]

RecognizeGraph/@gs

VoltageGraphNotation/@gs//Column

EmbeddingClasses/@gs//Column

GraphSymmetryGroup/@gs//Column

LCF

GraphData[{"Coprime",7},"LCF"]

GraphData[{"Coprime",7},"HamiltonianCycleCount"]

GraphData[{"Coprime",7},"LCFSignature"]

GraphData[{"Coprime",7},"LCFNotations"]

GraphData[{"Coprime",7},"Graph","LCF"]//StyleGraphs

Tally[LCFNotation[#][[2]]&/@%]

UnitDistance

GraphData[{"Coprime",7},"UnitDistance"]

UnitDistanceGraphQ[GraphData[{"Coprime",7}],Debug->True]//Timing

GraphData[{"Coprime",7},"Graph","UnitDistance"]//StyleGraphs

UnitDistance by refinement of default embeddings

Graph[edge list]

(g=UnitDistanceEmbeddingRefine[Graph[GraphData[{"Coprime",7},"EdgeList"]],MaxIterations->500])//Timing

UnitDistanceGraphEmbeddingQ[g]

Graph[vertex list, edge list]

(g=UnitDistanceEmbeddingRefine[Graph[GraphData[{"Coprime",7},"VertexList"],GraphData[{"Coprime",7},"EdgeList"]],MaxIterations->500])//Timing

UnitDistanceGraphEmbeddingQ[g]

UnitDistance by refinement of existing embeddings

gs=UnitDistanceEmbeddingRefine[Graph[VertexList[#],EdgeList[#],VertexCoordinates->GraphEmbedding[#]],MaxIterations->500]&/@Complement@@(GraphData[{"Coprime",7},"Graph",#]&/@{"All","UnitDistance"})

TextGrid[
gdata=SortBy[
{#,DegenerateGraphEmbeddingQ[#],GraphSymmetryGroup[#],Max[Abs[EdgeLengths[#]-1]]}&/@gs,
Last
],
Dividers->All
]

Cases[gdata,{__,0.}]

Symmetric:

gs=Cases[
gdata,
{g_,_,sym:Except[TransformationGroup[{}]],diff_}:>{
HighlightGraph[g1=BilateralGraph[CenterGraph[g],"ReturnNonbilateralGraph"->True],Flatten[FindCoincidentVertices[g1]]],
sym,
diff
}]

UnitDistance by FindUnitDistanceEmbedding  (random embeddings returning on messages)

gs=FindUnitDistanceEmbedding[GraphData[{"Coprime",7}],50,"ReturnWithMessage"->True];//Quiet//Timing

gdata=SortBy[
{#,Max[Abs[EdgeLengths[#]-1]]}&/@gs,
Last
]

Cases[gdata,{g_?UnitDistanceGraphEmbeddingQ,_}:>g]

SymmetricEmebddings=Select[gdata,GraphSymmetryGroup[#[[1]]]=!=TransformationGroup[{}]&]

UnitDistance by FindUnitDistanceEmbedding  (random embedding waiting until UD is found)

FindUnitDistanceEmbedding[GraphData[{"Coprime",7}],"ReturnWithMessage"->False]//Quiet//Timing

Matchstick

GraphData[{"Coprime",7},"Matchstick"]

GraphData[{"Coprime",7},"Graph","Matchstick"]//StyleGraphs

3D default

Graph3D[GraphData[{"Coprime",7},"Edges"]]

3D construction

3D All

GraphData[{"Coprime",7},"Graph",{"3D","All"}]

3D UnitDistance construction Random

GraphData[{"Coprime",7},"Dimension"]

(g=UnitDistanceEmbeddingRefine[
Graph3D[
GraphData[{"Coprime",7},"VertexList"],
GraphData[{"Coprime",7},"EdgeList"]
],
WorkingPrecision->25])//Timing

EdgeLengths[g]

UnitDistanceGraphEmbeddingQ[g]

3D UnitDistance

GraphData[{"Coprime",7},"Graph",{"3D","UnitDistance"}]

3D Polyhedron

GraphData[{"Coprime",7},"Polyhedral"]

GraphData[{"Coprime",7},"Graph",{"3D","Polyhedron"}]

{"Coprime", 8}

Names

GraphData[{"Coprime",8},"StandardName"]

GraphData[{"Coprime",8},"StandardNames"]

HouseOfGraphs

hogid=GraphData[{"Coprime",8},"NotationRules","HouseOfGraphs"]

HouseOfGraphsLookup[hogid]

HouseOfGraphsGraph[hogid]//StyleGraphs[#,ImageSize->Small]&

Wikidata

GraphData[{"Coprime",8},"WikidataID"]

GraphData[{"Coprime",8},"WikidataID","URL"]

Primary

GraphData[{"Coprime",8}]//StyleGraphs[#,ImageSize->Small]&

All

GraphData[{"Coprime",8},"Graph","All"]//StyleGraphs

CurvedEdge

GraphData[{"Coprime",8},"Graph","CurvedEdge"]//StyleGraphs

Inexact

Select[GraphData[{"Coprime",8},"Graph","All"],(!FreeQ[GraphEmbedding[#],_?InexactNumberQ]&)]//StyleGraphs

Degenerate

GraphData[{"Coprime",8},"Graph","Degenerate"]//StyleGraphs

DegenerateGraphEmbeddingTypes/@GraphData[{"Coprime",8},"Graph","Degenerate"]//Column

Embeddings

GraphDataEmbeddings[GraphData[{"Coprime",8}]]

Default embedding

g0=GraphPlot[Graph[GraphData[{"Coprime",8},"VertexList"],GraphData[{"Coprime",8},"Edges"]]]

Configuration

GraphData[{"Coprime",8},"Configuration"]

configurations=GraphData[{"Coprime",8},"Graph","Configuration"]//StyleGraphs

GeneralizedPetersen

GraphData[{"Coprime",8},"Graph","GeneralizedPetersen"]//StyleGraphs

IGraph

GraphData[{"Coprime",8},"Graph","IGraph"]//StyleGraphs

CompleteKPartite

GraphData[{"Coprime",8},"Graph","CompleteKPartite"]//StyleGraphs

Bipartite

GraphData[{"Coprime",8},"Bipartite"]

GraphData[{"Coprime",8},"Graph","Bipartite"]//StyleGraphs

Bilateral

GraphData[{"Coprime",8},"Graph","Bilateral"]//StyleGraphs

Grid[DeleteCases[Monitor[{g=#,BilateralGraphEmbeddingTypes[#],GraphSymmetryGroup[#]}&/@GraphData[{"Coprime",8},"Graph","All"],g],{_,_,TransformationGroup[{}]}],Dividers->All,Alignment->{{Center,{Left}}}]//Quiet

Circular

GraphData[{"Coprime",8},"Graph","Circular"]//StyleGraphs

Circular construction All

GraphData[{"Coprime",8},"Hamiltonian"]

GraphData[{"Coprime",8},"HamiltonianCycles"]

GraphData[{"Coprime",8},"HamiltonianCycleCount"]

GraphData[{"Coprime",8},"LCF"]

GraphData[{"Coprime",8},"LCFSignature"]

Length[hc=FindHamiltonianCycle[GraphData[{"Coprime",8}],All][[All,All,1]]]//Timing

CircularEmbeddingFromHamiltonianCycle[GraphData[{"Coprime",8}],#]&/@hc

Length[hcsym=SymmetricHamiltonianCycles[GraphData[{"Coprime",8}],hc,ProgressReporting->True]]//Timing

GroupBy[SymmetricHamiltonianCycleGraph[GraphData[{"Coprime",8}],#]&/@hcsym,GraphSymmetryGroup]

Planar

GraphData[{"Coprime",8},"Planar"]

GraphData[{"Coprime",8},"Graph","Planar"]//StyleGraphs

MinimalCrossingNumber crossings.uos.de [verified 6]

CrossingNumber[GraphData[{"Coprime",8}],Method->"WebCompute"]//AbsoluteTiming

DateString[]

MinimalCrossingNumber: "EmbeddingScheme" -> 1

(cn=CrossingNumber[GraphData[{"Coprime",8}],"EmbeddingScheme"->1,TimeConstraint->1])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",8}],"EmbeddingScheme"->1,TimeConstraint->10])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",8}],"EmbeddingScheme"->1,TimeConstraint->60])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",8}],"EmbeddingScheme"->1,TimeConstraint->3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",8}],"EmbeddingScheme"->1,TimeConstraint->5 3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",8}],"EmbeddingScheme"->1,TimeConstraint->86400])//AbsoluteTiming

MinimalCrossingNumber: "EmbeddingScheme" -> 2

(cn=CrossingNumber[GraphData[{"Coprime",8}],"EmbeddingScheme"->2,TimeConstraint->1])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",8}],"EmbeddingScheme"->2,TimeConstraint->10])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",8}],"EmbeddingScheme"->2,TimeConstraint->60])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",8}],"EmbeddingScheme"->2,TimeConstraint->3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",8}],"EmbeddingScheme"->2,TimeConstraint->5 3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",8}],"EmbeddingScheme"->2,TimeConstraint->86400])//AbsoluteTiming

MinimalCrossingNumber: "EmbeddingScheme" -> 3

(cn=CrossingNumber[GraphData[{"Coprime",8}],"EmbeddingScheme"->3,TimeConstraint->1])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",8}],"EmbeddingScheme"->3,TimeConstraint->10])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",8}],"EmbeddingScheme"->3,TimeConstraint->60])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",8}],"EmbeddingScheme"->3,TimeConstraint->3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",8}],"EmbeddingScheme"->3,TimeConstraint->5 3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",8}],"EmbeddingScheme"->3,TimeConstraint->86400])//AbsoluteTiming

MinimalCrossing

GraphData[{"Coprime",8},"CN"]

(gs=GraphData[{"Coprime",8},"Graph","MinimalCrossing"])//StyleGraphs

GraphCrossingCount/@gs

GraphCrossingDiagram/@gs

MinimalRectilinearCrossing

GraphData[{"Coprime",8},"RCN"]

GraphData[{"Coprime",8},"Graph","MinimalRectilinearCrossing"]//StyleGraphs

MinimalCrossing construction Tutte

(cn=CrossingNumber[GraphData[{"Coprime",8}],TimeConstraint->1])//AbsoluteTiming

(g=MinimalCrossingGraph[GraphData[{"Coprime",8}],"CrossingNumber"->cn])//PolyhedralGraphQ//AbsoluteTiming

faces=ReverseSort@SymmetricallyDistinctFaces[g]

Tally[ReverseSort[Length/@faces]]

TutteGraphs=BilateralGraph[CenterGraph@IGLayoutTutte[g,"OuterFace"->#],"ReturnNonbilateralGraph"->True]&/@faces

TutteGraphsWithOuterCrossingPointCounts={
#,
Count[OuterFace[#],_?(GreaterThan[GraphData[{"Coprime",8},"V"]])]
}&/@TutteGraphs;

Cases[TutteGraphsWithOuterCrossingPointCounts,{g_,0}:>g]

Cases[TutteGraphsWithOuterCrossingPointCounts,{g_,1}:>g]

LocalCrossingNumberWithEmbeddings=
{1+Max[Length/@DeleteCases[
Drop[AdjacencyList[#],GraphData[{"Coprime",8},"V"]],
_Integer?(LessEqualThan[GraphData[{"Coprime",8},"V"]]),
{2}
]],#}&/@TutteGraphs

TutteGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[
#,
AdditionalData->Join[Table[True,GraphData[{"Coprime",8},"V"]],Table[False,cn]],
SameTest->Equal
]
}&/@TutteGraphs;

SymmetricEmbeddingsWithOrientations=DeleteCases[
TutteGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]

Select[SymmetricEmbeddingsWithOrientations[[All,1]],Count[OuterFace[#],_?(GreaterThan[GraphData[{"Coprime",8},"V"]])]==0&]

MinimalCrossing construction Random 1k [120 s: 15/0/4]

(cn=CrossingNumber[GraphData[{"Coprime",8}],TimeConstraint->1])//AbsoluteTiming

Length[diagrams=DistinctMinimalCrossingDiagramData[
GraphData[{"Coprime",8}],
1000,
"CrossingNumber"->cn,
EdgeShapeFunction->"BezierEdge"
]]//AbsoluteTiming

No crossing points on the boundary:

Length[diagrams0=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==0&],"Graph",{}]]//Timing

Take[diagrams0,UpTo[10]]

One crossing point on the boundary:

Length[diagrams1=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==1&],"Graph",{}]]//Timing

Take[diagrams1,UpTo[10]]

GraphPlot@With[{g0=},Graph[VertexList[g0],EdgeList[g0],VertexCoordinates->GraphEmbedding[g0]]]

GraphReplot@

g=GraphicsToGraph[];

GraphCrossingCount@g

GraphCrossingDiagram[g]

v={{-1,0},{1,0},{0,Sqrt[3]},{-6/10,1/8},{6/10,1/8},{0,3/4},{-1/8,7/8},{5/10,3/10}+{-1/20,1/20}};
Graph[Range@Length@v,{},VertexCoordinates->v]

g=FindCorrespondingGraph[,v]

RecognizeGraph@g

RectilinearCrossingCount@g

graphs=#["Graph"]&/@diagrams;

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[#]
}&/@graphs;//AbsoluteTiming

MaxMemoryUsed[]/10^9.GB

Symmetric embeddings:

Length[SymmetricMinimalEmbeddingData=DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]
]//AbsoluteTiming

SymmetricMinimalEmbeddingData

SymmetricMinimalEmbeddingGraphs=SymmetricMinimalEmbeddingData[[All,1]]

GraphCrossingCount/@SymmetricMinimalEmbeddingGraphs

GraphCrossingDiagram/@SymmetricMinimalEmbeddingGraphs

MinimalCrossing construction Random 5k [610 s: 15/0/4]

(cn=CrossingNumber[GraphData[{"Coprime",8}],TimeConstraint->1])//AbsoluteTiming

Length[diagrams=DistinctMinimalCrossingDiagramData[
GraphData[{"Coprime",8}],
5000,
"CrossingNumber"->cn,
EdgeShapeFunction->"BezierEdge"
]]//AbsoluteTiming

No crossing points on the boundary:

Length[diagrams0=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==0&],"Graph",{}]]//Timing

Take[diagrams0,UpTo[10]]

One crossing point on the boundary:

Length[diagrams1=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==1&],"Graph",{}]]//Timing

Take[diagrams1,UpTo[10]]

graphs=#["Graph"]&/@diagrams;

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[#]
}&/@graphs;//AbsoluteTiming

MaxMemoryUsed[]/10^9.GB

Symmetric embeddings:

Length[SymmetricMinimalEmbeddingData=DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]
]//AbsoluteTiming

SymmetricMinimalEmbeddingData

SymmetricMinimalEmbeddingGraphs=SymmetricMinimalEmbeddingData[[All,1]]

GraphCrossingCount/@SymmetricMinimalEmbeddingGraphs

GraphCrossingDiagram/@SymmetricMinimalEmbeddingGraphs

MinimalCrossing construction Random 20k [2739 s: 15/0/4]

(cn=CrossingNumber[GraphData[{"Coprime",8}],TimeConstraint->1])//AbsoluteTiming

Length[diagrams=DistinctMinimalCrossingDiagramData[
GraphData[{"Coprime",8}],
20*^3,
"CrossingNumber"->cn,
EdgeShapeFunction->"BezierEdge"
]]//AbsoluteTiming

diagrams

No crossing points on the boundary:

Length[diagrams0=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==0&],"Graph",{}]]//Timing

Take[diagrams0,UpTo[10]]

One crossing point on the boundary:

Length[diagrams1=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==1&],"Graph",{}]]//Timing

Take[diagrams1,UpTo[10]]

graphs=#["Graph"]&/@diagrams;

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[#]
}&/@graphs;//AbsoluteTiming

MaxMemoryUsed[]/10^9.GB

Symmetric embeddings:

Length[SymmetricMinimalEmbeddingData=DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]
]//AbsoluteTiming

SymmetricMinimalEmbeddingData

SymmetricMinimalEmbeddingGraphs=SymmetricMinimalEmbeddingData[[All,1]]

GraphCrossingCount/@SymmetricMinimalEmbeddingGraphs

GraphCrossingDiagram/@SymmetricMinimalEmbeddingGraphs

MinimalCrossing construction Random 1k [old]

(cn=CrossingNumber[GraphData[{"Coprime",8}],TimeConstraint->1])//AbsoluteTiming

(RandomGraphs=Table[MinimalCrossingGraph[GraphData[{"Coprime",8}],"CrossingNumber"->cn,RandomSeed->n],{n,1000}]//Union);//Timing

RandomGraphsWithOuterCrossingPointCounts={
#,
Count[OuterFace[#],_?(GreaterThan[GraphData[{"Coprime",8},"V"]])]
}&/@RandomGraphs;

Small numbers of crossing points on the boundary:

Cases[RandomGraphsWithOuterCrossingPointCounts,{g_,0}:>g]

Cases[RandomGraphsWithOuterCrossingPointCounts,{g_,1}:>g]

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[
#,
AdditionalData->Join[Table[True,GraphData[{"Coprime",8},"V"]],Table[False,cn]],
SameTest->Equal
]
}&/@RandomGraphs;

MaxMemoryUsed[]/10^9.GB

DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]/.g_Graph:>BilateralGraph[CenterGraph@g,"ReturnNonbilateralGraph"->True]

MinimalCrossing construction Random 20k [old]

(cn=CrossingNumber[GraphData[{"Coprime",8}],TimeConstraint->1])//AbsoluteTiming

(RandomGraphs=Table[MinimalCrossingGraph[GraphData[{"Coprime",8}],"CrossingNumber"->cn,RandomSeed->n],{n,20000}]//Union);//Timing

RandomGraphsWithOuterCrossingPointCounts={
#,
Count[OuterFace[#],_?(GreaterThan[GraphData[{"Coprime",8},"V"]])]
}&/@RandomGraphs;

Small numbers of crossing points on the boundary:

Cases[RandomGraphsWithOuterCrossingPointCounts,{g_,0}:>g]

Cases[RandomGraphsWithOuterCrossingPointCounts,{g_,1}:>g]

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[
#,
AdditionalData->Join[Table[True,GraphData[{"Coprime",8},"V"]],Table[False,cn]],
SameTest->Equal
]
}&/@RandomGraphs;

MaxMemoryUsed[]/10^9.GB

DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]/.g_Graph:>BilateralGraph[CenterGraph@g,"ReturnNonbilateralGraph"->True]

MinimalLocalCrossing

GraphData[{"Coprime",8},{"LocalCrossingNumber","RectilinearLocalCrossingNumber"}]

GraphData[{"Coprime",8},"Graph","MinimalLocalCrossing"]//StyleGraphs

MinimalRectilinearLocalCrossing

GraphData[{"Coprime",8},{"LocalCrossingNumber","RectilinearLocalCrossingNumber"}]

GraphData[{"Coprime",8},"Graph","MinimalRectilinearLocalCrossing"]//StyleGraphs

MinimaRectilinearlLocalCrossing construction 1000

AdjacentCrossingsQ[g_Graph,cn_Integer]:=Module[{a=AdjacencyList[g],n=VertexCount[g]-cn},Max[Take[a,-cn]]>n]

(cn=CrossingNumber[GraphData[{"Coprime",8}],TimeConstraint->10])//AbsoluteTiming

(gs=Select[Table[MinimalCrossingGraph[GraphData[{"Coprime",8}],"CrossingNumber"->cn,RandomSeed->i],{i,1000}],!AdjacentCrossingsQ[#,cn]&]//Union)//Timing

MinimaRectilinearlLocalCrossing construction 20000

AdjacentCrossingsQ[g_Graph,cn_Integer]:=Module[{a=AdjacencyList[g],n=VertexCount[g]-cn},Max[Take[a,-cn]]>n]

(cn=CrossingNumber[GraphData[{"Coprime",8}],TimeConstraint->10])//AbsoluteTiming

(gs=Select[Table[MinimalCrossingGraph[GraphData[{"Coprime",8}],"CrossingNumber"->cn,RandomSeed->i],{i,20000}],!AdjacentCrossingsQ[#,cn]&]//Union)//Timing

Circulant

GraphData[{"Coprime",8},"Circulant"]

GraphData[{"Coprime",8},"Graph","Circulant"]//StyleGraphs

Circulant construction

GraphData[{"Coprime",8},"NotationRules","Circulant"]

(ci=CirculantIndices[GraphData[{"Coprime",8}]])//AbsoluteTiming

CirculantGraph1@@@ci

Cases[GraphData[{"Coprime",8},"StandardNames"],{"Circulant",i_}:>i]

CirculantGraph1@@@%

Complement graph

compl=GraphData[{"Coprime",8},"ComplementGraph","Name"]

Line graph

GraphData[{"Coprime",8},"Line"]

LineGraphQ[GraphData[{"Coprime",8}]]//Timing

RootGraph

roots=Select[GraphData[All],GraphData[#,"LineGraph","Name"]==={"Coprime",8}&]

RootGraph[GraphData[{"Coprime",8}]]

Halin

GraphData[{"Coprime",8},"Halin"]

GraphData[{"Coprime",8},"Graph","Halin"]//StyleGraphs

Rigid

GraphData[{"Coprime",8},"Rigid"]

GraphData[{"Coprime",8},"Graph","Rigid"]//StyleGraphs

Flexible

GraphData[{"Coprime",8},"Flexible"]

GraphData[{"Coprime",8},"Graph","Flexible"]//StyleGraphs

Voltage

GraphData[{"Coprime",8},"Graph","Voltage"]//StyleGraphs

Voltage construction

gs=VoltageGraph[GraphData[{"Coprime",8}],"MaxResults"->20,Debug->True]

Length[gs]

RecognizeGraph/@gs

VoltageGraphNotation/@gs//Column

EmbeddingClasses/@gs//Column

GraphSymmetryGroup/@gs//Column

LCF

GraphData[{"Coprime",8},"LCF"]

GraphData[{"Coprime",8},"HamiltonianCycleCount"]

GraphData[{"Coprime",8},"LCFSignature"]

GraphData[{"Coprime",8},"LCFNotations"]

GraphData[{"Coprime",8},"Graph","LCF"]//StyleGraphs

Tally[LCFNotation[#][[2]]&/@%]

UnitDistance

GraphData[{"Coprime",8},"UnitDistance"]

UnitDistanceGraphQ[GraphData[{"Coprime",8}],Debug->True]//Timing

GraphData[{"Coprime",8},"Graph","UnitDistance"]//StyleGraphs

UnitDistance by refinement of default embeddings

Graph[edge list]

(g=UnitDistanceEmbeddingRefine[Graph[GraphData[{"Coprime",8},"EdgeList"]],MaxIterations->500])//Timing

UnitDistanceGraphEmbeddingQ[g]

Graph[vertex list, edge list]

(g=UnitDistanceEmbeddingRefine[Graph[GraphData[{"Coprime",8},"VertexList"],GraphData[{"Coprime",8},"EdgeList"]],MaxIterations->500])//Timing

UnitDistanceGraphEmbeddingQ[g]

UnitDistance by refinement of existing embeddings

gs=UnitDistanceEmbeddingRefine[Graph[VertexList[#],EdgeList[#],VertexCoordinates->GraphEmbedding[#]],MaxIterations->500]&/@Complement@@(GraphData[{"Coprime",8},"Graph",#]&/@{"All","UnitDistance"})

TextGrid[
gdata=SortBy[
{#,DegenerateGraphEmbeddingQ[#],GraphSymmetryGroup[#],Max[Abs[EdgeLengths[#]-1]]}&/@gs,
Last
],
Dividers->All
]

Cases[gdata,{__,0.}]

Symmetric:

gs=Cases[
gdata,
{g_,_,sym:Except[TransformationGroup[{}]],diff_}:>{
HighlightGraph[g1=BilateralGraph[CenterGraph[g],"ReturnNonbilateralGraph"->True],Flatten[FindCoincidentVertices[g1]]],
sym,
diff
}]

UnitDistance by refinement of stored LCF embeddings

FileByteCount[file=FileNameJoin[{$PropertiesDir,"LCFNotations-Nice",GraphNameToFileName[{"Coprime",8},".m.gz"]}]]

Tally[(lcf=Import[file])[[All,-1]]]//Timing//AbsoluteTiming

lcf=LCFNotation/@nicelcfgs;

gs=UnitDistanceEmbeddingRefine[LCFGraph@@#,MaxIterations->500]&/@lcf;//Timing

gdata=SortBy[
{#,Max[Abs[EdgeLengths[#]-1]]}&/@gs,
Last
]

Cases[gdata,{g_?UnitDistanceGraphEmbeddingQ,_}:>g]

NondegenerateSymmetricGraphs=Select[
gdata,
And[
DegenerateGraphEmbeddingQ[#[[1]]]===False,
GraphSymmetryGroup[#[[1]]]=!=TransformationGroup[{}]
]&
]/.g_Graph:>CenterGraph[g]

UnitDistance by FindUnitDistanceEmbedding  (random embeddings returning on messages)

gs=FindUnitDistanceEmbedding[GraphData[{"Coprime",8}],50,"ReturnWithMessage"->True];//Quiet//Timing

gdata=SortBy[
{#,Max[Abs[EdgeLengths[#]-1]]}&/@gs,
Last
]

Cases[gdata,{g_?UnitDistanceGraphEmbeddingQ,_}:>g]

SymmetricEmebddings=Select[gdata,GraphSymmetryGroup[#[[1]]]=!=TransformationGroup[{}]&]

UnitDistance by FindUnitDistanceEmbedding  (random embedding waiting until UD is found)

FindUnitDistanceEmbedding[GraphData[{"Coprime",8}],"ReturnWithMessage"->False]//Quiet//Timing

Matchstick

GraphData[{"Coprime",8},"Matchstick"]

GraphData[{"Coprime",8},"Graph","Matchstick"]//StyleGraphs

3D default

Graph3D[GraphData[{"Coprime",8},"Edges"]]

3D construction

3D All

GraphData[{"Coprime",8},"Graph",{"3D","All"}]

3D UnitDistance construction Random

GraphData[{"Coprime",8},"Dimension"]

(g=UnitDistanceEmbeddingRefine[
Graph3D[
GraphData[{"Coprime",8},"VertexList"],
GraphData[{"Coprime",8},"EdgeList"]
],
WorkingPrecision->25])//Timing

EdgeLengths[g]

UnitDistanceGraphEmbeddingQ[g]

3D UnitDistance

GraphData[{"Coprime",8},"Graph",{"3D","UnitDistance"}]

3D Polyhedron

GraphData[{"Coprime",8},"Polyhedral"]

GraphData[{"Coprime",8},"Graph",{"3D","Polyhedron"}]

{"Coprime", 9}

Names

GraphData[{"Coprime",9},"StandardName"]

GraphData[{"Coprime",9},"StandardNames"]

HouseOfGraphs

hogid=GraphData[{"Coprime",9},"NotationRules","HouseOfGraphs"]

HouseOfGraphsLookup[hogid]

HouseOfGraphsGraph[hogid]//StyleGraphs[#,ImageSize->Small]&

Wikidata

GraphData[{"Coprime",9},"WikidataID"]

GraphData[{"Coprime",9},"WikidataID","URL"]

Primary

GraphData[{"Coprime",9}]//StyleGraphs[#,ImageSize->Small]&

All

GraphData[{"Coprime",9},"Graph","All"]//StyleGraphs

CurvedEdge

GraphData[{"Coprime",9},"Graph","CurvedEdge"]//StyleGraphs

Inexact

Select[GraphData[{"Coprime",9},"Graph","All"],(!FreeQ[GraphEmbedding[#],_?InexactNumberQ]&)]//StyleGraphs

Degenerate

GraphData[{"Coprime",9},"Graph","Degenerate"]//StyleGraphs

DegenerateGraphEmbeddingTypes/@GraphData[{"Coprime",9},"Graph","Degenerate"]//Column

Embeddings

GraphDataEmbeddings[GraphData[{"Coprime",9}]]

Default embedding

g0=GraphPlot[Graph[GraphData[{"Coprime",9},"VertexList"],GraphData[{"Coprime",9},"Edges"]]]

Configuration

GraphData[{"Coprime",9},"Configuration"]

configurations=GraphData[{"Coprime",9},"Graph","Configuration"]//StyleGraphs

GeneralizedPetersen

GraphData[{"Coprime",9},"Graph","GeneralizedPetersen"]//StyleGraphs

IGraph

GraphData[{"Coprime",9},"Graph","IGraph"]//StyleGraphs

CompleteKPartite

GraphData[{"Coprime",9},"Graph","CompleteKPartite"]//StyleGraphs

Bipartite

GraphData[{"Coprime",9},"Bipartite"]

GraphData[{"Coprime",9},"Graph","Bipartite"]//StyleGraphs

Bilateral

GraphData[{"Coprime",9},"Graph","Bilateral"]//StyleGraphs

Grid[DeleteCases[Monitor[{g=#,BilateralGraphEmbeddingTypes[#],GraphSymmetryGroup[#]}&/@GraphData[{"Coprime",9},"Graph","All"],g],{_,_,TransformationGroup[{}]}],Dividers->All,Alignment->{{Center,{Left}}}]//Quiet

Circular

GraphData[{"Coprime",9},"Graph","Circular"]//StyleGraphs

Circular construction All

GraphData[{"Coprime",9},"Hamiltonian"]

GraphData[{"Coprime",9},"HamiltonianCycles"]

GraphData[{"Coprime",9},"HamiltonianCycleCount"]

GraphData[{"Coprime",9},"LCF"]

GraphData[{"Coprime",9},"LCFSignature"]

Length[hc=FindHamiltonianCycle[GraphData[{"Coprime",9}],All][[All,All,1]]]//Timing

Length[hcsym=SymmetricHamiltonianCycles[GraphData[{"Coprime",9}],hc,ProgressReporting->True]]//Timing

GroupBy[SymmetricHamiltonianCycleGraph[GraphData[{"Coprime",9}],#]&/@hcsym,GraphSymmetryGroup]

g=CircularEmbeddingFromHamiltonianCycle[GraphData@{"Coprime",9},hc[[1]]]

Planar

GraphData[{"Coprime",9},"Planar"]

GraphData[{"Coprime",9},"Graph","Planar"]//StyleGraphs

MinimalCrossingNumber crossings.uos.de [verified 13]

CrossingNumber[GraphData[{"Coprime",9}],Method->"WebCompute"]//AbsoluteTiming

DateString[]

MinimalCrossingNumber: "EmbeddingScheme" -> 1

(cn=CrossingNumber[GraphData[{"Coprime",9}],"EmbeddingScheme"->1,TimeConstraint->1])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",9}],"EmbeddingScheme"->1,TimeConstraint->10])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",9}],"EmbeddingScheme"->1,TimeConstraint->60])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",9}],"EmbeddingScheme"->1,TimeConstraint->3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",9}],"EmbeddingScheme"->1,TimeConstraint->5 3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",9}],"EmbeddingScheme"->1,TimeConstraint->86400])//AbsoluteTiming

MinimalCrossingNumber: "EmbeddingScheme" -> 2

(cn=CrossingNumber[GraphData[{"Coprime",9}],"EmbeddingScheme"->2,TimeConstraint->1])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",9}],"EmbeddingScheme"->2,TimeConstraint->10])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",9}],"EmbeddingScheme"->2,TimeConstraint->60])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",9}],"EmbeddingScheme"->2,TimeConstraint->3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",9}],"EmbeddingScheme"->2,TimeConstraint->5 3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",9}],"EmbeddingScheme"->2,TimeConstraint->86400])//AbsoluteTiming

MinimalCrossingNumber: "EmbeddingScheme" -> 3

(cn=CrossingNumber[GraphData[{"Coprime",9}],"EmbeddingScheme"->3,TimeConstraint->1])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",9}],"EmbeddingScheme"->3,TimeConstraint->10])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",9}],"EmbeddingScheme"->3,TimeConstraint->60])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",9}],"EmbeddingScheme"->3,TimeConstraint->3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",9}],"EmbeddingScheme"->3,TimeConstraint->5 3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",9}],"EmbeddingScheme"->3,TimeConstraint->86400])//AbsoluteTiming

MinimalCrossing

GraphData[{"Coprime",9},"CN"]

(gs=GraphData[{"Coprime",9},"Graph","MinimalCrossing"])//StyleGraphs

GraphCrossingCount/@gs

GraphCrossingDiagram/@gs

MinimalRectilinearCrossing

GraphData[{"Coprime",9},"RCN"]

GraphData[{"Coprime",9},"Graph","MinimalRectilinearCrossing"]//StyleGraphs

MinimalCrossing construction Tutte

(cn=CrossingNumber[GraphData[{"Coprime",9}],TimeConstraint->1])//AbsoluteTiming

(g=MinimalCrossingGraph[GraphData[{"Coprime",9}],"CrossingNumber"->cn])//PolyhedralGraphQ//AbsoluteTiming

faces=ReverseSort@SymmetricallyDistinctFaces[g]

Tally[ReverseSort[Length/@faces]]

TutteGraphs=BilateralGraph[CenterGraph@IGLayoutTutte[g,"OuterFace"->#],"ReturnNonbilateralGraph"->True]&/@faces

TutteGraphsWithOuterCrossingPointCounts={
#,
Count[OuterFace[#],_?(GreaterThan[GraphData[{"Coprime",9},"V"]])]
}&/@TutteGraphs;

Cases[TutteGraphsWithOuterCrossingPointCounts,{g_,0}:>g]

Cases[TutteGraphsWithOuterCrossingPointCounts,{g_,1}:>g]

LocalCrossingNumberWithEmbeddings=
{1+Max[Length/@DeleteCases[
Drop[AdjacencyList[#],GraphData[{"Coprime",9},"V"]],
_Integer?(LessEqualThan[GraphData[{"Coprime",9},"V"]]),
{2}
]],#}&/@TutteGraphs

TutteGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[
#,
AdditionalData->Join[Table[True,GraphData[{"Coprime",9},"V"]],Table[False,cn]],
SameTest->Equal
]
}&/@TutteGraphs;

SymmetricEmbeddingsWithOrientations=DeleteCases[
TutteGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]

Select[SymmetricEmbeddingsWithOrientations[[All,1]],Count[OuterFace[#],_?(GreaterThan[GraphData[{"Coprime",9},"V"]])]==0&]

MinimalCrossing construction Random 1k [150 s: 40/0/5]

(cn=CrossingNumber[GraphData[{"Coprime",9}],TimeConstraint->1])//AbsoluteTiming

Length[diagrams=DistinctMinimalCrossingDiagramData[
GraphData[{"Coprime",9}],
1000,
"CrossingNumber"->cn,
EdgeShapeFunction->"BezierEdge"
]]//AbsoluteTiming

No crossing points on the boundary:

Length[diagrams0=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==0&],"Graph",{}]]//Timing

Take[diagrams0,UpTo[10]]

One crossing point on the boundary:

Length[diagrams1=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==1&],"Graph",{}]]//Timing

Take[diagrams1,UpTo[10]]

graphs=#["Graph"]&/@diagrams;

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[#]
}&/@graphs;//AbsoluteTiming

MaxMemoryUsed[]/10^9.GB

Symmetric embeddings:

Length[SymmetricMinimalEmbeddingData=DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]
]//AbsoluteTiming

SymmetricMinimalEmbeddingData

SymmetricMinimalEmbeddingGraphs=SymmetricMinimalEmbeddingData[[All,1]]

GraphCrossingCount/@SymmetricMinimalEmbeddingGraphs

GraphCrossingDiagram/@SymmetricMinimalEmbeddingGraphs

MinimalCrossing construction Random 5k [830 s: 49/0/5]

(cn=CrossingNumber[GraphData[{"Coprime",9}],TimeConstraint->1])//AbsoluteTiming

Length[diagrams=DistinctMinimalCrossingDiagramData[
GraphData[{"Coprime",9}],
5000,
"CrossingNumber"->cn,
EdgeShapeFunction->"BezierEdge"
]]//AbsoluteTiming

No crossing points on the boundary:

Length[diagrams0=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==0&],"Graph",{}]]//Timing

Take[diagrams0,UpTo[10]]

One crossing point on the boundary:

Length[diagrams1=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==1&],"Graph",{}]]//Timing

Take[diagrams1,UpTo[10]]

graphs=#["Graph"]&/@diagrams;

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[#]
}&/@graphs;//AbsoluteTiming

MaxMemoryUsed[]/10^9.GB

Symmetric embeddings:

Length[SymmetricMinimalEmbeddingData=DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]
]//AbsoluteTiming

SymmetricMinimalEmbeddingData

SymmetricMinimalEmbeddingGraphs=SymmetricMinimalEmbeddingData[[All,1]]

GraphCrossingCount/@SymmetricMinimalEmbeddingGraphs

GraphCrossingDiagram/@SymmetricMinimalEmbeddingGraphs

MinimalCrossing construction Random 20k [3049 s: 49/0/5]

(cn=CrossingNumber[GraphData[{"Coprime",9}],TimeConstraint->1])//AbsoluteTiming

Length[diagrams=DistinctMinimalCrossingDiagramData[
GraphData[{"Coprime",9}],
20*^3,
"CrossingNumber"->cn,
EdgeShapeFunction->"BezierEdge"
]]//AbsoluteTiming

diagrams

GraphCrossingCount[g=]

GraphCrossingDiagram[g]

No crossing points on the boundary:

Length[diagrams0=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==0&],"Graph",{}]]//Timing

Take[diagrams0,UpTo[10]]

One crossing point on the boundary:

Length[diagrams1=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==1&],"Graph",{}]]//Timing

Take[diagrams1,UpTo[10]]

graphs=#["Graph"]&/@diagrams;

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[#]
}&/@graphs;//AbsoluteTiming

MaxMemoryUsed[]/10^9.GB

Symmetric embeddings:

Length[SymmetricMinimalEmbeddingData=DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]
]//AbsoluteTiming

SymmetricMinimalEmbeddingData

SymmetricMinimalEmbeddingGraphs=SymmetricMinimalEmbeddingData[[All,1]]

GraphCrossingCount/@SymmetricMinimalEmbeddingGraphs

GraphCrossingDiagram/@SymmetricMinimalEmbeddingGraphs

MinimalCrossing construction Random 1k [old]

(cn=CrossingNumber[GraphData[{"Coprime",9}],TimeConstraint->1])//AbsoluteTiming

(RandomGraphs=Table[MinimalCrossingGraph[GraphData[{"Coprime",9}],"CrossingNumber"->cn,RandomSeed->n],{n,1000}]//Union);//Timing

RandomGraphsWithOuterCrossingPointCounts={
#,
Count[OuterFace[#],_?(GreaterThan[GraphData[{"Coprime",9},"V"]])]
}&/@RandomGraphs;

Small numbers of crossing points on the boundary:

Cases[RandomGraphsWithOuterCrossingPointCounts,{g_,0}:>g]

Cases[RandomGraphsWithOuterCrossingPointCounts,{g_,1}:>g]

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[
#,
AdditionalData->Join[Table[True,GraphData[{"Coprime",9},"V"]],Table[False,cn]],
SameTest->Equal
]
}&/@RandomGraphs;

MaxMemoryUsed[]/10^9.GB

DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]/.g_Graph:>BilateralGraph[CenterGraph@g,"ReturnNonbilateralGraph"->True]

MinimalCrossing construction Random 20k [old]

(cn=CrossingNumber[GraphData[{"Coprime",9}],TimeConstraint->1])//AbsoluteTiming

(RandomGraphs=Table[MinimalCrossingGraph[GraphData[{"Coprime",9}],"CrossingNumber"->cn,RandomSeed->n],{n,20000}]//Union);//Timing

RandomGraphsWithOuterCrossingPointCounts={
#,
Count[OuterFace[#],_?(GreaterThan[GraphData[{"Coprime",9},"V"]])]
}&/@RandomGraphs;

Small numbers of crossing points on the boundary:

Cases[RandomGraphsWithOuterCrossingPointCounts,{g_,0}:>g]

Cases[RandomGraphsWithOuterCrossingPointCounts,{g_,1}:>g]

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[
#,
AdditionalData->Join[Table[True,GraphData[{"Coprime",9},"V"]],Table[False,cn]],
SameTest->Equal
]
}&/@RandomGraphs;

MaxMemoryUsed[]/10^9.GB

DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]/.g_Graph:>BilateralGraph[CenterGraph@g,"ReturnNonbilateralGraph"->True]

MinimalLocalCrossing

GraphData[{"Coprime",9},{"LocalCrossingNumber","RectilinearLocalCrossingNumber"}]

GraphData[{"Coprime",9},"Graph","MinimalLocalCrossing"]//StyleGraphs

MinimalRectilinearLocalCrossing

GraphData[{"Coprime",9},{"LocalCrossingNumber","RectilinearLocalCrossingNumber"}]

GraphData[{"Coprime",9},"Graph","MinimalRectilinearLocalCrossing"]//StyleGraphs

MinimaRectilinearlLocalCrossing construction 1000

AdjacentCrossingsQ[g_Graph,cn_Integer]:=Module[{a=AdjacencyList[g],n=VertexCount[g]-cn},Max[Take[a,-cn]]>n]

(cn=CrossingNumber[GraphData[{"Coprime",9}],TimeConstraint->10])//AbsoluteTiming

(gs=Select[Table[MinimalCrossingGraph[GraphData[{"Coprime",9}],"CrossingNumber"->cn,RandomSeed->i],{i,1000}],!AdjacentCrossingsQ[#,cn]&]//Union)//Timing

MinimaRectilinearlLocalCrossing construction 20000

AdjacentCrossingsQ[g_Graph,cn_Integer]:=Module[{a=AdjacencyList[g],n=VertexCount[g]-cn},Max[Take[a,-cn]]>n]

(cn=CrossingNumber[GraphData[{"Coprime",9}],TimeConstraint->10])//AbsoluteTiming

(gs=Select[Table[MinimalCrossingGraph[GraphData[{"Coprime",9}],"CrossingNumber"->cn,RandomSeed->i],{i,20000}],!AdjacentCrossingsQ[#,cn]&]//Union)//Timing

Circulant

GraphData[{"Coprime",9},"Circulant"]

GraphData[{"Coprime",9},"Graph","Circulant"]//StyleGraphs

Circulant construction

GraphData[{"Coprime",9},"NotationRules","Circulant"]

(ci=CirculantIndices[GraphData[{"Coprime",9}]])//AbsoluteTiming

CirculantGraph1@@@ci

Cases[GraphData[{"Coprime",9},"StandardNames"],{"Circulant",i_}:>i]

CirculantGraph1@@@%

Complement graph

compl=GraphData[{"Coprime",9},"ComplementGraph","Name"]

Line graph

GraphData[{"Coprime",9},"Line"]

LineGraphQ[GraphData[{"Coprime",9}]]//Timing

RootGraph

roots=Select[GraphData[All],GraphData[#,"LineGraph","Name"]==={"Coprime",9}&]

RootGraph[GraphData[{"Coprime",9}]]

Halin

GraphData[{"Coprime",9},"Halin"]

GraphData[{"Coprime",9},"Graph","Halin"]//StyleGraphs

Rigid

GraphData[{"Coprime",9},"Rigid"]

GraphData[{"Coprime",9},"Graph","Rigid"]//StyleGraphs

Flexible

GraphData[{"Coprime",9},"Flexible"]

GraphData[{"Coprime",9},"Graph","Flexible"]//StyleGraphs

Voltage

GraphData[{"Coprime",9},"Graph","Voltage"]//StyleGraphs

Voltage construction

gs=VoltageGraph[GraphData[{"Coprime",9}],"MaxResults"->20,Debug->True]

Length[gs]

RecognizeGraph/@gs

VoltageGraphNotation/@gs//Column

EmbeddingClasses/@gs//Column

GraphSymmetryGroup/@gs//Column

LCF

GraphData[{"Coprime",9},"LCF"]

GraphData[{"Coprime",9},"HamiltonianCycleCount"]

GraphData[{"Coprime",9},"LCFSignature"]

GraphData[{"Coprime",9},"LCFNotations"]

GraphData[{"Coprime",9},"Graph","LCF"]//StyleGraphs

Tally[LCFNotation[#][[2]]&/@%]

UnitDistance

GraphData[{"Coprime",9},"UnitDistance"]

UnitDistanceGraphQ[GraphData[{"Coprime",9}],Debug->True]//Timing

GraphData[{"Coprime",9},"Graph","UnitDistance"]//StyleGraphs

Select[%,!FreeQ[GraphEmbedding[#],_?InexactNumberQ]&]

UnitDistance by refinement of default embeddings

Graph[edge list]

(g=UnitDistanceEmbeddingRefine[Graph[GraphData[{"Coprime",9},"EdgeList"]],MaxIterations->500])//Timing

UnitDistanceGraphEmbeddingQ[g]

Graph[vertex list, edge list]

(g=UnitDistanceEmbeddingRefine[Graph[GraphData[{"Coprime",9},"VertexList"],GraphData[{"Coprime",9},"EdgeList"]],MaxIterations->500])//Timing

UnitDistanceGraphEmbeddingQ[g]

UnitDistance by refinement of existing embeddings

gs=UnitDistanceEmbeddingRefine[Graph[VertexList[#],EdgeList[#],VertexCoordinates->GraphEmbedding[#]],MaxIterations->500]&/@Complement@@(GraphData[{"Coprime",9},"Graph",#]&/@{"All","UnitDistance"})

TextGrid[
gdata=SortBy[
{#,DegenerateGraphEmbeddingQ[#],GraphSymmetryGroup[#],Max[Abs[EdgeLengths[#]-1]]}&/@gs,
Last
],
Dividers->All
]

Cases[gdata,{__,0.}]

Symmetric:

gs=Cases[
gdata,
{g_,_,sym:Except[TransformationGroup[{}]],diff_}:>{
HighlightGraph[g1=BilateralGraph[CenterGraph[g],"ReturnNonbilateralGraph"->True],Flatten[FindCoincidentVertices[g1]]],
sym,
diff
}]

UnitDistance by FindUnitDistanceEmbedding  (random embeddings returning on messages)

gs=FindUnitDistanceEmbedding[GraphData[{"Coprime",9}],50,"ReturnWithMessage"->True];//Quiet//Timing

gdata=SortBy[
{#,Max[Abs[EdgeLengths[#]-1]]}&/@gs,
Last
]

Cases[gdata,{g_?UnitDistanceGraphEmbeddingQ,_}:>g]

SymmetricEmebddings=Select[gdata,GraphSymmetryGroup[#[[1]]]=!=TransformationGroup[{}]&]

UnitDistance by FindUnitDistanceEmbedding  (random embedding waiting until UD is found)

FindUnitDistanceEmbedding[GraphData[{"Coprime",9}],"ReturnWithMessage"->False]//Quiet//Timing

Matchstick

GraphData[{"Coprime",9},"Matchstick"]

GraphData[{"Coprime",9},"Graph","Matchstick"]//StyleGraphs

3D default

Graph3D[GraphData[{"Coprime",9},"Edges"]]

3D construction

3D All

GraphData[{"Coprime",9},"Graph",{"3D","All"}]

3D UnitDistance construction Random

GraphData[{"Coprime",9},"Dimension"]

(g=UnitDistanceEmbeddingRefine[
Graph3D[
GraphData[{"Coprime",9},"VertexList"],
GraphData[{"Coprime",9},"EdgeList"]
],
WorkingPrecision->25])//Timing

EdgeLengths[g]

UnitDistanceGraphEmbeddingQ[g]

3D UnitDistance

GraphData[{"Coprime",9},"Graph",{"3D","UnitDistance"}]

3D Polyhedron

GraphData[{"Coprime",9},"Polyhedral"]

GraphData[{"Coprime",9},"Graph",{"3D","Polyhedron"}]

{"Coprime", 10}

Names

GraphData[{"Coprime",10},"StandardName"]

GraphData[{"Coprime",10},"StandardNames"]

HouseOfGraphs

hogid=GraphData[{"Coprime",10},"NotationRules","HouseOfGraphs"]

HouseOfGraphsLookup[hogid]

HouseOfGraphsGraph[hogid]//StyleGraphs[#,ImageSize->Small]&

Wikidata

GraphData[{"Coprime",10},"WikidataID"]

GraphData[{"Coprime",10},"WikidataID","URL"]

Primary

GraphData[{"Coprime",10}]//StyleGraphs[#,ImageSize->Small]&

All

GraphData[{"Coprime",10},"Graph","All"]//StyleGraphs

CurvedEdge

GraphData[{"Coprime",10},"Graph","CurvedEdge"]//StyleGraphs

Inexact

Select[GraphData[{"Coprime",10},"Graph","All"],(!FreeQ[GraphEmbedding[#],_?InexactNumberQ]&)]//StyleGraphs

Degenerate

GraphData[{"Coprime",10},"Graph","Degenerate"]//StyleGraphs

DegenerateGraphEmbeddingTypes/@GraphData[{"Coprime",10},"Graph","Degenerate"]//Column

Embeddings

GraphDataEmbeddings[GraphData[{"Coprime",10}]]

Default embedding

g0=GraphPlot[Graph[GraphData[{"Coprime",10},"VertexList"],GraphData[{"Coprime",10},"Edges"]]]

Configuration

GraphData[{"Coprime",10},"Configuration"]

configurations=GraphData[{"Coprime",10},"Graph","Configuration"]//StyleGraphs

GeneralizedPetersen

GraphData[{"Coprime",10},"Graph","GeneralizedPetersen"]//StyleGraphs

IGraph

GraphData[{"Coprime",10},"Graph","IGraph"]//StyleGraphs

CompleteKPartite

GraphData[{"Coprime",10},"Graph","CompleteKPartite"]//StyleGraphs

Bipartite

GraphData[{"Coprime",10},"Bipartite"]

GraphData[{"Coprime",10},"Graph","Bipartite"]//StyleGraphs

Bilateral

GraphData[{"Coprime",10},"Graph","Bilateral"]//StyleGraphs

Grid[DeleteCases[Monitor[{g=#,BilateralGraphEmbeddingTypes[#],GraphSymmetryGroup[#]}&/@GraphData[{"Coprime",10},"Graph","All"],g],{_,_,TransformationGroup[{}]}],Dividers->All,Alignment->{{Center,{Left}}}]//Quiet

Circular

GraphData[{"Coprime",10},"Graph","Circular"]//StyleGraphs

Circular construction All

GraphData[{"Coprime",10},"Hamiltonian"]

GraphData[{"Coprime",10},"HamiltonianCycles"]

GraphData[{"Coprime",10},"HamiltonianCycleCount"]

GraphData[{"Coprime",10},"LCF"]

GraphData[{"Coprime",10},"LCFSignature"]

Length[hc=FindHamiltonianCycle[GraphData[{"Coprime",10}],All][[All,All,1]]]//Timing

g=CircularEmbeddingFromHamiltonianCycle[GraphData[{"Coprime",10}],hc[[1]]]

Length[hcsym=SymmetricHamiltonianCycles[GraphData[{"Coprime",10}],hc,ProgressReporting->True]]//Timing

GroupBy[SymmetricHamiltonianCycleGraph[GraphData[{"Coprime",10}],#]&/@hcsym,GraphSymmetryGroup]

Planar

GraphData[{"Coprime",10},"Planar"]

GraphData[{"Coprime",10},"Graph","Planar"]//StyleGraphs

MinimalCrossingNumber crossings.uos.de [failed]

CrossingNumber[GraphData[{"Coprime",10}],Method->"WebCompute"]//AbsoluteTiming

DateString[]

MinimalCrossingNumber: "EmbeddingScheme" -> 1

(cn=CrossingNumber[GraphData[{"Coprime",10}],"EmbeddingScheme"->1,TimeConstraint->1])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",10}],"EmbeddingScheme"->1,TimeConstraint->10])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",10}],"EmbeddingScheme"->1,TimeConstraint->60])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",10}],"EmbeddingScheme"->1,TimeConstraint->3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",10}],"EmbeddingScheme"->1,TimeConstraint->5 3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",10}],"EmbeddingScheme"->1,TimeConstraint->86400])//AbsoluteTiming

MinimalCrossingNumber: "EmbeddingScheme" -> 2

(cn=CrossingNumber[GraphData[{"Coprime",10}],"EmbeddingScheme"->2,TimeConstraint->1])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",10}],"EmbeddingScheme"->2,TimeConstraint->10])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",10}],"EmbeddingScheme"->2,TimeConstraint->60])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",10}],"EmbeddingScheme"->2,TimeConstraint->3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",10}],"EmbeddingScheme"->2,TimeConstraint->5 3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",10}],"EmbeddingScheme"->2,TimeConstraint->86400])//AbsoluteTiming

MinimalCrossingNumber: "EmbeddingScheme" -> 3

(cn=CrossingNumber[GraphData[{"Coprime",10}],"EmbeddingScheme"->3,TimeConstraint->1])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",10}],"EmbeddingScheme"->3,TimeConstraint->10])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",10}],"EmbeddingScheme"->3,TimeConstraint->60])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",10}],"EmbeddingScheme"->3,TimeConstraint->3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",10}],"EmbeddingScheme"->3,TimeConstraint->5 3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",10}],"EmbeddingScheme"->3,TimeConstraint->86400])//AbsoluteTiming

Quit

MinimalCrossing

GraphData[{"Coprime",10},"CN"]

(gs=GraphData[{"Coprime",10},"Graph","MinimalCrossing"])//StyleGraphs

GraphCrossingCount/@gs

GraphCrossingDiagram/@gs

MinimalRectilinearCrossing

GraphData[{"Coprime",10},"RCN"]

GraphData[{"Coprime",10},"Graph","MinimalRectilinearCrossing"]//StyleGraphs

MinimalCrossing construction Tutte

(cn=CrossingNumber[GraphData[{"Coprime",10}],TimeConstraint->1])//AbsoluteTiming

(g=MinimalCrossingGraph[GraphData[{"Coprime",10}],"CrossingNumber"->cn])//PolyhedralGraphQ//AbsoluteTiming

faces=ReverseSort@SymmetricallyDistinctFaces[g]

Tally[ReverseSort[Length/@faces]]

TutteGraphs=BilateralGraph[CenterGraph@IGLayoutTutte[g,"OuterFace"->#],"ReturnNonbilateralGraph"->True]&/@faces

TutteGraphsWithOuterCrossingPointCounts={
#,
Count[OuterFace[#],_?(GreaterThan[GraphData[{"Coprime",10},"V"]])]
}&/@TutteGraphs;

Cases[TutteGraphsWithOuterCrossingPointCounts,{g_,0}:>g]

Cases[TutteGraphsWithOuterCrossingPointCounts,{g_,1}:>g]

LocalCrossingNumberWithEmbeddings=
{1+Max[Length/@DeleteCases[
Drop[AdjacencyList[#],GraphData[{"Coprime",10},"V"]],
_Integer?(LessEqualThan[GraphData[{"Coprime",10},"V"]]),
{2}
]],#}&/@TutteGraphs

TutteGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[
#,
AdditionalData->Join[Table[True,GraphData[{"Coprime",10},"V"]],Table[False,cn]],
SameTest->Equal
]
}&/@TutteGraphs;

SymmetricEmbeddingsWithOrientations=DeleteCases[
TutteGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]

Select[SymmetricEmbeddingsWithOrientations[[All,1]],Count[OuterFace[#],_?(GreaterThan[GraphData[{"Coprime",10},"V"]])]==0&]

MinimalCrossing construction Random 1k [XXX s]

(cn=CrossingNumber[GraphData[{"Coprime",10}],TimeConstraint->1])//AbsoluteTiming

Length[diagrams=DistinctMinimalCrossingDiagramData[
GraphData[{"Coprime",10}],
1000,
"CrossingNumber"->cn,
EdgeShapeFunction->"BezierEdge"
]]//AbsoluteTiming

No crossing points on the boundary:

Length[diagrams0=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==0&],"Graph",{}]]//Timing

Take[diagrams0,UpTo[10]]

One crossing point on the boundary:

Length[diagrams1=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==1&],"Graph",{}]]//Timing

Take[diagrams1,UpTo[10]]

graphs=#["Graph"]&/@diagrams;

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[#]
}&/@graphs;//AbsoluteTiming

MaxMemoryUsed[]/10^9.GB

Symmetric embeddings:

Length[SymmetricMinimalEmbeddingData=DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]
]//AbsoluteTiming

SymmetricMinimalEmbeddingData

SymmetricMinimalEmbeddingGraphs=SymmetricMinimalEmbeddingData[[All,1]]

GraphCrossingCount/@SymmetricMinimalEmbeddingGraphs

GraphCrossingDiagram/@SymmetricMinimalEmbeddingGraphs

MinimalCrossing construction Random 5k [XXX s]

(cn=CrossingNumber[GraphData[{"Coprime",10}],TimeConstraint->1])//AbsoluteTiming

Length[diagrams=DistinctMinimalCrossingDiagramData[
GraphData[{"Coprime",10}],
5000,
"CrossingNumber"->cn,
EdgeShapeFunction->"BezierEdge"
]]//AbsoluteTiming

No crossing points on the boundary:

Length[diagrams0=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==0&],"Graph",{}]]//Timing

Take[diagrams0,UpTo[10]]

One crossing point on the boundary:

Length[diagrams1=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==1&],"Graph",{}]]//Timing

Take[diagrams1,UpTo[10]]

graphs=#["Graph"]&/@diagrams;

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[#]
}&/@graphs;//AbsoluteTiming

MaxMemoryUsed[]/10^9.GB

Symmetric embeddings:

Length[SymmetricMinimalEmbeddingData=DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]
]//AbsoluteTiming

SymmetricMinimalEmbeddingData

SymmetricMinimalEmbeddingGraphs=SymmetricMinimalEmbeddingData[[All,1]]

GraphCrossingCount/@SymmetricMinimalEmbeddingGraphs

GraphCrossingDiagram/@SymmetricMinimalEmbeddingGraphs

MinimalCrossing construction Random 20k [XXX s]

(cn=CrossingNumber[GraphData[{"Coprime",10}],TimeConstraint->1])//AbsoluteTiming

Length[diagrams=DistinctMinimalCrossingDiagramData[
GraphData[{"Coprime",10}],
20*^3,
"CrossingNumber"->cn,
EdgeShapeFunction->"BezierEdge"
]]//AbsoluteTiming

No crossing points on the boundary:

Length[diagrams0=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==0&],"Graph",{}]]//Timing

Take[diagrams0,UpTo[10]]

One crossing point on the boundary:

Length[diagrams1=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==1&],"Graph",{}]]//Timing

Take[diagrams1,UpTo[10]]

graphs=#["Graph"]&/@diagrams;

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[#]
}&/@graphs;//AbsoluteTiming

MaxMemoryUsed[]/10^9.GB

Symmetric embeddings:

Length[SymmetricMinimalEmbeddingData=DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]
]//AbsoluteTiming

SymmetricMinimalEmbeddingData

SymmetricMinimalEmbeddingGraphs=SymmetricMinimalEmbeddingData[[All,1]]

GraphCrossingCount/@SymmetricMinimalEmbeddingGraphs

GraphCrossingDiagram/@SymmetricMinimalEmbeddingGraphs

MinimalCrossing construction Random 1k [old]

(cn=CrossingNumber[GraphData[{"Coprime",10}],TimeConstraint->1])//AbsoluteTiming

(RandomGraphs=Table[MinimalCrossingGraph[GraphData[{"Coprime",10}],"CrossingNumber"->cn,RandomSeed->n],{n,1000}]//Union);//Timing

RandomGraphsWithOuterCrossingPointCounts={
#,
Count[OuterFace[#],_?(GreaterThan[GraphData[{"Coprime",10},"V"]])]
}&/@RandomGraphs;

Small numbers of crossing points on the boundary:

Cases[RandomGraphsWithOuterCrossingPointCounts,{g_,0}:>g]

Cases[RandomGraphsWithOuterCrossingPointCounts,{g_,1}:>g]

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[
#,
AdditionalData->Join[Table[True,GraphData[{"Coprime",10},"V"]],Table[False,cn]],
SameTest->Equal
]
}&/@RandomGraphs;

MaxMemoryUsed[]/10^9.GB

DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]/.g_Graph:>BilateralGraph[CenterGraph@g,"ReturnNonbilateralGraph"->True]

MinimalCrossing construction Random 20k [old]

(cn=CrossingNumber[GraphData[{"Coprime",10}],TimeConstraint->1])//AbsoluteTiming

(RandomGraphs=Table[MinimalCrossingGraph[GraphData[{"Coprime",10}],"CrossingNumber"->cn,RandomSeed->n],{n,20000}]//Union);//Timing

RandomGraphsWithOuterCrossingPointCounts={
#,
Count[OuterFace[#],_?(GreaterThan[GraphData[{"Coprime",10},"V"]])]
}&/@RandomGraphs;

Small numbers of crossing points on the boundary:

Cases[RandomGraphsWithOuterCrossingPointCounts,{g_,0}:>g]

Cases[RandomGraphsWithOuterCrossingPointCounts,{g_,1}:>g]

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[
#,
AdditionalData->Join[Table[True,GraphData[{"Coprime",10},"V"]],Table[False,cn]],
SameTest->Equal
]
}&/@RandomGraphs;

MaxMemoryUsed[]/10^9.GB

DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]/.g_Graph:>BilateralGraph[CenterGraph@g,"ReturnNonbilateralGraph"->True]

MinimalLocalCrossing

GraphData[{"Coprime",10},{"LocalCrossingNumber","RectilinearLocalCrossingNumber"}]

GraphData[{"Coprime",10},"Graph","MinimalLocalCrossing"]//StyleGraphs

MinimalRectilinearLocalCrossing

GraphData[{"Coprime",10},{"LocalCrossingNumber","RectilinearLocalCrossingNumber"}]

GraphData[{"Coprime",10},"Graph","MinimalRectilinearLocalCrossing"]//StyleGraphs

MinimaRectilinearlLocalCrossing construction 1000

AdjacentCrossingsQ[g_Graph,cn_Integer]:=Module[{a=AdjacencyList[g],n=VertexCount[g]-cn},Max[Take[a,-cn]]>n]

(cn=CrossingNumber[GraphData[{"Coprime",10}],TimeConstraint->10])//AbsoluteTiming

(gs=Select[Table[MinimalCrossingGraph[GraphData[{"Coprime",10}],"CrossingNumber"->cn,RandomSeed->i],{i,1000}],!AdjacentCrossingsQ[#,cn]&]//Union)//Timing

MinimaRectilinearlLocalCrossing construction 20000

AdjacentCrossingsQ[g_Graph,cn_Integer]:=Module[{a=AdjacencyList[g],n=VertexCount[g]-cn},Max[Take[a,-cn]]>n]

(cn=CrossingNumber[GraphData[{"Coprime",10}],TimeConstraint->10])//AbsoluteTiming

(gs=Select[Table[MinimalCrossingGraph[GraphData[{"Coprime",10}],"CrossingNumber"->cn,RandomSeed->i],{i,20000}],!AdjacentCrossingsQ[#,cn]&]//Union)//Timing

Circulant

GraphData[{"Coprime",10},"Circulant"]

GraphData[{"Coprime",10},"Graph","Circulant"]//StyleGraphs

Circulant construction

GraphData[{"Coprime",10},"NotationRules","Circulant"]

(ci=CirculantIndices[GraphData[{"Coprime",10}]])//AbsoluteTiming

CirculantGraph1@@@ci

Cases[GraphData[{"Coprime",10},"StandardNames"],{"Circulant",i_}:>i]

CirculantGraph1@@@%

Complement graph

compl=GraphData[{"Coprime",10},"ComplementGraph","Name"]

Line graph

GraphData[{"Coprime",10},"Line"]

LineGraphQ[GraphData[{"Coprime",10}]]//Timing

RootGraph

roots=Select[GraphData[All],GraphData[#,"LineGraph","Name"]==={"Coprime",10}&]

RootGraph[GraphData[{"Coprime",10}]]

Halin

GraphData[{"Coprime",10},"Halin"]

GraphData[{"Coprime",10},"Graph","Halin"]//StyleGraphs

Rigid

GraphData[{"Coprime",10},"Rigid"]

GraphData[{"Coprime",10},"Graph","Rigid"]//StyleGraphs

Flexible

GraphData[{"Coprime",10},"Flexible"]

GraphData[{"Coprime",10},"Graph","Flexible"]//StyleGraphs

Voltage

GraphData[{"Coprime",10},"Graph","Voltage"]//StyleGraphs

Voltage construction

gs=VoltageGraph[GraphData[{"Coprime",10}],"MaxResults"->20,Debug->True]

Length[gs]

RecognizeGraph/@gs

VoltageGraphNotation/@gs//Column

EmbeddingClasses/@gs//Column

GraphSymmetryGroup/@gs//Column

LCF

GraphData[{"Coprime",10},"LCF"]

GraphData[{"Coprime",10},"HamiltonianCycleCount"]

GraphData[{"Coprime",10},"LCFSignature"]

GraphData[{"Coprime",10},"LCFNotations"]

GraphData[{"Coprime",10},"Graph","LCF"]//StyleGraphs

Tally[LCFNotation[#][[2]]&/@%]

UnitDistance

GraphData[{"Coprime",10},"UnitDistance"]

UnitDistanceGraphQ[GraphData[{"Coprime",10}],Debug->True]//Timing

GraphData[{"Coprime",10},"Graph","UnitDistance"]//StyleGraphs

UnitDistance by refinement of default embeddings

Graph[edge list]

(g=UnitDistanceEmbeddingRefine[Graph[GraphData[{"Coprime",10},"EdgeList"]],MaxIterations->500])//Timing

UnitDistanceGraphEmbeddingQ[g]

Graph[vertex list, edge list]

(g=UnitDistanceEmbeddingRefine[Graph[GraphData[{"Coprime",10},"VertexList"],GraphData[{"Coprime",10},"EdgeList"]],MaxIterations->500])//Timing

UnitDistanceGraphEmbeddingQ[g]

UnitDistance by refinement of existing embeddings

gs=UnitDistanceEmbeddingRefine[Graph[VertexList[#],EdgeList[#],VertexCoordinates->GraphEmbedding[#]],MaxIterations->500]&/@Complement@@(GraphData[{"Coprime",10},"Graph",#]&/@{"All","UnitDistance"})

TextGrid[
gdata=SortBy[
{#,DegenerateGraphEmbeddingQ[#],GraphSymmetryGroup[#],Max[Abs[EdgeLengths[#]-1]]}&/@gs,
Last
],
Dividers->All
]

Cases[gdata,{__,0.}]

Symmetric:

gs=Cases[
gdata,
{g_,_,sym:Except[TransformationGroup[{}]],diff_}:>{
HighlightGraph[g1=BilateralGraph[CenterGraph[g],"ReturnNonbilateralGraph"->True],Flatten[FindCoincidentVertices[g1]]],
sym,
diff
}]

UnitDistance by FindUnitDistanceEmbedding  (random embeddings returning on messages)

gs=FindUnitDistanceEmbedding[GraphData[{"Coprime",10}],50,"ReturnWithMessage"->True];//Quiet//Timing

gdata=SortBy[
{#,Max[Abs[EdgeLengths[#]-1]]}&/@gs,
Last
]

Cases[gdata,{g_?UnitDistanceGraphEmbeddingQ,_}:>g]

SymmetricEmebddings=Select[gdata,GraphSymmetryGroup[#[[1]]]=!=TransformationGroup[{}]&]

UnitDistance by FindUnitDistanceEmbedding  (random embedding waiting until UD is found)

FindUnitDistanceEmbedding[GraphData[{"Coprime",10}],"ReturnWithMessage"->False]//Quiet//Timing

Matchstick

GraphData[{"Coprime",10},"Matchstick"]

GraphData[{"Coprime",10},"Graph","Matchstick"]//StyleGraphs

3D default

Graph3D[GraphData[{"Coprime",10},"Edges"]]

3D construction

3D All

GraphData[{"Coprime",10},"Graph",{"3D","All"}]

3D UnitDistance construction Random

GraphData[{"Coprime",10},"Dimension"]

(g=UnitDistanceEmbeddingRefine[
Graph3D[
GraphData[{"Coprime",10},"VertexList"],
GraphData[{"Coprime",10},"EdgeList"]
],
WorkingPrecision->25])//Timing

EdgeLengths[g]

UnitDistanceGraphEmbeddingQ[g]

3D UnitDistance

GraphData[{"Coprime",10},"Graph",{"3D","UnitDistance"}]

3D Polyhedron

GraphData[{"Coprime",10},"Polyhedral"]

GraphData[{"Coprime",10},"Graph",{"3D","Polyhedron"}]

{"Coprime", 11}

Names

GraphData[{"Coprime",11},"StandardName"]

GraphData[{"Coprime",11},"StandardNames"]

HouseOfGraphs

hogid=GraphData[{"Coprime",11},"NotationRules","HouseOfGraphs"]

HouseOfGraphsLookup[hogid]

HouseOfGraphsGraph[hogid]//StyleGraphs[#,ImageSize->Small]&

Wikidata

GraphData[{"Coprime",11},"WikidataID"]

GraphData[{"Coprime",11},"WikidataID","URL"]

Primary

GraphData[{"Coprime",11}]//StyleGraphs[#,ImageSize->Small]&

All

GraphData[{"Coprime",11},"Graph","All"]//StyleGraphs

CurvedEdge

GraphData[{"Coprime",11},"Graph","CurvedEdge"]//StyleGraphs

Inexact

Select[GraphData[{"Coprime",11},"Graph","All"],(!FreeQ[GraphEmbedding[#],_?InexactNumberQ]&)]//StyleGraphs

Degenerate

GraphData[{"Coprime",11},"Graph","Degenerate"]//StyleGraphs

DegenerateGraphEmbeddingTypes/@GraphData[{"Coprime",11},"Graph","Degenerate"]//Column

Embeddings

GraphDataEmbeddings[GraphData[{"Coprime",11}]]

Default embedding

g0=GraphPlot[Graph[GraphData[{"Coprime",11},"VertexList"],GraphData[{"Coprime",11},"Edges"]]]

Configuration

GraphData[{"Coprime",11},"Configuration"]

configurations=GraphData[{"Coprime",11},"Graph","Configuration"]//StyleGraphs

GeneralizedPetersen

GraphData[{"Coprime",11},"Graph","GeneralizedPetersen"]//StyleGraphs

IGraph

GraphData[{"Coprime",11},"Graph","IGraph"]//StyleGraphs

CompleteKPartite

GraphData[{"Coprime",11},"Graph","CompleteKPartite"]//StyleGraphs

Bipartite

GraphData[{"Coprime",11},"Bipartite"]

GraphData[{"Coprime",11},"Graph","Bipartite"]//StyleGraphs

Bilateral

GraphData[{"Coprime",11},"Graph","Bilateral"]//StyleGraphs

Grid[DeleteCases[Monitor[{g=#,BilateralGraphEmbeddingTypes[#],GraphSymmetryGroup[#]}&/@GraphData[{"Coprime",11},"Graph","All"],g],{_,_,TransformationGroup[{}]}],Dividers->All,Alignment->{{Center,{Left}}}]//Quiet

Circular

GraphData[{"Coprime",11},"Graph","Circular"]//StyleGraphs

Circular construction All

GraphData[{"Coprime",11},"Hamiltonian"]

GraphData[{"Coprime",11},"HamiltonianCycles"]

GraphData[{"Coprime",11},"HamiltonianCycleCount"]

GraphData[{"Coprime",11},"LCF"]

GraphData[{"Coprime",11},"LCFSignature"]

Length[hc=FindHamiltonianCycle[GraphData[{"Coprime",11}],All][[All,All,1]]]//Timing

gs=CircularEmbeddingFromHamiltonianCycle[GraphData[{"Coprime",11}],#]&/@Take[hc,1]

Length[hcsym=SymmetricHamiltonianCycles[GraphData[{"Coprime",11}],hc,ProgressReporting->True]]//Timing

GroupBy[SymmetricHamiltonianCycleGraph[GraphData[{"Coprime",11}],#]&/@hcsym,GraphSymmetryGroup]

Planar

GraphData[{"Coprime",11},"Planar"]

GraphData[{"Coprime",11},"Graph","Planar"]//StyleGraphs

MinimalCrossingNumber crossings.uos.de

CrossingNumber[GraphData[{"Coprime",11}],Method->"WebCompute"]//AbsoluteTiming

DateString[]

Quit

MinimalCrossingNumber: "EmbeddingScheme" -> 1

(cn=CrossingNumber[GraphData[{"Coprime",11}],"EmbeddingScheme"->1,TimeConstraint->1])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",11}],"EmbeddingScheme"->1,TimeConstraint->10])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",11}],"EmbeddingScheme"->1,TimeConstraint->60])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",11}],"EmbeddingScheme"->1,TimeConstraint->3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",11}],"EmbeddingScheme"->1,TimeConstraint->5 3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",11}],"EmbeddingScheme"->1,TimeConstraint->86400])//AbsoluteTiming

MinimalCrossingNumber: "EmbeddingScheme" -> 2

(cn=CrossingNumber[GraphData[{"Coprime",11}],"EmbeddingScheme"->2,TimeConstraint->1])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",11}],"EmbeddingScheme"->2,TimeConstraint->10])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",11}],"EmbeddingScheme"->2,TimeConstraint->60])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",11}],"EmbeddingScheme"->2,TimeConstraint->3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",11}],"EmbeddingScheme"->2,TimeConstraint->5 3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",11}],"EmbeddingScheme"->2,TimeConstraint->86400])//AbsoluteTiming

MinimalCrossingNumber: "EmbeddingScheme" -> 3

(cn=CrossingNumber[GraphData[{"Coprime",11}],"EmbeddingScheme"->3,TimeConstraint->1])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",11}],"EmbeddingScheme"->3,TimeConstraint->10])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",11}],"EmbeddingScheme"->3,TimeConstraint->60])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",11}],"EmbeddingScheme"->3,TimeConstraint->3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",11}],"EmbeddingScheme"->3,TimeConstraint->5 3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",11}],"EmbeddingScheme"->3,TimeConstraint->86400])//AbsoluteTiming

Quit

MinimalCrossing

GraphData[{"Coprime",11},"CN"]

(gs=GraphData[{"Coprime",11},"Graph","MinimalCrossing"])//StyleGraphs

GraphCrossingCount/@gs

GraphCrossingDiagram/@gs

MinimalRectilinearCrossing

GraphData[{"Coprime",11},"RCN"]

GraphData[{"Coprime",11},"Graph","MinimalRectilinearCrossing"]//StyleGraphs

MinimalRectilinearCrossing construction order X [minimum RCN == ]

Length[gs=FindMinimalRectilinearCrossingGraph[GraphData[{"Coprime",11}],Automatic,All,"Size"->Automatic,Method->"SubgraphIsomorphism",Debug->True]]//Timing

MaxMemoryUsed[]/10^9. GB

Tally[RectilinearCrossingCount/@gs]//Timing

Tally[RectilinearLocalCrossingCount/@gs]//Timing

GraphSymmetryGroup/@gs//Tally

Select[gs,GraphSymmetryGroup[#]=!=TransformationGroup[{}]&]

Take[gs,UpTo[100]]

MinimalRectilinearCrossing construction order X [minimum RCN == ]

Length[gs=FindMinimalRectilinearCrossingGraph[GraphData[{"Coprime",11}],Automatic,All,"Size"->XXX,Method->"SubgraphIsomorphism",Debug->True]]//Timing

MaxMemoryUsed[]/10^9. GB

Tally[RectilinearCrossingCount/@gs]//Timing

Tally[RectilinearLocalCrossingCount/@gs]//Timing

GraphSymmetryGroup/@gs//Tally

Select[gs,GraphSymmetryGroup[#]=!=TransformationGroup[{}]&]

Take[gs,UpTo[100]]

MinimalCrossing construction Tutte

(cn=CrossingNumber[GraphData[{"Coprime",11}],TimeConstraint->1])//AbsoluteTiming

(g=MinimalCrossingGraph[GraphData[{"Coprime",11}],"CrossingNumber"->cn])//PolyhedralGraphQ//AbsoluteTiming

faces=ReverseSort@SymmetricallyDistinctFaces[g]

Tally[ReverseSort[Length/@faces]]

TutteGraphs=BilateralGraph[CenterGraph@IGLayoutTutte[g,"OuterFace"->#],"ReturnNonbilateralGraph"->True]&/@faces

TutteGraphsWithOuterCrossingPointCounts={
#,
Count[OuterFace[#],_?(GreaterThan[GraphData[{"Coprime",11},"V"]])]
}&/@TutteGraphs;

Cases[TutteGraphsWithOuterCrossingPointCounts,{g_,0}:>g]

Cases[TutteGraphsWithOuterCrossingPointCounts,{g_,1}:>g]

LocalCrossingNumberWithEmbeddings=
{1+Max[Length/@DeleteCases[
Drop[AdjacencyList[#],GraphData[{"Coprime",11},"V"]],
_Integer?(LessEqualThan[GraphData[{"Coprime",11},"V"]]),
{2}
]],#}&/@TutteGraphs

TutteGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[
#,
AdditionalData->Join[Table[True,GraphData[{"Coprime",11},"V"]],Table[False,cn]],
SameTest->Equal
]
}&/@TutteGraphs;

SymmetricEmbeddingsWithOrientations=DeleteCases[
TutteGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]

Select[SymmetricEmbeddingsWithOrientations[[All,1]],Count[OuterFace[#],_?(GreaterThan[GraphData[{"Coprime",11},"V"]])]==0&]

MinimalCrossing construction Random 1k [XXX s]

(cn=CrossingNumber[GraphData[{"Coprime",11}],TimeConstraint->1])//AbsoluteTiming

Length[diagrams=DistinctMinimalCrossingDiagramData[
GraphData[{"Coprime",11}],
1000,
"CrossingNumber"->cn,
EdgeShapeFunction->"BezierEdge"
]]//AbsoluteTiming

No crossing points on the boundary:

Length[diagrams0=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==0&],"Graph",{}]]//Timing

Take[diagrams0,UpTo[10]]

One crossing point on the boundary:

Length[diagrams1=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==1&],"Graph",{}]]//Timing

Take[diagrams1,UpTo[10]]

graphs=#["Graph"]&/@diagrams;

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[#]
}&/@graphs;//AbsoluteTiming

MaxMemoryUsed[]/10^9.GB

Symmetric embeddings:

Length[SymmetricMinimalEmbeddingData=DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]
]//AbsoluteTiming

SymmetricMinimalEmbeddingData

SymmetricMinimalEmbeddingGraphs=SymmetricMinimalEmbeddingData[[All,1]]

GraphCrossingCount/@SymmetricMinimalEmbeddingGraphs

GraphCrossingDiagram/@SymmetricMinimalEmbeddingGraphs

MinimalCrossing construction Random 5k [XXX s]

(cn=CrossingNumber[GraphData[{"Coprime",11}],TimeConstraint->1])//AbsoluteTiming

Length[diagrams=DistinctMinimalCrossingDiagramData[
GraphData[{"Coprime",11}],
5000,
"CrossingNumber"->cn,
EdgeShapeFunction->"BezierEdge"
]]//AbsoluteTiming

No crossing points on the boundary:

Length[diagrams0=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==0&],"Graph",{}]]//Timing

Take[diagrams0,UpTo[10]]

One crossing point on the boundary:

Length[diagrams1=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==1&],"Graph",{}]]//Timing

Take[diagrams1,UpTo[10]]

graphs=#["Graph"]&/@diagrams;

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[#]
}&/@graphs;//AbsoluteTiming

MaxMemoryUsed[]/10^9.GB

Symmetric embeddings:

Length[SymmetricMinimalEmbeddingData=DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]
]//AbsoluteTiming

SymmetricMinimalEmbeddingData

SymmetricMinimalEmbeddingGraphs=SymmetricMinimalEmbeddingData[[All,1]]

GraphCrossingCount/@SymmetricMinimalEmbeddingGraphs

GraphCrossingDiagram/@SymmetricMinimalEmbeddingGraphs

MinimalCrossing construction Random 20k [XXX s]

(cn=CrossingNumber[GraphData[{"Coprime",11}],TimeConstraint->1])//AbsoluteTiming

Length[diagrams=DistinctMinimalCrossingDiagramData[
GraphData[{"Coprime",11}],
20*^3,
"CrossingNumber"->cn,
EdgeShapeFunction->"BezierEdge"
]]//AbsoluteTiming

No crossing points on the boundary:

Length[diagrams0=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==0&],"Graph",{}]]//Timing

Take[diagrams0,UpTo[10]]

One crossing point on the boundary:

Length[diagrams1=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==1&],"Graph",{}]]//Timing

Take[diagrams1,UpTo[10]]

graphs=#["Graph"]&/@diagrams;

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[#]
}&/@graphs;//AbsoluteTiming

MaxMemoryUsed[]/10^9.GB

Symmetric embeddings:

Length[SymmetricMinimalEmbeddingData=DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]
]//AbsoluteTiming

SymmetricMinimalEmbeddingData

SymmetricMinimalEmbeddingGraphs=SymmetricMinimalEmbeddingData[[All,1]]

GraphCrossingCount/@SymmetricMinimalEmbeddingGraphs

GraphCrossingDiagram/@SymmetricMinimalEmbeddingGraphs

MinimalCrossing construction Random 1k [old]

(cn=CrossingNumber[GraphData[{"Coprime",11}],TimeConstraint->1])//AbsoluteTiming

(RandomGraphs=Table[MinimalCrossingGraph[GraphData[{"Coprime",11}],"CrossingNumber"->cn,RandomSeed->n],{n,1000}]//Union);//Timing

RandomGraphsWithOuterCrossingPointCounts={
#,
Count[OuterFace[#],_?(GreaterThan[GraphData[{"Coprime",11},"V"]])]
}&/@RandomGraphs;

Small numbers of crossing points on the boundary:

Cases[RandomGraphsWithOuterCrossingPointCounts,{g_,0}:>g]

Cases[RandomGraphsWithOuterCrossingPointCounts,{g_,1}:>g]

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[
#,
AdditionalData->Join[Table[True,GraphData[{"Coprime",11},"V"]],Table[False,cn]],
SameTest->Equal
]
}&/@RandomGraphs;

MaxMemoryUsed[]/10^9.GB

DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]/.g_Graph:>BilateralGraph[CenterGraph@g,"ReturnNonbilateralGraph"->True]

MinimalCrossing construction Random 20k [old]

(cn=CrossingNumber[GraphData[{"Coprime",11}],TimeConstraint->1])//AbsoluteTiming

(RandomGraphs=Table[MinimalCrossingGraph[GraphData[{"Coprime",11}],"CrossingNumber"->cn,RandomSeed->n],{n,20000}]//Union);//Timing

RandomGraphsWithOuterCrossingPointCounts={
#,
Count[OuterFace[#],_?(GreaterThan[GraphData[{"Coprime",11},"V"]])]
}&/@RandomGraphs;

Small numbers of crossing points on the boundary:

Cases[RandomGraphsWithOuterCrossingPointCounts,{g_,0}:>g]

Cases[RandomGraphsWithOuterCrossingPointCounts,{g_,1}:>g]

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[
#,
AdditionalData->Join[Table[True,GraphData[{"Coprime",11},"V"]],Table[False,cn]],
SameTest->Equal
]
}&/@RandomGraphs;

MaxMemoryUsed[]/10^9.GB

DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]/.g_Graph:>BilateralGraph[CenterGraph@g,"ReturnNonbilateralGraph"->True]

MinimalLocalCrossing

GraphData[{"Coprime",11},{"LocalCrossingNumber","RectilinearLocalCrossingNumber"}]

GraphData[{"Coprime",11},"Graph","MinimalLocalCrossing"]//StyleGraphs

MinimalRectilinearLocalCrossing

GraphData[{"Coprime",11},{"LocalCrossingNumber","RectilinearLocalCrossingNumber"}]

GraphData[{"Coprime",11},"Graph","MinimalRectilinearLocalCrossing"]//StyleGraphs

MinimaRectilinearlLocalCrossing construction 1000

AdjacentCrossingsQ[g_Graph,cn_Integer]:=Module[{a=AdjacencyList[g],n=VertexCount[g]-cn},Max[Take[a,-cn]]>n]

(cn=CrossingNumber[GraphData[{"Coprime",11}],TimeConstraint->10])//AbsoluteTiming

(gs=Select[Table[MinimalCrossingGraph[GraphData[{"Coprime",11}],"CrossingNumber"->cn,RandomSeed->i],{i,1000}],!AdjacentCrossingsQ[#,cn]&]//Union)//Timing

MinimaRectilinearlLocalCrossing construction 20000

AdjacentCrossingsQ[g_Graph,cn_Integer]:=Module[{a=AdjacencyList[g],n=VertexCount[g]-cn},Max[Take[a,-cn]]>n]

(cn=CrossingNumber[GraphData[{"Coprime",11}],TimeConstraint->10])//AbsoluteTiming

(gs=Select[Table[MinimalCrossingGraph[GraphData[{"Coprime",11}],"CrossingNumber"->cn,RandomSeed->i],{i,20000}],!AdjacentCrossingsQ[#,cn]&]//Union)//Timing

Circulant

GraphData[{"Coprime",11},"Circulant"]

GraphData[{"Coprime",11},"Graph","Circulant"]//StyleGraphs

Circulant construction

GraphData[{"Coprime",11},"NotationRules","Circulant"]

(ci=CirculantIndices[GraphData[{"Coprime",11}]])//AbsoluteTiming

CirculantGraph1@@@ci

Cases[GraphData[{"Coprime",11},"StandardNames"],{"Circulant",i_}:>i]

CirculantGraph1@@@%

Complement graph

compl=GraphData[{"Coprime",11},"ComplementGraph","Name"]

Line graph

GraphData[{"Coprime",11},"Line"]

LineGraphQ[GraphData[{"Coprime",11}]]//Timing

RootGraph

roots=Select[GraphData[All],GraphData[#,"LineGraph","Name"]==={"Coprime",11}&]

RootGraph[GraphData[{"Coprime",11}]]

Halin

GraphData[{"Coprime",11},"Halin"]

GraphData[{"Coprime",11},"Graph","Halin"]//StyleGraphs

Rigid

GraphData[{"Coprime",11},"Rigid"]

GraphData[{"Coprime",11},"Graph","Rigid"]//StyleGraphs

Flexible

GraphData[{"Coprime",11},"Flexible"]

GraphData[{"Coprime",11},"Graph","Flexible"]//StyleGraphs

Voltage

GraphData[{"Coprime",11},"Graph","Voltage"]//StyleGraphs

Voltage construction

gs=VoltageGraph[GraphData[{"Coprime",11}],"MaxResults"->20,Debug->True]

Length[gs]

RecognizeGraph/@gs

VoltageGraphNotation/@gs//Column

EmbeddingClasses/@gs//Column

GraphSymmetryGroup/@gs//Column

LCF

GraphData[{"Coprime",11},"LCF"]

GraphData[{"Coprime",11},"HamiltonianCycleCount"]

GraphData[{"Coprime",11},"LCFSignature"]

GraphData[{"Coprime",11},"LCFNotations"]

GraphData[{"Coprime",11},"Graph","LCF"]//StyleGraphs

Tally[LCFNotation[#][[2]]&/@%]

UnitDistance

GraphData[{"Coprime",11},"UnitDistance"]

UnitDistanceGraphQ[GraphData[{"Coprime",11}],Debug->True]//Timing

GraphData[{"Coprime",11},"Graph","UnitDistance"]//StyleGraphs

UnitDistance by refinement of default embeddings

Graph[edge list]

(g=UnitDistanceEmbeddingRefine[Graph[GraphData[{"Coprime",11},"EdgeList"]],MaxIterations->500])//Timing

UnitDistanceGraphEmbeddingQ[g]

Graph[vertex list, edge list]

(g=UnitDistanceEmbeddingRefine[Graph[GraphData[{"Coprime",11},"VertexList"],GraphData[{"Coprime",11},"EdgeList"]],MaxIterations->500])//Timing

UnitDistanceGraphEmbeddingQ[g]

UnitDistance by refinement of existing embeddings

gs=UnitDistanceEmbeddingRefine[Graph[VertexList[#],EdgeList[#],VertexCoordinates->GraphEmbedding[#]],MaxIterations->500]&/@Complement@@(GraphData[{"Coprime",11},"Graph",#]&/@{"All","UnitDistance"})

TextGrid[
gdata=SortBy[
{#,DegenerateGraphEmbeddingQ[#],GraphSymmetryGroup[#],Max[Abs[EdgeLengths[#]-1]]}&/@gs,
Last
],
Dividers->All
]

Cases[gdata,{__,0.}]

Symmetric:

gs=Cases[
gdata,
{g_,_,sym:Except[TransformationGroup[{}]],diff_}:>{
HighlightGraph[g1=BilateralGraph[CenterGraph[g],"ReturnNonbilateralGraph"->True],Flatten[FindCoincidentVertices[g1]]],
sym,
diff
}]

UnitDistance by FindUnitDistanceEmbedding  (random embeddings returning on messages)

gs=FindUnitDistanceEmbedding[GraphData[{"Coprime",11}],50,"ReturnWithMessage"->True];//Quiet//Timing

gdata=SortBy[
{#,Max[Abs[EdgeLengths[#]-1]]}&/@gs,
Last
]

Cases[gdata,{g_?UnitDistanceGraphEmbeddingQ,_}:>g]

SymmetricEmebddings=Select[gdata,GraphSymmetryGroup[#[[1]]]=!=TransformationGroup[{}]&]

UnitDistance by FindUnitDistanceEmbedding  (random embedding waiting until UD is found)

FindUnitDistanceEmbedding[GraphData[{"Coprime",11}],"ReturnWithMessage"->False]//Quiet//Timing

Matchstick

GraphData[{"Coprime",11},"Matchstick"]

GraphData[{"Coprime",11},"Graph","Matchstick"]//StyleGraphs

3D default

Graph3D[GraphData[{"Coprime",11},"Edges"]]

3D construction

3D All

GraphData[{"Coprime",11},"Graph",{"3D","All"}]

3D UnitDistance construction Random

GraphData[{"Coprime",11},"Dimension"]

(g=UnitDistanceEmbeddingRefine[
Graph3D[
GraphData[{"Coprime",11},"VertexList"],
GraphData[{"Coprime",11},"EdgeList"]
],
WorkingPrecision->25])//Timing

EdgeLengths[g]

UnitDistanceGraphEmbeddingQ[g]

3D UnitDistance

GraphData[{"Coprime",11},"Graph",{"3D","UnitDistance"}]

3D Polyhedron

GraphData[{"Coprime",11},"Polyhedral"]

GraphData[{"Coprime",11},"Graph",{"3D","Polyhedron"}]

{"Coprime", 12}

Names

GraphData[{"Coprime",12},"StandardName"]

GraphData[{"Coprime",12},"StandardNames"]

HouseOfGraphs

hogid=GraphData[{"Coprime",12},"NotationRules","HouseOfGraphs"]

HouseOfGraphsLookup[hogid]

HouseOfGraphsGraph[hogid]//StyleGraphs[#,ImageSize->Small]&

Wikidata

GraphData[{"Coprime",12},"WikidataID"]

GraphData[{"Coprime",12},"WikidataID","URL"]

Primary

GraphData[{"Coprime",12}]//StyleGraphs[#,ImageSize->Small]&

All

GraphData[{"Coprime",12},"Graph","All"]//StyleGraphs

CurvedEdge

GraphData[{"Coprime",12},"Graph","CurvedEdge"]//StyleGraphs

Inexact

Select[GraphData[{"Coprime",12},"Graph","All"],(!FreeQ[GraphEmbedding[#],_?InexactNumberQ]&)]//StyleGraphs

Degenerate

GraphData[{"Coprime",12},"Graph","Degenerate"]//StyleGraphs

DegenerateGraphEmbeddingTypes/@GraphData[{"Coprime",12},"Graph","Degenerate"]//Column

Embeddings

GraphDataEmbeddings[GraphData[{"Coprime",12}]]

Default embedding

g0=GraphPlot[Graph[GraphData[{"Coprime",12},"VertexList"],GraphData[{"Coprime",12},"Edges"]]]

Configuration

GraphData[{"Coprime",12},"Configuration"]

configurations=GraphData[{"Coprime",12},"Graph","Configuration"]//StyleGraphs

GeneralizedPetersen

GraphData[{"Coprime",12},"Graph","GeneralizedPetersen"]//StyleGraphs

IGraph

GraphData[{"Coprime",12},"Graph","IGraph"]//StyleGraphs

CompleteKPartite

GraphData[{"Coprime",12},"Graph","CompleteKPartite"]//StyleGraphs

Bipartite

GraphData[{"Coprime",12},"Bipartite"]

GraphData[{"Coprime",12},"Graph","Bipartite"]//StyleGraphs

Bilateral

GraphData[{"Coprime",12},"Graph","Bilateral"]//StyleGraphs

Grid[DeleteCases[Monitor[{g=#,BilateralGraphEmbeddingTypes[#],GraphSymmetryGroup[#]}&/@GraphData[{"Coprime",12},"Graph","All"],g],{_,_,TransformationGroup[{}]}],Dividers->All,Alignment->{{Center,{Left}}}]//Quiet

Circular

GraphData[{"Coprime",12},"Graph","Circular"]//StyleGraphs

Circular construction All

GraphData[{"Coprime",12},"Hamiltonian"]

GraphData[{"Coprime",12},"HamiltonianCycles"]

GraphData[{"Coprime",12},"HamiltonianCycleCount"]

GraphData[{"Coprime",12},"LCF"]

GraphData[{"Coprime",12},"LCFSignature"]

Length[hc=FindHamiltonianCycle[GraphData[{"Coprime",12}],All][[All,All,1]]]//Timing

gs=CircularEmbeddingFromHamiltonianCycle[GraphData[{"Coprime",12}],#]&/@Take[hc,1]

Length[hcsym=SymmetricHamiltonianCycles[GraphData[{"Coprime",12}],hc,ProgressReporting->True]]//Timing

GroupBy[SymmetricHamiltonianCycleGraph[GraphData[{"Coprime",12}],#]&/@hcsym,GraphSymmetryGroup]

Planar

GraphData[{"Coprime",12},"Planar"]

GraphData[{"Coprime",12},"Graph","Planar"]//StyleGraphs

MinimalCrossingNumber crossings.uos.de

CrossingNumber[GraphData[{"Coprime",12}],Method->"WebCompute"]//AbsoluteTiming

DateString[]

Quit

MinimalCrossingNumber: "EmbeddingScheme" -> 1

(cn=CrossingNumber[GraphData[{"Coprime",12}],"EmbeddingScheme"->1,TimeConstraint->1])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",12}],"EmbeddingScheme"->1,TimeConstraint->10])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",12}],"EmbeddingScheme"->1,TimeConstraint->60])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",12}],"EmbeddingScheme"->1,TimeConstraint->3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",12}],"EmbeddingScheme"->1,TimeConstraint->5 3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",12}],"EmbeddingScheme"->1,TimeConstraint->86400])//AbsoluteTiming

MinimalCrossingNumber: "EmbeddingScheme" -> 2

(cn=CrossingNumber[GraphData[{"Coprime",12}],"EmbeddingScheme"->2,TimeConstraint->1])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",12}],"EmbeddingScheme"->2,TimeConstraint->10])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",12}],"EmbeddingScheme"->2,TimeConstraint->60])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",12}],"EmbeddingScheme"->2,TimeConstraint->3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",12}],"EmbeddingScheme"->2,TimeConstraint->5 3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",12}],"EmbeddingScheme"->2,TimeConstraint->86400])//AbsoluteTiming

MinimalCrossingNumber: "EmbeddingScheme" -> 3

(cn=CrossingNumber[GraphData[{"Coprime",12}],"EmbeddingScheme"->3,TimeConstraint->1])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",12}],"EmbeddingScheme"->3,TimeConstraint->10])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",12}],"EmbeddingScheme"->3,TimeConstraint->60])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",12}],"EmbeddingScheme"->3,TimeConstraint->3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",12}],"EmbeddingScheme"->3,TimeConstraint->5 3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",12}],"EmbeddingScheme"->3,TimeConstraint->86400])//AbsoluteTiming

Quit

MinimalCrossing

GraphData[{"Coprime",12},"CN"]

(gs=GraphData[{"Coprime",12},"Graph","MinimalCrossing"])//StyleGraphs

GraphCrossingCount/@gs

GraphCrossingDiagram/@gs

MinimalRectilinearCrossing

GraphData[{"Coprime",12},"RCN"]

GraphData[{"Coprime",12},"Graph","MinimalRectilinearCrossing"]//StyleGraphs

MinimalRectilinearCrossing construction order X [minimum RCN == ]

Length[gs=FindMinimalRectilinearCrossingGraph[GraphData[{"Coprime",12}],Automatic,All,"Size"->Automatic,Method->"SubgraphIsomorphism",Debug->True]]//Timing

MaxMemoryUsed[]/10^9. GB

Tally[RectilinearCrossingCount/@gs]//Timing

Tally[RectilinearLocalCrossingCount/@gs]//Timing

GraphSymmetryGroup/@gs//Tally

Select[gs,GraphSymmetryGroup[#]=!=TransformationGroup[{}]&]

Take[gs,UpTo[100]]

MinimalRectilinearCrossing construction order X [minimum RCN == ]

Length[gs=FindMinimalRectilinearCrossingGraph[GraphData[{"Coprime",12}],Automatic,All,"Size"->XXX,Method->"SubgraphIsomorphism",Debug->True]]//Timing

MaxMemoryUsed[]/10^9. GB

Tally[RectilinearCrossingCount/@gs]//Timing

Tally[RectilinearLocalCrossingCount/@gs]//Timing

GraphSymmetryGroup/@gs//Tally

Select[gs,GraphSymmetryGroup[#]=!=TransformationGroup[{}]&]

Take[gs,UpTo[100]]

MinimalCrossing construction Tutte

(cn=CrossingNumber[GraphData[{"Coprime",12}],TimeConstraint->1])//AbsoluteTiming

(g=MinimalCrossingGraph[GraphData[{"Coprime",12}],"CrossingNumber"->cn])//PolyhedralGraphQ//AbsoluteTiming

faces=ReverseSort@SymmetricallyDistinctFaces[g]

Tally[ReverseSort[Length/@faces]]

TutteGraphs=BilateralGraph[CenterGraph@IGLayoutTutte[g,"OuterFace"->#],"ReturnNonbilateralGraph"->True]&/@faces

TutteGraphsWithOuterCrossingPointCounts={
#,
Count[OuterFace[#],_?(GreaterThan[GraphData[{"Coprime",12},"V"]])]
}&/@TutteGraphs;

Cases[TutteGraphsWithOuterCrossingPointCounts,{g_,0}:>g]

Cases[TutteGraphsWithOuterCrossingPointCounts,{g_,1}:>g]

LocalCrossingNumberWithEmbeddings=
{1+Max[Length/@DeleteCases[
Drop[AdjacencyList[#],GraphData[{"Coprime",12},"V"]],
_Integer?(LessEqualThan[GraphData[{"Coprime",12},"V"]]),
{2}
]],#}&/@TutteGraphs

TutteGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[
#,
AdditionalData->Join[Table[True,GraphData[{"Coprime",12},"V"]],Table[False,cn]],
SameTest->Equal
]
}&/@TutteGraphs;

SymmetricEmbeddingsWithOrientations=DeleteCases[
TutteGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]

Select[SymmetricEmbeddingsWithOrientations[[All,1]],Count[OuterFace[#],_?(GreaterThan[GraphData[{"Coprime",12},"V"]])]==0&]

MinimalCrossing construction Random 1k [XXX s]

(cn=CrossingNumber[GraphData[{"Coprime",12}],TimeConstraint->1])//AbsoluteTiming

Length[diagrams=DistinctMinimalCrossingDiagramData[
GraphData[{"Coprime",12}],
1000,
"CrossingNumber"->cn,
EdgeShapeFunction->"BezierEdge"
]]//AbsoluteTiming

No crossing points on the boundary:

Length[diagrams0=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==0&],"Graph",{}]]//Timing

Take[diagrams0,UpTo[10]]

One crossing point on the boundary:

Length[diagrams1=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==1&],"Graph",{}]]//Timing

Take[diagrams1,UpTo[10]]

graphs=#["Graph"]&/@diagrams;

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[#]
}&/@graphs;//AbsoluteTiming

MaxMemoryUsed[]/10^9.GB

Symmetric embeddings:

Length[SymmetricMinimalEmbeddingData=DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]
]//AbsoluteTiming

SymmetricMinimalEmbeddingData

SymmetricMinimalEmbeddingGraphs=SymmetricMinimalEmbeddingData[[All,1]]

GraphCrossingCount/@SymmetricMinimalEmbeddingGraphs

GraphCrossingDiagram/@SymmetricMinimalEmbeddingGraphs

MinimalCrossing construction Random 5k [XXX s]

(cn=CrossingNumber[GraphData[{"Coprime",12}],TimeConstraint->1])//AbsoluteTiming

Length[diagrams=DistinctMinimalCrossingDiagramData[
GraphData[{"Coprime",12}],
5000,
"CrossingNumber"->cn,
EdgeShapeFunction->"BezierEdge"
]]//AbsoluteTiming

No crossing points on the boundary:

Length[diagrams0=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==0&],"Graph",{}]]//Timing

Take[diagrams0,UpTo[10]]

One crossing point on the boundary:

Length[diagrams1=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==1&],"Graph",{}]]//Timing

Take[diagrams1,UpTo[10]]

graphs=#["Graph"]&/@diagrams;

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[#]
}&/@graphs;//AbsoluteTiming

MaxMemoryUsed[]/10^9.GB

Symmetric embeddings:

Length[SymmetricMinimalEmbeddingData=DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]
]//AbsoluteTiming

SymmetricMinimalEmbeddingData

SymmetricMinimalEmbeddingGraphs=SymmetricMinimalEmbeddingData[[All,1]]

GraphCrossingCount/@SymmetricMinimalEmbeddingGraphs

GraphCrossingDiagram/@SymmetricMinimalEmbeddingGraphs

MinimalCrossing construction Random 20k [XXX s]

(cn=CrossingNumber[GraphData[{"Coprime",12}],TimeConstraint->1])//AbsoluteTiming

Length[diagrams=DistinctMinimalCrossingDiagramData[
GraphData[{"Coprime",12}],
20*^3,
"CrossingNumber"->cn,
EdgeShapeFunction->"BezierEdge"
]]//AbsoluteTiming

No crossing points on the boundary:

Length[diagrams0=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==0&],"Graph",{}]]//Timing

Take[diagrams0,UpTo[10]]

One crossing point on the boundary:

Length[diagrams1=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==1&],"Graph",{}]]//Timing

Take[diagrams1,UpTo[10]]

graphs=#["Graph"]&/@diagrams;

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[#]
}&/@graphs;//AbsoluteTiming

MaxMemoryUsed[]/10^9.GB

Symmetric embeddings:

Length[SymmetricMinimalEmbeddingData=DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]
]//AbsoluteTiming

SymmetricMinimalEmbeddingData

SymmetricMinimalEmbeddingGraphs=SymmetricMinimalEmbeddingData[[All,1]]

GraphCrossingCount/@SymmetricMinimalEmbeddingGraphs

GraphCrossingDiagram/@SymmetricMinimalEmbeddingGraphs

MinimalCrossing construction Random 1k [old]

(cn=CrossingNumber[GraphData[{"Coprime",12}],TimeConstraint->1])//AbsoluteTiming

(RandomGraphs=Table[MinimalCrossingGraph[GraphData[{"Coprime",12}],"CrossingNumber"->cn,RandomSeed->n],{n,1000}]//Union);//Timing

RandomGraphsWithOuterCrossingPointCounts={
#,
Count[OuterFace[#],_?(GreaterThan[GraphData[{"Coprime",12},"V"]])]
}&/@RandomGraphs;

Small numbers of crossing points on the boundary:

Cases[RandomGraphsWithOuterCrossingPointCounts,{g_,0}:>g]

Cases[RandomGraphsWithOuterCrossingPointCounts,{g_,1}:>g]

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[
#,
AdditionalData->Join[Table[True,GraphData[{"Coprime",12},"V"]],Table[False,cn]],
SameTest->Equal
]
}&/@RandomGraphs;

MaxMemoryUsed[]/10^9.GB

DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]/.g_Graph:>BilateralGraph[CenterGraph@g,"ReturnNonbilateralGraph"->True]

MinimalCrossing construction Random 20k [old]

(cn=CrossingNumber[GraphData[{"Coprime",12}],TimeConstraint->1])//AbsoluteTiming

(RandomGraphs=Table[MinimalCrossingGraph[GraphData[{"Coprime",12}],"CrossingNumber"->cn,RandomSeed->n],{n,20000}]//Union);//Timing

RandomGraphsWithOuterCrossingPointCounts={
#,
Count[OuterFace[#],_?(GreaterThan[GraphData[{"Coprime",12},"V"]])]
}&/@RandomGraphs;

Small numbers of crossing points on the boundary:

Cases[RandomGraphsWithOuterCrossingPointCounts,{g_,0}:>g]

Cases[RandomGraphsWithOuterCrossingPointCounts,{g_,1}:>g]

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[
#,
AdditionalData->Join[Table[True,GraphData[{"Coprime",12},"V"]],Table[False,cn]],
SameTest->Equal
]
}&/@RandomGraphs;

MaxMemoryUsed[]/10^9.GB

DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]/.g_Graph:>BilateralGraph[CenterGraph@g,"ReturnNonbilateralGraph"->True]

MinimalLocalCrossing

GraphData[{"Coprime",12},{"LocalCrossingNumber","RectilinearLocalCrossingNumber"}]

GraphData[{"Coprime",12},"Graph","MinimalLocalCrossing"]//StyleGraphs

MinimalRectilinearLocalCrossing

GraphData[{"Coprime",12},{"LocalCrossingNumber","RectilinearLocalCrossingNumber"}]

GraphData[{"Coprime",12},"Graph","MinimalRectilinearLocalCrossing"]//StyleGraphs

MinimaRectilinearlLocalCrossing construction 1000

AdjacentCrossingsQ[g_Graph,cn_Integer]:=Module[{a=AdjacencyList[g],n=VertexCount[g]-cn},Max[Take[a,-cn]]>n]

(cn=CrossingNumber[GraphData[{"Coprime",12}],TimeConstraint->10])//AbsoluteTiming

(gs=Select[Table[MinimalCrossingGraph[GraphData[{"Coprime",12}],"CrossingNumber"->cn,RandomSeed->i],{i,1000}],!AdjacentCrossingsQ[#,cn]&]//Union)//Timing

MinimaRectilinearlLocalCrossing construction 20000

AdjacentCrossingsQ[g_Graph,cn_Integer]:=Module[{a=AdjacencyList[g],n=VertexCount[g]-cn},Max[Take[a,-cn]]>n]

(cn=CrossingNumber[GraphData[{"Coprime",12}],TimeConstraint->10])//AbsoluteTiming

(gs=Select[Table[MinimalCrossingGraph[GraphData[{"Coprime",12}],"CrossingNumber"->cn,RandomSeed->i],{i,20000}],!AdjacentCrossingsQ[#,cn]&]//Union)//Timing

Circulant

GraphData[{"Coprime",12},"Circulant"]

GraphData[{"Coprime",12},"Graph","Circulant"]//StyleGraphs

Circulant construction

GraphData[{"Coprime",12},"NotationRules","Circulant"]

(ci=CirculantIndices[GraphData[{"Coprime",12}]])//AbsoluteTiming

CirculantGraph1@@@ci

Cases[GraphData[{"Coprime",12},"StandardNames"],{"Circulant",i_}:>i]

CirculantGraph1@@@%

Complement graph

compl=GraphData[{"Coprime",12},"ComplementGraph","Name"]

Line graph

GraphData[{"Coprime",12},"Line"]

LineGraphQ[GraphData[{"Coprime",12}]]//Timing

RootGraph

roots=Select[GraphData[All],GraphData[#,"LineGraph","Name"]==={"Coprime",12}&]

RootGraph[GraphData[{"Coprime",12}]]

Halin

GraphData[{"Coprime",12},"Halin"]

GraphData[{"Coprime",12},"Graph","Halin"]//StyleGraphs

Rigid

GraphData[{"Coprime",12},"Rigid"]

GraphData[{"Coprime",12},"Graph","Rigid"]//StyleGraphs

Flexible

GraphData[{"Coprime",12},"Flexible"]

GraphData[{"Coprime",12},"Graph","Flexible"]//StyleGraphs

Voltage

GraphData[{"Coprime",12},"Graph","Voltage"]//StyleGraphs

Voltage construction

gs=VoltageGraph[GraphData[{"Coprime",12}],"MaxResults"->20,Debug->True]

Length[gs]

RecognizeGraph/@gs

VoltageGraphNotation/@gs//Column

EmbeddingClasses/@gs//Column

GraphSymmetryGroup/@gs//Column

LCF

GraphData[{"Coprime",12},"LCF"]

GraphData[{"Coprime",12},"HamiltonianCycleCount"]

GraphData[{"Coprime",12},"LCFSignature"]

GraphData[{"Coprime",12},"LCFNotations"]

GraphData[{"Coprime",12},"Graph","LCF"]//StyleGraphs

Tally[LCFNotation[#][[2]]&/@%]

UnitDistance

GraphData[{"Coprime",12},"UnitDistance"]

UnitDistanceGraphQ[GraphData[{"Coprime",12}],Debug->True]//Timing

GraphData[{"Coprime",12},"Graph","UnitDistance"]//StyleGraphs

UnitDistance by refinement of default embeddings

Graph[edge list]

(g=UnitDistanceEmbeddingRefine[Graph[GraphData[{"Coprime",12},"EdgeList"]],MaxIterations->500])//Timing

UnitDistanceGraphEmbeddingQ[g]

Graph[vertex list, edge list]

(g=UnitDistanceEmbeddingRefine[Graph[GraphData[{"Coprime",12},"VertexList"],GraphData[{"Coprime",12},"EdgeList"]],MaxIterations->500])//Timing

UnitDistanceGraphEmbeddingQ[g]

UnitDistance by refinement of existing embeddings

gs=UnitDistanceEmbeddingRefine[Graph[VertexList[#],EdgeList[#],VertexCoordinates->GraphEmbedding[#]],MaxIterations->500]&/@Complement@@(GraphData[{"Coprime",12},"Graph",#]&/@{"All","UnitDistance"})

TextGrid[
gdata=SortBy[
{#,DegenerateGraphEmbeddingQ[#],GraphSymmetryGroup[#],Max[Abs[EdgeLengths[#]-1]]}&/@gs,
Last
],
Dividers->All
]

Cases[gdata,{__,0.}]

Symmetric:

gs=Cases[
gdata,
{g_,_,sym:Except[TransformationGroup[{}]],diff_}:>{
HighlightGraph[g1=BilateralGraph[CenterGraph[g],"ReturnNonbilateralGraph"->True],Flatten[FindCoincidentVertices[g1]]],
sym,
diff
}]

UnitDistance by FindUnitDistanceEmbedding  (random embeddings returning on messages)

gs=FindUnitDistanceEmbedding[GraphData[{"Coprime",12}],50,"ReturnWithMessage"->True];//Quiet//Timing

gdata=SortBy[
{#,Max[Abs[EdgeLengths[#]-1]]}&/@gs,
Last
]

Cases[gdata,{g_?UnitDistanceGraphEmbeddingQ,_}:>g]

SymmetricEmebddings=Select[gdata,GraphSymmetryGroup[#[[1]]]=!=TransformationGroup[{}]&]

UnitDistance by FindUnitDistanceEmbedding  (random embedding waiting until UD is found)

FindUnitDistanceEmbedding[GraphData[{"Coprime",12}],"ReturnWithMessage"->False]//Quiet//Timing

Matchstick

GraphData[{"Coprime",12},"Matchstick"]

GraphData[{"Coprime",12},"Graph","Matchstick"]//StyleGraphs

3D default

Graph3D[GraphData[{"Coprime",12},"Edges"]]

3D construction

3D All

GraphData[{"Coprime",12},"Graph",{"3D","All"}]

3D UnitDistance construction Random

GraphData[{"Coprime",12},"Dimension"]

(g=UnitDistanceEmbeddingRefine[
Graph3D[
GraphData[{"Coprime",12},"VertexList"],
GraphData[{"Coprime",12},"EdgeList"]
],
WorkingPrecision->25])//Timing

EdgeLengths[g]

UnitDistanceGraphEmbeddingQ[g]

3D UnitDistance

GraphData[{"Coprime",12},"Graph",{"3D","UnitDistance"}]

3D Polyhedron

GraphData[{"Coprime",12},"Polyhedral"]

GraphData[{"Coprime",12},"Graph",{"3D","Polyhedron"}]

{"Coprime", 13}

Names

GraphData[{"Coprime",13},"StandardName"]

GraphData[{"Coprime",13},"StandardNames"]

HouseOfGraphs

hogid=GraphData[{"Coprime",13},"NotationRules","HouseOfGraphs"]

HouseOfGraphsLookup[hogid]

HouseOfGraphsGraph[hogid]//StyleGraphs[#,ImageSize->Small]&

Wikidata

GraphData[{"Coprime",13},"WikidataID"]

GraphData[{"Coprime",13},"WikidataID","URL"]

Primary

GraphData[{"Coprime",13}]//StyleGraphs[#,ImageSize->Small]&

All

GraphData[{"Coprime",13},"Graph","All"]//StyleGraphs

CurvedEdge

GraphData[{"Coprime",13},"Graph","CurvedEdge"]//StyleGraphs

Inexact

Select[GraphData[{"Coprime",13},"Graph","All"],(!FreeQ[GraphEmbedding[#],_?InexactNumberQ]&)]//StyleGraphs

Degenerate

GraphData[{"Coprime",13},"Graph","Degenerate"]//StyleGraphs

DegenerateGraphEmbeddingTypes/@GraphData[{"Coprime",13},"Graph","Degenerate"]//Column

Embeddings

GraphDataEmbeddings[GraphData[{"Coprime",13}]]

Default embedding

g0=GraphPlot[Graph[GraphData[{"Coprime",13},"VertexList"],GraphData[{"Coprime",13},"Edges"]]]

Configuration

GraphData[{"Coprime",13},"Configuration"]

configurations=GraphData[{"Coprime",13},"Graph","Configuration"]//StyleGraphs

GeneralizedPetersen

GraphData[{"Coprime",13},"Graph","GeneralizedPetersen"]//StyleGraphs

IGraph

GraphData[{"Coprime",13},"Graph","IGraph"]//StyleGraphs

CompleteKPartite

GraphData[{"Coprime",13},"Graph","CompleteKPartite"]//StyleGraphs

Bipartite

GraphData[{"Coprime",13},"Bipartite"]

GraphData[{"Coprime",13},"Graph","Bipartite"]//StyleGraphs

Bilateral

GraphData[{"Coprime",13},"Graph","Bilateral"]//StyleGraphs

Grid[DeleteCases[Monitor[{g=#,BilateralGraphEmbeddingTypes[#],GraphSymmetryGroup[#]}&/@GraphData[{"Coprime",13},"Graph","All"],g],{_,_,TransformationGroup[{}]}],Dividers->All,Alignment->{{Center,{Left}}}]//Quiet

Circular

GraphData[{"Coprime",13},"Graph","Circular"]//StyleGraphs

Circular construction All

GraphData[{"Coprime",13},"Hamiltonian"]

GraphData[{"Coprime",13},"HamiltonianCycles"]

GraphData[{"Coprime",13},"HamiltonianCycleCount"]

GraphData[{"Coprime",13},"LCF"]

GraphData[{"Coprime",13},"LCFSignature"]

Length[hc=FindHamiltonianCycle[GraphData[{"Coprime",13}],All][[All,All,1]]]//Timing

gs=CircularEmbeddingFromHamiltonianCycle[GraphData[{"Coprime",13}],#]&/@Take[hc,1]

Length[hcsym=SymmetricHamiltonianCycles[GraphData[{"Coprime",13}],hc,ProgressReporting->True]]//Timing

GroupBy[SymmetricHamiltonianCycleGraph[GraphData[{"Coprime",13}],#]&/@hcsym,GraphSymmetryGroup]

Planar

GraphData[{"Coprime",13},"Planar"]

GraphData[{"Coprime",13},"Graph","Planar"]//StyleGraphs

MinimalCrossingNumber crossings.uos.de

CrossingNumber[GraphData[{"Coprime",13}],Method->"WebCompute"]//AbsoluteTiming

DateString[]

Quit

MinimalCrossingNumber: "EmbeddingScheme" -> 1

(cn=CrossingNumber[GraphData[{"Coprime",13}],"EmbeddingScheme"->1,TimeConstraint->1])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",13}],"EmbeddingScheme"->1,TimeConstraint->10])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",13}],"EmbeddingScheme"->1,TimeConstraint->60])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",13}],"EmbeddingScheme"->1,TimeConstraint->3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",13}],"EmbeddingScheme"->1,TimeConstraint->5 3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",13}],"EmbeddingScheme"->1,TimeConstraint->86400])//AbsoluteTiming

MinimalCrossingNumber: "EmbeddingScheme" -> 2

(cn=CrossingNumber[GraphData[{"Coprime",13}],"EmbeddingScheme"->2,TimeConstraint->1])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",13}],"EmbeddingScheme"->2,TimeConstraint->10])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",13}],"EmbeddingScheme"->2,TimeConstraint->60])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",13}],"EmbeddingScheme"->2,TimeConstraint->3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",13}],"EmbeddingScheme"->2,TimeConstraint->5 3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",13}],"EmbeddingScheme"->2,TimeConstraint->86400])//AbsoluteTiming

MinimalCrossingNumber: "EmbeddingScheme" -> 3

(cn=CrossingNumber[GraphData[{"Coprime",13}],"EmbeddingScheme"->3,TimeConstraint->1])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",13}],"EmbeddingScheme"->3,TimeConstraint->10])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",13}],"EmbeddingScheme"->3,TimeConstraint->60])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",13}],"EmbeddingScheme"->3,TimeConstraint->3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",13}],"EmbeddingScheme"->3,TimeConstraint->5 3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",13}],"EmbeddingScheme"->3,TimeConstraint->86400])//AbsoluteTiming

MinimalCrossing

GraphData[{"Coprime",13},"CN"]

(gs=GraphData[{"Coprime",13},"Graph","MinimalCrossing"])//StyleGraphs

GraphCrossingCount/@gs

GraphCrossingDiagram/@gs

MinimalRectilinearCrossing

GraphData[{"Coprime",13},"RCN"]

GraphData[{"Coprime",13},"Graph","MinimalRectilinearCrossing"]//StyleGraphs

MinimalRectilinearCrossing construction order X [minimum RCN == ]

Length[gs=FindMinimalRectilinearCrossingGraph[GraphData[{"Coprime",13}],Automatic,All,"Size"->Automatic,Method->"SubgraphIsomorphism",Debug->True]]//Timing

MaxMemoryUsed[]/10^9. GB

Tally[RectilinearCrossingCount/@gs]//Timing

Tally[RectilinearLocalCrossingCount/@gs]//Timing

GraphSymmetryGroup/@gs//Tally

Select[gs,GraphSymmetryGroup[#]=!=TransformationGroup[{}]&]

Take[gs,UpTo[100]]

MinimalRectilinearCrossing construction order X [minimum RCN == ]

Length[gs=FindMinimalRectilinearCrossingGraph[GraphData[{"Coprime",13}],Automatic,All,"Size"->XXX,Method->"SubgraphIsomorphism",Debug->True]]//Timing

MaxMemoryUsed[]/10^9. GB

Tally[RectilinearCrossingCount/@gs]//Timing

Tally[RectilinearLocalCrossingCount/@gs]//Timing

GraphSymmetryGroup/@gs//Tally

Select[gs,GraphSymmetryGroup[#]=!=TransformationGroup[{}]&]

Take[gs,UpTo[100]]

MinimalCrossing construction Tutte

(cn=CrossingNumber[GraphData[{"Coprime",13}],TimeConstraint->1])//AbsoluteTiming

(g=MinimalCrossingGraph[GraphData[{"Coprime",13}],"CrossingNumber"->cn])//PolyhedralGraphQ//AbsoluteTiming

faces=ReverseSort@SymmetricallyDistinctFaces[g]

Tally[ReverseSort[Length/@faces]]

TutteGraphs=BilateralGraph[CenterGraph@IGLayoutTutte[g,"OuterFace"->#],"ReturnNonbilateralGraph"->True]&/@faces

TutteGraphsWithOuterCrossingPointCounts={
#,
Count[OuterFace[#],_?(GreaterThan[GraphData[{"Coprime",13},"V"]])]
}&/@TutteGraphs;

Cases[TutteGraphsWithOuterCrossingPointCounts,{g_,0}:>g]

Cases[TutteGraphsWithOuterCrossingPointCounts,{g_,1}:>g]

LocalCrossingNumberWithEmbeddings=
{1+Max[Length/@DeleteCases[
Drop[AdjacencyList[#],GraphData[{"Coprime",13},"V"]],
_Integer?(LessEqualThan[GraphData[{"Coprime",13},"V"]]),
{2}
]],#}&/@TutteGraphs

TutteGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[
#,
AdditionalData->Join[Table[True,GraphData[{"Coprime",13},"V"]],Table[False,cn]],
SameTest->Equal
]
}&/@TutteGraphs;

SymmetricEmbeddingsWithOrientations=DeleteCases[
TutteGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]

Select[SymmetricEmbeddingsWithOrientations[[All,1]],Count[OuterFace[#],_?(GreaterThan[GraphData[{"Coprime",13},"V"]])]==0&]

MinimalCrossing construction Random 1k [XXX s]

(cn=CrossingNumber[GraphData[{"Coprime",13}],TimeConstraint->1])//AbsoluteTiming

Length[diagrams=DistinctMinimalCrossingDiagramData[
GraphData[{"Coprime",13}],
1000,
"CrossingNumber"->cn,
EdgeShapeFunction->"BezierEdge"
]]//AbsoluteTiming

No crossing points on the boundary:

Length[diagrams0=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==0&],"Graph",{}]]//Timing

Take[diagrams0,UpTo[10]]

One crossing point on the boundary:

Length[diagrams1=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==1&],"Graph",{}]]//Timing

Take[diagrams1,UpTo[10]]

graphs=#["Graph"]&/@diagrams;

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[#]
}&/@graphs;//AbsoluteTiming

MaxMemoryUsed[]/10^9.GB

Symmetric embeddings:

Length[SymmetricMinimalEmbeddingData=DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]
]//AbsoluteTiming

SymmetricMinimalEmbeddingData

SymmetricMinimalEmbeddingGraphs=SymmetricMinimalEmbeddingData[[All,1]]

GraphCrossingCount/@SymmetricMinimalEmbeddingGraphs

GraphCrossingDiagram/@SymmetricMinimalEmbeddingGraphs

MinimalCrossing construction Random 5k [XXX s]

(cn=CrossingNumber[GraphData[{"Coprime",13}],TimeConstraint->1])//AbsoluteTiming

Length[diagrams=DistinctMinimalCrossingDiagramData[
GraphData[{"Coprime",13}],
5000,
"CrossingNumber"->cn,
EdgeShapeFunction->"BezierEdge"
]]//AbsoluteTiming

No crossing points on the boundary:

Length[diagrams0=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==0&],"Graph",{}]]//Timing

Take[diagrams0,UpTo[10]]

One crossing point on the boundary:

Length[diagrams1=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==1&],"Graph",{}]]//Timing

Take[diagrams1,UpTo[10]]

graphs=#["Graph"]&/@diagrams;

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[#]
}&/@graphs;//AbsoluteTiming

MaxMemoryUsed[]/10^9.GB

Symmetric embeddings:

Length[SymmetricMinimalEmbeddingData=DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]
]//AbsoluteTiming

SymmetricMinimalEmbeddingData

SymmetricMinimalEmbeddingGraphs=SymmetricMinimalEmbeddingData[[All,1]]

GraphCrossingCount/@SymmetricMinimalEmbeddingGraphs

GraphCrossingDiagram/@SymmetricMinimalEmbeddingGraphs

MinimalCrossing construction Random 20k [XXX s]

(cn=CrossingNumber[GraphData[{"Coprime",13}],TimeConstraint->1])//AbsoluteTiming

Length[diagrams=DistinctMinimalCrossingDiagramData[
GraphData[{"Coprime",13}],
20*^3,
"CrossingNumber"->cn,
EdgeShapeFunction->"BezierEdge"
]]//AbsoluteTiming

No crossing points on the boundary:

Length[diagrams0=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==0&],"Graph",{}]]//Timing

Take[diagrams0,UpTo[10]]

One crossing point on the boundary:

Length[diagrams1=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==1&],"Graph",{}]]//Timing

Take[diagrams1,UpTo[10]]

graphs=#["Graph"]&/@diagrams;

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[#]
}&/@graphs;//AbsoluteTiming

MaxMemoryUsed[]/10^9.GB

Symmetric embeddings:

Length[SymmetricMinimalEmbeddingData=DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]
]//AbsoluteTiming

SymmetricMinimalEmbeddingData

SymmetricMinimalEmbeddingGraphs=SymmetricMinimalEmbeddingData[[All,1]]

GraphCrossingCount/@SymmetricMinimalEmbeddingGraphs

GraphCrossingDiagram/@SymmetricMinimalEmbeddingGraphs

MinimalCrossing construction Random 1k [old]

(cn=CrossingNumber[GraphData[{"Coprime",13}],TimeConstraint->1])//AbsoluteTiming

(RandomGraphs=Table[MinimalCrossingGraph[GraphData[{"Coprime",13}],"CrossingNumber"->cn,RandomSeed->n],{n,1000}]//Union);//Timing

RandomGraphsWithOuterCrossingPointCounts={
#,
Count[OuterFace[#],_?(GreaterThan[GraphData[{"Coprime",13},"V"]])]
}&/@RandomGraphs;

Small numbers of crossing points on the boundary:

Cases[RandomGraphsWithOuterCrossingPointCounts,{g_,0}:>g]

Cases[RandomGraphsWithOuterCrossingPointCounts,{g_,1}:>g]

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[
#,
AdditionalData->Join[Table[True,GraphData[{"Coprime",13},"V"]],Table[False,cn]],
SameTest->Equal
]
}&/@RandomGraphs;

MaxMemoryUsed[]/10^9.GB

DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]/.g_Graph:>BilateralGraph[CenterGraph@g,"ReturnNonbilateralGraph"->True]

MinimalCrossing construction Random 20k [old]

(cn=CrossingNumber[GraphData[{"Coprime",13}],TimeConstraint->1])//AbsoluteTiming

(RandomGraphs=Table[MinimalCrossingGraph[GraphData[{"Coprime",13}],"CrossingNumber"->cn,RandomSeed->n],{n,20000}]//Union);//Timing

RandomGraphsWithOuterCrossingPointCounts={
#,
Count[OuterFace[#],_?(GreaterThan[GraphData[{"Coprime",13},"V"]])]
}&/@RandomGraphs;

Small numbers of crossing points on the boundary:

Cases[RandomGraphsWithOuterCrossingPointCounts,{g_,0}:>g]

Cases[RandomGraphsWithOuterCrossingPointCounts,{g_,1}:>g]

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[
#,
AdditionalData->Join[Table[True,GraphData[{"Coprime",13},"V"]],Table[False,cn]],
SameTest->Equal
]
}&/@RandomGraphs;

MaxMemoryUsed[]/10^9.GB

DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]/.g_Graph:>BilateralGraph[CenterGraph@g,"ReturnNonbilateralGraph"->True]

MinimalLocalCrossing

GraphData[{"Coprime",13},{"LocalCrossingNumber","RectilinearLocalCrossingNumber"}]

GraphData[{"Coprime",13},"Graph","MinimalLocalCrossing"]//StyleGraphs

MinimalRectilinearLocalCrossing

GraphData[{"Coprime",13},{"LocalCrossingNumber","RectilinearLocalCrossingNumber"}]

GraphData[{"Coprime",13},"Graph","MinimalRectilinearLocalCrossing"]//StyleGraphs

MinimaRectilinearlLocalCrossing construction 1000

AdjacentCrossingsQ[g_Graph,cn_Integer]:=Module[{a=AdjacencyList[g],n=VertexCount[g]-cn},Max[Take[a,-cn]]>n]

(cn=CrossingNumber[GraphData[{"Coprime",13}],TimeConstraint->10])//AbsoluteTiming

(gs=Select[Table[MinimalCrossingGraph[GraphData[{"Coprime",13}],"CrossingNumber"->cn,RandomSeed->i],{i,1000}],!AdjacentCrossingsQ[#,cn]&]//Union)//Timing

MinimaRectilinearlLocalCrossing construction 20000

AdjacentCrossingsQ[g_Graph,cn_Integer]:=Module[{a=AdjacencyList[g],n=VertexCount[g]-cn},Max[Take[a,-cn]]>n]

(cn=CrossingNumber[GraphData[{"Coprime",13}],TimeConstraint->10])//AbsoluteTiming

(gs=Select[Table[MinimalCrossingGraph[GraphData[{"Coprime",13}],"CrossingNumber"->cn,RandomSeed->i],{i,20000}],!AdjacentCrossingsQ[#,cn]&]//Union)//Timing

Circulant

GraphData[{"Coprime",13},"Circulant"]

GraphData[{"Coprime",13},"Graph","Circulant"]//StyleGraphs

Circulant construction

GraphData[{"Coprime",13},"NotationRules","Circulant"]

(ci=CirculantIndices[GraphData[{"Coprime",13}]])//AbsoluteTiming

CirculantGraph1@@@ci

Cases[GraphData[{"Coprime",13},"StandardNames"],{"Circulant",i_}:>i]

CirculantGraph1@@@%

Complement graph

compl=GraphData[{"Coprime",13},"ComplementGraph","Name"]

Line graph

GraphData[{"Coprime",13},"Line"]

LineGraphQ[GraphData[{"Coprime",13}]]//Timing

RootGraph

roots=Select[GraphData[All],GraphData[#,"LineGraph","Name"]==={"Coprime",13}&]

RootGraph[GraphData[{"Coprime",13}]]

Halin

GraphData[{"Coprime",13},"Halin"]

GraphData[{"Coprime",13},"Graph","Halin"]//StyleGraphs

Rigid

GraphData[{"Coprime",13},"Rigid"]

GraphData[{"Coprime",13},"Graph","Rigid"]//StyleGraphs

Flexible

GraphData[{"Coprime",13},"Flexible"]

GraphData[{"Coprime",13},"Graph","Flexible"]//StyleGraphs

Voltage

GraphData[{"Coprime",13},"Graph","Voltage"]//StyleGraphs

Voltage construction

gs=VoltageGraph[GraphData[{"Coprime",13}],"MaxResults"->20,Debug->True]

Length[gs]

RecognizeGraph/@gs

VoltageGraphNotation/@gs//Column

EmbeddingClasses/@gs//Column

GraphSymmetryGroup/@gs//Column

LCF

GraphData[{"Coprime",13},"LCF"]

GraphData[{"Coprime",13},"HamiltonianCycleCount"]

GraphData[{"Coprime",13},"LCFSignature"]

GraphData[{"Coprime",13},"LCFNotations"]

GraphData[{"Coprime",13},"Graph","LCF"]//StyleGraphs

Tally[LCFNotation[#][[2]]&/@%]

UnitDistance

GraphData[{"Coprime",13},"UnitDistance"]

UnitDistanceGraphQ[GraphData[{"Coprime",13}],Debug->True]//Timing

GraphData[{"Coprime",13},"Graph","UnitDistance"]//StyleGraphs

UnitDistance by refinement of default embeddings

Graph[edge list]

(g=UnitDistanceEmbeddingRefine[Graph[GraphData[{"Coprime",13},"EdgeList"]],MaxIterations->500])//Timing

UnitDistanceGraphEmbeddingQ[g]

Graph[vertex list, edge list]

(g=UnitDistanceEmbeddingRefine[Graph[GraphData[{"Coprime",13},"VertexList"],GraphData[{"Coprime",13},"EdgeList"]],MaxIterations->500])//Timing

UnitDistanceGraphEmbeddingQ[g]

UnitDistance by refinement of existing embeddings

gs=UnitDistanceEmbeddingRefine[Graph[VertexList[#],EdgeList[#],VertexCoordinates->GraphEmbedding[#]],MaxIterations->500]&/@Complement@@(GraphData[{"Coprime",13},"Graph",#]&/@{"All","UnitDistance"})

TextGrid[
gdata=SortBy[
{#,DegenerateGraphEmbeddingQ[#],GraphSymmetryGroup[#],Max[Abs[EdgeLengths[#]-1]]}&/@gs,
Last
],
Dividers->All
]

Cases[gdata,{__,0.}]

Symmetric:

gs=Cases[
gdata,
{g_,_,sym:Except[TransformationGroup[{}]],diff_}:>{
HighlightGraph[g1=BilateralGraph[CenterGraph[g],"ReturnNonbilateralGraph"->True],Flatten[FindCoincidentVertices[g1]]],
sym,
diff
}]

UnitDistance by FindUnitDistanceEmbedding  (random embeddings returning on messages)

gs=FindUnitDistanceEmbedding[GraphData[{"Coprime",13}],50,"ReturnWithMessage"->True];//Quiet//Timing

gdata=SortBy[
{#,Max[Abs[EdgeLengths[#]-1]]}&/@gs,
Last
]

Cases[gdata,{g_?UnitDistanceGraphEmbeddingQ,_}:>g]

SymmetricEmebddings=Select[gdata,GraphSymmetryGroup[#[[1]]]=!=TransformationGroup[{}]&]

UnitDistance by FindUnitDistanceEmbedding  (random embedding waiting until UD is found)

FindUnitDistanceEmbedding[GraphData[{"Coprime",13}],"ReturnWithMessage"->False]//Quiet//Timing

Matchstick

GraphData[{"Coprime",13},"Matchstick"]

GraphData[{"Coprime",13},"Graph","Matchstick"]//StyleGraphs

3D default

Graph3D[GraphData[{"Coprime",13},"Edges"]]

3D construction

3D All

GraphData[{"Coprime",13},"Graph",{"3D","All"}]

3D UnitDistance construction Random

GraphData[{"Coprime",13},"Dimension"]

(g=UnitDistanceEmbeddingRefine[
Graph3D[
GraphData[{"Coprime",13},"VertexList"],
GraphData[{"Coprime",13},"EdgeList"]
],
WorkingPrecision->25])//Timing

EdgeLengths[g]

UnitDistanceGraphEmbeddingQ[g]

3D UnitDistance

GraphData[{"Coprime",13},"Graph",{"3D","UnitDistance"}]

3D Polyhedron

GraphData[{"Coprime",13},"Polyhedral"]

GraphData[{"Coprime",13},"Graph",{"3D","Polyhedron"}]

{"Coprime", 14}

Names

GraphData[{"Coprime",14},"StandardName"]

GraphData[{"Coprime",14},"StandardNames"]

HouseOfGraphs

hogid=GraphData[{"Coprime",14},"NotationRules","HouseOfGraphs"]

HouseOfGraphsLookup[hogid]

HouseOfGraphsGraph[hogid]//StyleGraphs[#,ImageSize->Small]&

Wikidata

GraphData[{"Coprime",14},"WikidataID"]

GraphData[{"Coprime",14},"WikidataID","URL"]

Primary

GraphData[{"Coprime",14}]//StyleGraphs[#,ImageSize->Small]&

All

GraphData[{"Coprime",14},"Graph","All"]//StyleGraphs

CurvedEdge

GraphData[{"Coprime",14},"Graph","CurvedEdge"]//StyleGraphs

Inexact

Select[GraphData[{"Coprime",14},"Graph","All"],(!FreeQ[GraphEmbedding[#],_?InexactNumberQ]&)]//StyleGraphs

Degenerate

GraphData[{"Coprime",14},"Graph","Degenerate"]//StyleGraphs

DegenerateGraphEmbeddingTypes/@GraphData[{"Coprime",14},"Graph","Degenerate"]//Column

Embeddings

GraphDataEmbeddings[GraphData[{"Coprime",14}]]

Default embedding

g0=GraphPlot[Graph[GraphData[{"Coprime",14},"VertexList"],GraphData[{"Coprime",14},"Edges"]]]

Configuration

GraphData[{"Coprime",14},"Configuration"]

configurations=GraphData[{"Coprime",14},"Graph","Configuration"]//StyleGraphs

GeneralizedPetersen

GraphData[{"Coprime",14},"Graph","GeneralizedPetersen"]//StyleGraphs

IGraph

GraphData[{"Coprime",14},"Graph","IGraph"]//StyleGraphs

CompleteKPartite

GraphData[{"Coprime",14},"Graph","CompleteKPartite"]//StyleGraphs

Bipartite

GraphData[{"Coprime",14},"Bipartite"]

GraphData[{"Coprime",14},"Graph","Bipartite"]//StyleGraphs

Bilateral

GraphData[{"Coprime",14},"Graph","Bilateral"]//StyleGraphs

Grid[DeleteCases[Monitor[{g=#,BilateralGraphEmbeddingTypes[#],GraphSymmetryGroup[#]}&/@GraphData[{"Coprime",14},"Graph","All"],g],{_,_,TransformationGroup[{}]}],Dividers->All,Alignment->{{Center,{Left}}}]//Quiet

Circular

GraphData[{"Coprime",14},"Graph","Circular"]//StyleGraphs

Circular construction All

GraphData[{"Coprime",14},"Hamiltonian"]

GraphData[{"Coprime",14},"HamiltonianCycles"]

GraphData[{"Coprime",14},"HamiltonianCycleCount"]

GraphData[{"Coprime",14},"LCF"]

GraphData[{"Coprime",14},"LCFSignature"]

Length[hc=FindHamiltonianCycle[GraphData[{"Coprime",14}],All][[All,All,1]]]//Timing

Length[hcsym=SymmetricHamiltonianCycles[GraphData[{"Coprime",14}],hc,ProgressReporting->True]]//Timing

GroupBy[SymmetricHamiltonianCycleGraph[GraphData[{"Coprime",14}],#]&/@hcsym,GraphSymmetryGroup]

Planar

GraphData[{"Coprime",14},"Planar"]

GraphData[{"Coprime",14},"Graph","Planar"]//StyleGraphs

MinimalCrossingNumber crossings.uos.de

CrossingNumber[GraphData[{"Coprime",14}],Method->"WebCompute"]//AbsoluteTiming

DateString[]

Quit

MinimalCrossingNumber: "EmbeddingScheme" -> 1

(cn=CrossingNumber[GraphData[{"Coprime",14}],"EmbeddingScheme"->1,TimeConstraint->1])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",14}],"EmbeddingScheme"->1,TimeConstraint->10])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",14}],"EmbeddingScheme"->1,TimeConstraint->60])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",14}],"EmbeddingScheme"->1,TimeConstraint->3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",14}],"EmbeddingScheme"->1,TimeConstraint->5 3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",14}],"EmbeddingScheme"->1,TimeConstraint->86400])//AbsoluteTiming

MinimalCrossingNumber: "EmbeddingScheme" -> 2

(cn=CrossingNumber[GraphData[{"Coprime",14}],"EmbeddingScheme"->2,TimeConstraint->1])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",14}],"EmbeddingScheme"->2,TimeConstraint->10])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",14}],"EmbeddingScheme"->2,TimeConstraint->60])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",14}],"EmbeddingScheme"->2,TimeConstraint->3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",14}],"EmbeddingScheme"->2,TimeConstraint->5 3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",14}],"EmbeddingScheme"->2,TimeConstraint->86400])//AbsoluteTiming

MinimalCrossingNumber: "EmbeddingScheme" -> 3

(cn=CrossingNumber[GraphData[{"Coprime",14}],"EmbeddingScheme"->3,TimeConstraint->1])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",14}],"EmbeddingScheme"->3,TimeConstraint->10])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",14}],"EmbeddingScheme"->3,TimeConstraint->60])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",14}],"EmbeddingScheme"->3,TimeConstraint->3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",14}],"EmbeddingScheme"->3,TimeConstraint->5 3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",14}],"EmbeddingScheme"->3,TimeConstraint->86400])//AbsoluteTiming

MinimalCrossing

GraphData[{"Coprime",14},"CN"]

(gs=GraphData[{"Coprime",14},"Graph","MinimalCrossing"])//StyleGraphs

GraphCrossingCount/@gs

GraphCrossingDiagram/@gs

MinimalRectilinearCrossing

GraphData[{"Coprime",14},"RCN"]

GraphData[{"Coprime",14},"Graph","MinimalRectilinearCrossing"]//StyleGraphs

MinimalRectilinearCrossing construction order X [minimum RCN == ]

Length[gs=FindMinimalRectilinearCrossingGraph[GraphData[{"Coprime",14}],Automatic,All,"Size"->Automatic,Method->"SubgraphIsomorphism",Debug->True]]//Timing

MaxMemoryUsed[]/10^9. GB

Tally[RectilinearCrossingCount/@gs]//Timing

Tally[RectilinearLocalCrossingCount/@gs]//Timing

GraphSymmetryGroup/@gs//Tally

Select[gs,GraphSymmetryGroup[#]=!=TransformationGroup[{}]&]

Take[gs,UpTo[100]]

MinimalRectilinearCrossing construction order X [minimum RCN == ]

Length[gs=FindMinimalRectilinearCrossingGraph[GraphData[{"Coprime",14}],Automatic,All,"Size"->XXX,Method->"SubgraphIsomorphism",Debug->True]]//Timing

MaxMemoryUsed[]/10^9. GB

Tally[RectilinearCrossingCount/@gs]//Timing

Tally[RectilinearLocalCrossingCount/@gs]//Timing

GraphSymmetryGroup/@gs//Tally

Select[gs,GraphSymmetryGroup[#]=!=TransformationGroup[{}]&]

Take[gs,UpTo[100]]

MinimalCrossing construction Tutte

(cn=CrossingNumber[GraphData[{"Coprime",14}],TimeConstraint->1])//AbsoluteTiming

(g=MinimalCrossingGraph[GraphData[{"Coprime",14}],"CrossingNumber"->cn])//PolyhedralGraphQ//AbsoluteTiming

faces=ReverseSort@SymmetricallyDistinctFaces[g]

Tally[ReverseSort[Length/@faces]]

TutteGraphs=BilateralGraph[CenterGraph@IGLayoutTutte[g,"OuterFace"->#],"ReturnNonbilateralGraph"->True]&/@faces

TutteGraphsWithOuterCrossingPointCounts={
#,
Count[OuterFace[#],_?(GreaterThan[GraphData[{"Coprime",14},"V"]])]
}&/@TutteGraphs;

Cases[TutteGraphsWithOuterCrossingPointCounts,{g_,0}:>g]

Cases[TutteGraphsWithOuterCrossingPointCounts,{g_,1}:>g]

LocalCrossingNumberWithEmbeddings=
{1+Max[Length/@DeleteCases[
Drop[AdjacencyList[#],GraphData[{"Coprime",14},"V"]],
_Integer?(LessEqualThan[GraphData[{"Coprime",14},"V"]]),
{2}
]],#}&/@TutteGraphs

TutteGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[
#,
AdditionalData->Join[Table[True,GraphData[{"Coprime",14},"V"]],Table[False,cn]],
SameTest->Equal
]
}&/@TutteGraphs;

SymmetricEmbeddingsWithOrientations=DeleteCases[
TutteGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]

Select[SymmetricEmbeddingsWithOrientations[[All,1]],Count[OuterFace[#],_?(GreaterThan[GraphData[{"Coprime",14},"V"]])]==0&]

MinimalCrossing construction Random 1k [XXX s]

(cn=CrossingNumber[GraphData[{"Coprime",14}],TimeConstraint->1])//AbsoluteTiming

Length[diagrams=DistinctMinimalCrossingDiagramData[
GraphData[{"Coprime",14}],
1000,
"CrossingNumber"->cn,
EdgeShapeFunction->"BezierEdge"
]]//AbsoluteTiming

No crossing points on the boundary:

Length[diagrams0=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==0&],"Graph",{}]]//Timing

Take[diagrams0,UpTo[10]]

One crossing point on the boundary:

Length[diagrams1=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==1&],"Graph",{}]]//Timing

Take[diagrams1,UpTo[10]]

graphs=#["Graph"]&/@diagrams;

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[#]
}&/@graphs;//AbsoluteTiming

MaxMemoryUsed[]/10^9.GB

Symmetric embeddings:

Length[SymmetricMinimalEmbeddingData=DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]
]//AbsoluteTiming

SymmetricMinimalEmbeddingData

SymmetricMinimalEmbeddingGraphs=SymmetricMinimalEmbeddingData[[All,1]]

GraphCrossingCount/@SymmetricMinimalEmbeddingGraphs

GraphCrossingDiagram/@SymmetricMinimalEmbeddingGraphs

MinimalCrossing construction Random 5k [XXX s]

(cn=CrossingNumber[GraphData[{"Coprime",14}],TimeConstraint->1])//AbsoluteTiming

Length[diagrams=DistinctMinimalCrossingDiagramData[
GraphData[{"Coprime",14}],
5000,
"CrossingNumber"->cn,
EdgeShapeFunction->"BezierEdge"
]]//AbsoluteTiming

No crossing points on the boundary:

Length[diagrams0=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==0&],"Graph",{}]]//Timing

Take[diagrams0,UpTo[10]]

One crossing point on the boundary:

Length[diagrams1=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==1&],"Graph",{}]]//Timing

Take[diagrams1,UpTo[10]]

graphs=#["Graph"]&/@diagrams;

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[#]
}&/@graphs;//AbsoluteTiming

MaxMemoryUsed[]/10^9.GB

Symmetric embeddings:

Length[SymmetricMinimalEmbeddingData=DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]
]//AbsoluteTiming

SymmetricMinimalEmbeddingData

SymmetricMinimalEmbeddingGraphs=SymmetricMinimalEmbeddingData[[All,1]]

GraphCrossingCount/@SymmetricMinimalEmbeddingGraphs

GraphCrossingDiagram/@SymmetricMinimalEmbeddingGraphs

MinimalCrossing construction Random 20k [XXX s]

(cn=CrossingNumber[GraphData[{"Coprime",14}],TimeConstraint->1])//AbsoluteTiming

Length[diagrams=DistinctMinimalCrossingDiagramData[
GraphData[{"Coprime",14}],
20*^3,
"CrossingNumber"->cn,
EdgeShapeFunction->"BezierEdge"
]]//AbsoluteTiming

No crossing points on the boundary:

Length[diagrams0=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==0&],"Graph",{}]]//Timing

Take[diagrams0,UpTo[10]]

One crossing point on the boundary:

Length[diagrams1=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==1&],"Graph",{}]]//Timing

Take[diagrams1,UpTo[10]]

graphs=#["Graph"]&/@diagrams;

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[#]
}&/@graphs;//AbsoluteTiming

MaxMemoryUsed[]/10^9.GB

Symmetric embeddings:

Length[SymmetricMinimalEmbeddingData=DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]
]//AbsoluteTiming

SymmetricMinimalEmbeddingData

SymmetricMinimalEmbeddingGraphs=SymmetricMinimalEmbeddingData[[All,1]]

GraphCrossingCount/@SymmetricMinimalEmbeddingGraphs

GraphCrossingDiagram/@SymmetricMinimalEmbeddingGraphs

MinimalCrossing construction Random 1k [old]

(cn=CrossingNumber[GraphData[{"Coprime",14}],TimeConstraint->1])//AbsoluteTiming

(RandomGraphs=Table[MinimalCrossingGraph[GraphData[{"Coprime",14}],"CrossingNumber"->cn,RandomSeed->n],{n,1000}]//Union);//Timing

RandomGraphsWithOuterCrossingPointCounts={
#,
Count[OuterFace[#],_?(GreaterThan[GraphData[{"Coprime",14},"V"]])]
}&/@RandomGraphs;

Small numbers of crossing points on the boundary:

Cases[RandomGraphsWithOuterCrossingPointCounts,{g_,0}:>g]

Cases[RandomGraphsWithOuterCrossingPointCounts,{g_,1}:>g]

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[
#,
AdditionalData->Join[Table[True,GraphData[{"Coprime",14},"V"]],Table[False,cn]],
SameTest->Equal
]
}&/@RandomGraphs;

MaxMemoryUsed[]/10^9.GB

DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]/.g_Graph:>BilateralGraph[CenterGraph@g,"ReturnNonbilateralGraph"->True]

MinimalCrossing construction Random 20k [old]

(cn=CrossingNumber[GraphData[{"Coprime",14}],TimeConstraint->1])//AbsoluteTiming

(RandomGraphs=Table[MinimalCrossingGraph[GraphData[{"Coprime",14}],"CrossingNumber"->cn,RandomSeed->n],{n,20000}]//Union);//Timing

RandomGraphsWithOuterCrossingPointCounts={
#,
Count[OuterFace[#],_?(GreaterThan[GraphData[{"Coprime",14},"V"]])]
}&/@RandomGraphs;

Small numbers of crossing points on the boundary:

Cases[RandomGraphsWithOuterCrossingPointCounts,{g_,0}:>g]

Cases[RandomGraphsWithOuterCrossingPointCounts,{g_,1}:>g]

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[
#,
AdditionalData->Join[Table[True,GraphData[{"Coprime",14},"V"]],Table[False,cn]],
SameTest->Equal
]
}&/@RandomGraphs;

MaxMemoryUsed[]/10^9.GB

DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]/.g_Graph:>BilateralGraph[CenterGraph@g,"ReturnNonbilateralGraph"->True]

MinimalLocalCrossing

GraphData[{"Coprime",14},{"LocalCrossingNumber","RectilinearLocalCrossingNumber"}]

GraphData[{"Coprime",14},"Graph","MinimalLocalCrossing"]//StyleGraphs

MinimalRectilinearLocalCrossing

GraphData[{"Coprime",14},{"LocalCrossingNumber","RectilinearLocalCrossingNumber"}]

GraphData[{"Coprime",14},"Graph","MinimalRectilinearLocalCrossing"]//StyleGraphs

MinimaRectilinearlLocalCrossing construction 1000

AdjacentCrossingsQ[g_Graph,cn_Integer]:=Module[{a=AdjacencyList[g],n=VertexCount[g]-cn},Max[Take[a,-cn]]>n]

(cn=CrossingNumber[GraphData[{"Coprime",14}],TimeConstraint->10])//AbsoluteTiming

(gs=Select[Table[MinimalCrossingGraph[GraphData[{"Coprime",14}],"CrossingNumber"->cn,RandomSeed->i],{i,1000}],!AdjacentCrossingsQ[#,cn]&]//Union)//Timing

MinimaRectilinearlLocalCrossing construction 20000

AdjacentCrossingsQ[g_Graph,cn_Integer]:=Module[{a=AdjacencyList[g],n=VertexCount[g]-cn},Max[Take[a,-cn]]>n]

(cn=CrossingNumber[GraphData[{"Coprime",14}],TimeConstraint->10])//AbsoluteTiming

(gs=Select[Table[MinimalCrossingGraph[GraphData[{"Coprime",14}],"CrossingNumber"->cn,RandomSeed->i],{i,20000}],!AdjacentCrossingsQ[#,cn]&]//Union)//Timing

Circulant

GraphData[{"Coprime",14},"Circulant"]

GraphData[{"Coprime",14},"Graph","Circulant"]//StyleGraphs

Circulant construction

GraphData[{"Coprime",14},"NotationRules","Circulant"]

(ci=CirculantIndices[GraphData[{"Coprime",14}]])//AbsoluteTiming

CirculantGraph1@@@ci

Cases[GraphData[{"Coprime",14},"StandardNames"],{"Circulant",i_}:>i]

CirculantGraph1@@@%

Complement graph

compl=GraphData[{"Coprime",14},"ComplementGraph","Name"]

Line graph

GraphData[{"Coprime",14},"Line"]

LineGraphQ[GraphData[{"Coprime",14}]]//Timing

RootGraph

roots=Select[GraphData[All],GraphData[#,"LineGraph","Name"]==={"Coprime",14}&]

RootGraph[GraphData[{"Coprime",14}]]

Halin

GraphData[{"Coprime",14},"Halin"]

GraphData[{"Coprime",14},"Graph","Halin"]//StyleGraphs

Rigid

GraphData[{"Coprime",14},"Rigid"]

GraphData[{"Coprime",14},"Graph","Rigid"]//StyleGraphs

Flexible

GraphData[{"Coprime",14},"Flexible"]

GraphData[{"Coprime",14},"Graph","Flexible"]//StyleGraphs

Voltage

GraphData[{"Coprime",14},"Graph","Voltage"]//StyleGraphs

Voltage construction

gs=VoltageGraph[GraphData[{"Coprime",14}],"MaxResults"->20,Debug->True]

Length[gs]

RecognizeGraph/@gs

VoltageGraphNotation/@gs//Column

EmbeddingClasses/@gs//Column

GraphSymmetryGroup/@gs//Column

LCF

GraphData[{"Coprime",14},"LCF"]

GraphData[{"Coprime",14},"HamiltonianCycleCount"]

GraphData[{"Coprime",14},"LCFSignature"]

GraphData[{"Coprime",14},"LCFNotations"]

GraphData[{"Coprime",14},"Graph","LCF"]//StyleGraphs

Tally[LCFNotation[#][[2]]&/@%]

UnitDistance

GraphData[{"Coprime",14},"UnitDistance"]

UnitDistanceGraphQ[GraphData[{"Coprime",14}],Debug->True]//Timing

GraphData[{"Coprime",14},"Graph","UnitDistance"]//StyleGraphs

UnitDistance by refinement of default embeddings

Graph[edge list]

(g=UnitDistanceEmbeddingRefine[Graph[GraphData[{"Coprime",14},"EdgeList"]],MaxIterations->500])//Timing

UnitDistanceGraphEmbeddingQ[g]

Graph[vertex list, edge list]

(g=UnitDistanceEmbeddingRefine[Graph[GraphData[{"Coprime",14},"VertexList"],GraphData[{"Coprime",14},"EdgeList"]],MaxIterations->500])//Timing

UnitDistanceGraphEmbeddingQ[g]

UnitDistance by refinement of existing embeddings

gs=UnitDistanceEmbeddingRefine[Graph[VertexList[#],EdgeList[#],VertexCoordinates->GraphEmbedding[#]],MaxIterations->500]&/@Complement@@(GraphData[{"Coprime",14},"Graph",#]&/@{"All","UnitDistance"})

TextGrid[
gdata=SortBy[
{#,DegenerateGraphEmbeddingQ[#],GraphSymmetryGroup[#],Max[Abs[EdgeLengths[#]-1]]}&/@gs,
Last
],
Dividers->All
]

Cases[gdata,{__,0.}]

Symmetric:

gs=Cases[
gdata,
{g_,_,sym:Except[TransformationGroup[{}]],diff_}:>{
HighlightGraph[g1=BilateralGraph[CenterGraph[g],"ReturnNonbilateralGraph"->True],Flatten[FindCoincidentVertices[g1]]],
sym,
diff
}]

UnitDistance by FindUnitDistanceEmbedding  (random embeddings returning on messages)

gs=FindUnitDistanceEmbedding[GraphData[{"Coprime",14}],50,"ReturnWithMessage"->True];//Quiet//Timing

gdata=SortBy[
{#,Max[Abs[EdgeLengths[#]-1]]}&/@gs,
Last
]

Cases[gdata,{g_?UnitDistanceGraphEmbeddingQ,_}:>g]

SymmetricEmebddings=Select[gdata,GraphSymmetryGroup[#[[1]]]=!=TransformationGroup[{}]&]

UnitDistance by FindUnitDistanceEmbedding  (random embedding waiting until UD is found)

FindUnitDistanceEmbedding[GraphData[{"Coprime",14}],"ReturnWithMessage"->False]//Quiet//Timing

Matchstick

GraphData[{"Coprime",14},"Matchstick"]

GraphData[{"Coprime",14},"Graph","Matchstick"]//StyleGraphs

3D default

Graph3D[GraphData[{"Coprime",14},"Edges"]]

3D construction

3D All

GraphData[{"Coprime",14},"Graph",{"3D","All"}]

3D UnitDistance construction Random

GraphData[{"Coprime",14},"Dimension"]

(g=UnitDistanceEmbeddingRefine[
Graph3D[
GraphData[{"Coprime",14},"VertexList"],
GraphData[{"Coprime",14},"EdgeList"]
],
WorkingPrecision->25])//Timing

EdgeLengths[g]

UnitDistanceGraphEmbeddingQ[g]

3D UnitDistance

GraphData[{"Coprime",14},"Graph",{"3D","UnitDistance"}]

3D Polyhedron

GraphData[{"Coprime",14},"Polyhedral"]

GraphData[{"Coprime",14},"Graph",{"3D","Polyhedron"}]

{"Coprime", 15}

Names

GraphData[{"Coprime",15},"StandardName"]

GraphData[{"Coprime",15},"StandardNames"]

HouseOfGraphs

hogid=GraphData[{"Coprime",15},"NotationRules","HouseOfGraphs"]

HouseOfGraphsLookup[hogid]

HouseOfGraphsGraph[hogid]//StyleGraphs[#,ImageSize->Small]&

Wikidata

GraphData[{"Coprime",15},"WikidataID"]

GraphData[{"Coprime",15},"WikidataID","URL"]

Primary

GraphData[{"Coprime",15}]//StyleGraphs[#,ImageSize->Small]&

All

GraphData[{"Coprime",15},"Graph","All"]//StyleGraphs

CurvedEdge

GraphData[{"Coprime",15},"Graph","CurvedEdge"]//StyleGraphs

Inexact

Select[GraphData[{"Coprime",15},"Graph","All"],(!FreeQ[GraphEmbedding[#],_?InexactNumberQ]&)]//StyleGraphs

Degenerate

GraphData[{"Coprime",15},"Graph","Degenerate"]//StyleGraphs

DegenerateGraphEmbeddingTypes/@GraphData[{"Coprime",15},"Graph","Degenerate"]//Column

Embeddings

GraphDataEmbeddings[GraphData[{"Coprime",15}]]

Default embedding

g0=GraphPlot[Graph[GraphData[{"Coprime",15},"VertexList"],GraphData[{"Coprime",15},"Edges"]]]

Configuration

GraphData[{"Coprime",15},"Configuration"]

configurations=GraphData[{"Coprime",15},"Graph","Configuration"]//StyleGraphs

GeneralizedPetersen

GraphData[{"Coprime",15},"Graph","GeneralizedPetersen"]//StyleGraphs

IGraph

GraphData[{"Coprime",15},"Graph","IGraph"]//StyleGraphs

CompleteKPartite

GraphData[{"Coprime",15},"Graph","CompleteKPartite"]//StyleGraphs

Bipartite

GraphData[{"Coprime",15},"Bipartite"]

GraphData[{"Coprime",15},"Graph","Bipartite"]//StyleGraphs

Bilateral

GraphData[{"Coprime",15},"Graph","Bilateral"]//StyleGraphs

Grid[DeleteCases[Monitor[{g=#,BilateralGraphEmbeddingTypes[#],GraphSymmetryGroup[#]}&/@GraphData[{"Coprime",15},"Graph","All"],g],{_,_,TransformationGroup[{}]}],Dividers->All,Alignment->{{Center,{Left}}}]//Quiet

Circular

GraphData[{"Coprime",15},"Graph","Circular"]//StyleGraphs

Circular construction All

GraphData[{"Coprime",15},"Hamiltonian"]

GraphData[{"Coprime",15},"HamiltonianCycles"]

GraphData[{"Coprime",15},"HamiltonianCycleCount"]

GraphData[{"Coprime",15},"LCF"]

GraphData[{"Coprime",15},"LCFSignature"]

Length[hc=FindHamiltonianCycle[GraphData[{"Coprime",15}],All][[All,All,1]]]//Timing

gs=CircularEmbeddingFromHamiltonianCycle[GraphData[{"Coprime",15}],#]&/@Take[hc,1]

Length[hcsym=SymmetricHamiltonianCycles[GraphData[{"Coprime",15}],hc,ProgressReporting->True]]//Timing

GroupBy[SymmetricHamiltonianCycleGraph[GraphData[{"Coprime",15}],#]&/@hcsym,GraphSymmetryGroup]

Planar

GraphData[{"Coprime",15},"Planar"]

GraphData[{"Coprime",15},"Graph","Planar"]//StyleGraphs

MinimalCrossingNumber crossings.uos.de

CrossingNumber[GraphData[{"Coprime",15}],Method->"WebCompute"]//AbsoluteTiming

DateString[]

Quit

MinimalCrossingNumber: "EmbeddingScheme" -> 1

(cn=CrossingNumber[GraphData[{"Coprime",15}],"EmbeddingScheme"->1,TimeConstraint->1])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",15}],"EmbeddingScheme"->1,TimeConstraint->10])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",15}],"EmbeddingScheme"->1,TimeConstraint->60])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",15}],"EmbeddingScheme"->1,TimeConstraint->3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",15}],"EmbeddingScheme"->1,TimeConstraint->5 3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",15}],"EmbeddingScheme"->1,TimeConstraint->86400])//AbsoluteTiming

MinimalCrossingNumber: "EmbeddingScheme" -> 2

(cn=CrossingNumber[GraphData[{"Coprime",15}],"EmbeddingScheme"->2,TimeConstraint->1])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",15}],"EmbeddingScheme"->2,TimeConstraint->10])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",15}],"EmbeddingScheme"->2,TimeConstraint->60])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",15}],"EmbeddingScheme"->2,TimeConstraint->3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",15}],"EmbeddingScheme"->2,TimeConstraint->5 3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",15}],"EmbeddingScheme"->2,TimeConstraint->86400])//AbsoluteTiming

MinimalCrossingNumber: "EmbeddingScheme" -> 3

(cn=CrossingNumber[GraphData[{"Coprime",15}],"EmbeddingScheme"->3,TimeConstraint->1])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",15}],"EmbeddingScheme"->3,TimeConstraint->10])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",15}],"EmbeddingScheme"->3,TimeConstraint->60])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",15}],"EmbeddingScheme"->3,TimeConstraint->3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",15}],"EmbeddingScheme"->3,TimeConstraint->5 3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",15}],"EmbeddingScheme"->3,TimeConstraint->86400])//AbsoluteTiming

MinimalCrossing

GraphData[{"Coprime",15},"CN"]

(gs=GraphData[{"Coprime",15},"Graph","MinimalCrossing"])//StyleGraphs

GraphCrossingCount/@gs

GraphCrossingDiagram/@gs

MinimalRectilinearCrossing

GraphData[{"Coprime",15},"RCN"]

GraphData[{"Coprime",15},"Graph","MinimalRectilinearCrossing"]//StyleGraphs

MinimalRectilinearCrossing construction order X [minimum RCN == ]

Length[gs=FindMinimalRectilinearCrossingGraph[GraphData[{"Coprime",15}],Automatic,All,"Size"->Automatic,Method->"SubgraphIsomorphism",Debug->True]]//Timing

MaxMemoryUsed[]/10^9. GB

Tally[RectilinearCrossingCount/@gs]//Timing

Tally[RectilinearLocalCrossingCount/@gs]//Timing

GraphSymmetryGroup/@gs//Tally

Select[gs,GraphSymmetryGroup[#]=!=TransformationGroup[{}]&]

Take[gs,UpTo[100]]

MinimalRectilinearCrossing construction order X [minimum RCN == ]

Length[gs=FindMinimalRectilinearCrossingGraph[GraphData[{"Coprime",15}],Automatic,All,"Size"->XXX,Method->"SubgraphIsomorphism",Debug->True]]//Timing

MaxMemoryUsed[]/10^9. GB

Tally[RectilinearCrossingCount/@gs]//Timing

Tally[RectilinearLocalCrossingCount/@gs]//Timing

GraphSymmetryGroup/@gs//Tally

Select[gs,GraphSymmetryGroup[#]=!=TransformationGroup[{}]&]

Take[gs,UpTo[100]]

MinimalCrossing construction Tutte

(cn=CrossingNumber[GraphData[{"Coprime",15}],TimeConstraint->1])//AbsoluteTiming

(g=MinimalCrossingGraph[GraphData[{"Coprime",15}],"CrossingNumber"->cn])//PolyhedralGraphQ//AbsoluteTiming

faces=ReverseSort@SymmetricallyDistinctFaces[g]

Tally[ReverseSort[Length/@faces]]

TutteGraphs=BilateralGraph[CenterGraph@IGLayoutTutte[g,"OuterFace"->#],"ReturnNonbilateralGraph"->True]&/@faces

TutteGraphsWithOuterCrossingPointCounts={
#,
Count[OuterFace[#],_?(GreaterThan[GraphData[{"Coprime",15},"V"]])]
}&/@TutteGraphs;

Cases[TutteGraphsWithOuterCrossingPointCounts,{g_,0}:>g]

Cases[TutteGraphsWithOuterCrossingPointCounts,{g_,1}:>g]

LocalCrossingNumberWithEmbeddings=
{1+Max[Length/@DeleteCases[
Drop[AdjacencyList[#],GraphData[{"Coprime",15},"V"]],
_Integer?(LessEqualThan[GraphData[{"Coprime",15},"V"]]),
{2}
]],#}&/@TutteGraphs

TutteGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[
#,
AdditionalData->Join[Table[True,GraphData[{"Coprime",15},"V"]],Table[False,cn]],
SameTest->Equal
]
}&/@TutteGraphs;

SymmetricEmbeddingsWithOrientations=DeleteCases[
TutteGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]

Select[SymmetricEmbeddingsWithOrientations[[All,1]],Count[OuterFace[#],_?(GreaterThan[GraphData[{"Coprime",15},"V"]])]==0&]

MinimalCrossing construction Random 1k [XXX s]

(cn=CrossingNumber[GraphData[{"Coprime",15}],TimeConstraint->1])//AbsoluteTiming

Length[diagrams=DistinctMinimalCrossingDiagramData[
GraphData[{"Coprime",15}],
1000,
"CrossingNumber"->cn,
EdgeShapeFunction->"BezierEdge"
]]//AbsoluteTiming

No crossing points on the boundary:

Length[diagrams0=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==0&],"Graph",{}]]//Timing

Take[diagrams0,UpTo[10]]

One crossing point on the boundary:

Length[diagrams1=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==1&],"Graph",{}]]//Timing

Take[diagrams1,UpTo[10]]

graphs=#["Graph"]&/@diagrams;

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[#]
}&/@graphs;//AbsoluteTiming

MaxMemoryUsed[]/10^9.GB

Symmetric embeddings:

Length[SymmetricMinimalEmbeddingData=DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]
]//AbsoluteTiming

SymmetricMinimalEmbeddingData

SymmetricMinimalEmbeddingGraphs=SymmetricMinimalEmbeddingData[[All,1]]

GraphCrossingCount/@SymmetricMinimalEmbeddingGraphs

GraphCrossingDiagram/@SymmetricMinimalEmbeddingGraphs

MinimalCrossing construction Random 5k [XXX s]

(cn=CrossingNumber[GraphData[{"Coprime",15}],TimeConstraint->1])//AbsoluteTiming

Length[diagrams=DistinctMinimalCrossingDiagramData[
GraphData[{"Coprime",15}],
5000,
"CrossingNumber"->cn,
EdgeShapeFunction->"BezierEdge"
]]//AbsoluteTiming

No crossing points on the boundary:

Length[diagrams0=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==0&],"Graph",{}]]//Timing

Take[diagrams0,UpTo[10]]

One crossing point on the boundary:

Length[diagrams1=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==1&],"Graph",{}]]//Timing

Take[diagrams1,UpTo[10]]

graphs=#["Graph"]&/@diagrams;

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[#]
}&/@graphs;//AbsoluteTiming

MaxMemoryUsed[]/10^9.GB

Symmetric embeddings:

Length[SymmetricMinimalEmbeddingData=DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]
]//AbsoluteTiming

SymmetricMinimalEmbeddingData

SymmetricMinimalEmbeddingGraphs=SymmetricMinimalEmbeddingData[[All,1]]

GraphCrossingCount/@SymmetricMinimalEmbeddingGraphs

GraphCrossingDiagram/@SymmetricMinimalEmbeddingGraphs

MinimalCrossing construction Random 20k [XXX s]

(cn=CrossingNumber[GraphData[{"Coprime",15}],TimeConstraint->1])//AbsoluteTiming

Length[diagrams=DistinctMinimalCrossingDiagramData[
GraphData[{"Coprime",15}],
20*^3,
"CrossingNumber"->cn,
EdgeShapeFunction->"BezierEdge"
]]//AbsoluteTiming

No crossing points on the boundary:

Length[diagrams0=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==0&],"Graph",{}]]//Timing

Take[diagrams0,UpTo[10]]

One crossing point on the boundary:

Length[diagrams1=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==1&],"Graph",{}]]//Timing

Take[diagrams1,UpTo[10]]

graphs=#["Graph"]&/@diagrams;

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[#]
}&/@graphs;//AbsoluteTiming

MaxMemoryUsed[]/10^9.GB

Symmetric embeddings:

Length[SymmetricMinimalEmbeddingData=DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]
]//AbsoluteTiming

SymmetricMinimalEmbeddingData

SymmetricMinimalEmbeddingGraphs=SymmetricMinimalEmbeddingData[[All,1]]

GraphCrossingCount/@SymmetricMinimalEmbeddingGraphs

GraphCrossingDiagram/@SymmetricMinimalEmbeddingGraphs

MinimalCrossing construction Random 1k [old]

(cn=CrossingNumber[GraphData[{"Coprime",15}],TimeConstraint->1])//AbsoluteTiming

(RandomGraphs=Table[MinimalCrossingGraph[GraphData[{"Coprime",15}],"CrossingNumber"->cn,RandomSeed->n],{n,1000}]//Union);//Timing

RandomGraphsWithOuterCrossingPointCounts={
#,
Count[OuterFace[#],_?(GreaterThan[GraphData[{"Coprime",15},"V"]])]
}&/@RandomGraphs;

Small numbers of crossing points on the boundary:

Cases[RandomGraphsWithOuterCrossingPointCounts,{g_,0}:>g]

Cases[RandomGraphsWithOuterCrossingPointCounts,{g_,1}:>g]

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[
#,
AdditionalData->Join[Table[True,GraphData[{"Coprime",15},"V"]],Table[False,cn]],
SameTest->Equal
]
}&/@RandomGraphs;

MaxMemoryUsed[]/10^9.GB

DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]/.g_Graph:>BilateralGraph[CenterGraph@g,"ReturnNonbilateralGraph"->True]

MinimalCrossing construction Random 20k [old]

(cn=CrossingNumber[GraphData[{"Coprime",15}],TimeConstraint->1])//AbsoluteTiming

(RandomGraphs=Table[MinimalCrossingGraph[GraphData[{"Coprime",15}],"CrossingNumber"->cn,RandomSeed->n],{n,20000}]//Union);//Timing

RandomGraphsWithOuterCrossingPointCounts={
#,
Count[OuterFace[#],_?(GreaterThan[GraphData[{"Coprime",15},"V"]])]
}&/@RandomGraphs;

Small numbers of crossing points on the boundary:

Cases[RandomGraphsWithOuterCrossingPointCounts,{g_,0}:>g]

Cases[RandomGraphsWithOuterCrossingPointCounts,{g_,1}:>g]

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[
#,
AdditionalData->Join[Table[True,GraphData[{"Coprime",15},"V"]],Table[False,cn]],
SameTest->Equal
]
}&/@RandomGraphs;

MaxMemoryUsed[]/10^9.GB

DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]/.g_Graph:>BilateralGraph[CenterGraph@g,"ReturnNonbilateralGraph"->True]

MinimalLocalCrossing

GraphData[{"Coprime",15},{"LocalCrossingNumber","RectilinearLocalCrossingNumber"}]

GraphData[{"Coprime",15},"Graph","MinimalLocalCrossing"]//StyleGraphs

MinimalRectilinearLocalCrossing

GraphData[{"Coprime",15},{"LocalCrossingNumber","RectilinearLocalCrossingNumber"}]

GraphData[{"Coprime",15},"Graph","MinimalRectilinearLocalCrossing"]//StyleGraphs

MinimaRectilinearlLocalCrossing construction 1000

AdjacentCrossingsQ[g_Graph,cn_Integer]:=Module[{a=AdjacencyList[g],n=VertexCount[g]-cn},Max[Take[a,-cn]]>n]

(cn=CrossingNumber[GraphData[{"Coprime",15}],TimeConstraint->10])//AbsoluteTiming

(gs=Select[Table[MinimalCrossingGraph[GraphData[{"Coprime",15}],"CrossingNumber"->cn,RandomSeed->i],{i,1000}],!AdjacentCrossingsQ[#,cn]&]//Union)//Timing

MinimaRectilinearlLocalCrossing construction 20000

AdjacentCrossingsQ[g_Graph,cn_Integer]:=Module[{a=AdjacencyList[g],n=VertexCount[g]-cn},Max[Take[a,-cn]]>n]

(cn=CrossingNumber[GraphData[{"Coprime",15}],TimeConstraint->10])//AbsoluteTiming

(gs=Select[Table[MinimalCrossingGraph[GraphData[{"Coprime",15}],"CrossingNumber"->cn,RandomSeed->i],{i,20000}],!AdjacentCrossingsQ[#,cn]&]//Union)//Timing

Circulant

GraphData[{"Coprime",15},"Circulant"]

GraphData[{"Coprime",15},"Graph","Circulant"]//StyleGraphs

Circulant construction

GraphData[{"Coprime",15},"NotationRules","Circulant"]

(ci=CirculantIndices[GraphData[{"Coprime",15}]])//AbsoluteTiming

CirculantGraph1@@@ci

Cases[GraphData[{"Coprime",15},"StandardNames"],{"Circulant",i_}:>i]

CirculantGraph1@@@%

Complement graph

compl=GraphData[{"Coprime",15},"ComplementGraph","Name"]

Line graph

GraphData[{"Coprime",15},"Line"]

LineGraphQ[GraphData[{"Coprime",15}]]//Timing

RootGraph

roots=Select[GraphData[All],GraphData[#,"LineGraph","Name"]==={"Coprime",15}&]

RootGraph[GraphData[{"Coprime",15}]]

Halin

GraphData[{"Coprime",15},"Halin"]

GraphData[{"Coprime",15},"Graph","Halin"]//StyleGraphs

Rigid

GraphData[{"Coprime",15},"Rigid"]

GraphData[{"Coprime",15},"Graph","Rigid"]//StyleGraphs

Flexible

GraphData[{"Coprime",15},"Flexible"]

GraphData[{"Coprime",15},"Graph","Flexible"]//StyleGraphs

Voltage

GraphData[{"Coprime",15},"Graph","Voltage"]//StyleGraphs

Voltage construction

gs=VoltageGraph[GraphData[{"Coprime",15}],"MaxResults"->20,Debug->True]

Length[gs]

RecognizeGraph/@gs

VoltageGraphNotation/@gs//Column

EmbeddingClasses/@gs//Column

GraphSymmetryGroup/@gs//Column

LCF

GraphData[{"Coprime",15},"LCF"]

GraphData[{"Coprime",15},"HamiltonianCycleCount"]

GraphData[{"Coprime",15},"LCFSignature"]

GraphData[{"Coprime",15},"LCFNotations"]

GraphData[{"Coprime",15},"Graph","LCF"]//StyleGraphs

Tally[LCFNotation[#][[2]]&/@%]

UnitDistance

GraphData[{"Coprime",15},"UnitDistance"]

UnitDistanceGraphQ[GraphData[{"Coprime",15}],Debug->True]//Timing

GraphData[{"Coprime",15},"Graph","UnitDistance"]//StyleGraphs

UnitDistance by refinement of default embeddings

Graph[edge list]

(g=UnitDistanceEmbeddingRefine[Graph[GraphData[{"Coprime",15},"EdgeList"]],MaxIterations->500])//Timing

UnitDistanceGraphEmbeddingQ[g]

Graph[vertex list, edge list]

(g=UnitDistanceEmbeddingRefine[Graph[GraphData[{"Coprime",15},"VertexList"],GraphData[{"Coprime",15},"EdgeList"]],MaxIterations->500])//Timing

UnitDistanceGraphEmbeddingQ[g]

UnitDistance by refinement of existing embeddings

gs=UnitDistanceEmbeddingRefine[Graph[VertexList[#],EdgeList[#],VertexCoordinates->GraphEmbedding[#]],MaxIterations->500]&/@Complement@@(GraphData[{"Coprime",15},"Graph",#]&/@{"All","UnitDistance"})

TextGrid[
gdata=SortBy[
{#,DegenerateGraphEmbeddingQ[#],GraphSymmetryGroup[#],Max[Abs[EdgeLengths[#]-1]]}&/@gs,
Last
],
Dividers->All
]

Cases[gdata,{__,0.}]

Symmetric:

gs=Cases[
gdata,
{g_,_,sym:Except[TransformationGroup[{}]],diff_}:>{
HighlightGraph[g1=BilateralGraph[CenterGraph[g],"ReturnNonbilateralGraph"->True],Flatten[FindCoincidentVertices[g1]]],
sym,
diff
}]

UnitDistance by FindUnitDistanceEmbedding  (random embeddings returning on messages)

gs=FindUnitDistanceEmbedding[GraphData[{"Coprime",15}],50,"ReturnWithMessage"->True];//Quiet//Timing

gdata=SortBy[
{#,Max[Abs[EdgeLengths[#]-1]]}&/@gs,
Last
]

Cases[gdata,{g_?UnitDistanceGraphEmbeddingQ,_}:>g]

SymmetricEmebddings=Select[gdata,GraphSymmetryGroup[#[[1]]]=!=TransformationGroup[{}]&]

UnitDistance by FindUnitDistanceEmbedding  (random embedding waiting until UD is found)

FindUnitDistanceEmbedding[GraphData[{"Coprime",15}],"ReturnWithMessage"->False]//Quiet//Timing

Matchstick

GraphData[{"Coprime",15},"Matchstick"]

GraphData[{"Coprime",15},"Graph","Matchstick"]//StyleGraphs

3D default

Graph3D[GraphData[{"Coprime",15},"Edges"]]

3D construction

3D All

GraphData[{"Coprime",15},"Graph",{"3D","All"}]

3D UnitDistance construction Random

GraphData[{"Coprime",15},"Dimension"]

(g=UnitDistanceEmbeddingRefine[
Graph3D[
GraphData[{"Coprime",15},"VertexList"],
GraphData[{"Coprime",15},"EdgeList"]
],
WorkingPrecision->25])//Timing

EdgeLengths[g]

UnitDistanceGraphEmbeddingQ[g]

3D UnitDistance

GraphData[{"Coprime",15},"Graph",{"3D","UnitDistance"}]

3D Polyhedron

GraphData[{"Coprime",15},"Polyhedral"]

GraphData[{"Coprime",15},"Graph",{"3D","Polyhedron"}]

{"Coprime", 16}

Names

GraphData[{"Coprime",16},"StandardName"]

GraphData[{"Coprime",16},"StandardNames"]

HouseOfGraphs

hogid=GraphData[{"Coprime",16},"NotationRules","HouseOfGraphs"]

HouseOfGraphsLookup[hogid]

HouseOfGraphsGraph[hogid]//StyleGraphs[#,ImageSize->Small]&

Wikidata

GraphData[{"Coprime",16},"WikidataID"]

GraphData[{"Coprime",16},"WikidataID","URL"]

Primary

GraphData[{"Coprime",16}]//StyleGraphs[#,ImageSize->Small]&

All

GraphData[{"Coprime",16},"Graph","All"]//StyleGraphs

CurvedEdge

GraphData[{"Coprime",16},"Graph","CurvedEdge"]//StyleGraphs

Inexact

Select[GraphData[{"Coprime",16},"Graph","All"],(!FreeQ[GraphEmbedding[#],_?InexactNumberQ]&)]//StyleGraphs

Degenerate

GraphData[{"Coprime",16},"Graph","Degenerate"]//StyleGraphs

DegenerateGraphEmbeddingTypes/@GraphData[{"Coprime",16},"Graph","Degenerate"]//Column

Embeddings

GraphDataEmbeddings[GraphData[{"Coprime",16}]]

Default embedding

g0=GraphPlot[Graph[GraphData[{"Coprime",16},"VertexList"],GraphData[{"Coprime",16},"Edges"]]]

Configuration

GraphData[{"Coprime",16},"Configuration"]

configurations=GraphData[{"Coprime",16},"Graph","Configuration"]//StyleGraphs

GeneralizedPetersen

GraphData[{"Coprime",16},"Graph","GeneralizedPetersen"]//StyleGraphs

IGraph

GraphData[{"Coprime",16},"Graph","IGraph"]//StyleGraphs

CompleteKPartite

GraphData[{"Coprime",16},"Graph","CompleteKPartite"]//StyleGraphs

Bipartite

GraphData[{"Coprime",16},"Bipartite"]

GraphData[{"Coprime",16},"Graph","Bipartite"]//StyleGraphs

Bilateral

GraphData[{"Coprime",16},"Graph","Bilateral"]//StyleGraphs

Grid[DeleteCases[Monitor[{g=#,BilateralGraphEmbeddingTypes[#],GraphSymmetryGroup[#]}&/@GraphData[{"Coprime",16},"Graph","All"],g],{_,_,TransformationGroup[{}]}],Dividers->All,Alignment->{{Center,{Left}}}]//Quiet

Circular

GraphData[{"Coprime",16},"Graph","Circular"]//StyleGraphs

Circular construction 1*^4 [ s]

Length[hc=FindHamiltonianCycle[GraphData[{"Coprime",16}],1*^4][[All,All,1]]]//Timing

Length[hcsym=SymmetricHamiltonianCycles[GraphData[{"Coprime",16}],hc,ProgressReporting->True]]//Timing

GroupBy[SymmetricHamiltonianCycleGraph[GraphData[{"Coprime",16}],#]&/@hcsym,GraphSymmetryGroup]

Circular construction 1*^5 [ s]

Length[hc=FindHamiltonianCycle[GraphData[{"Coprime",16}],1*^5][[All,All,1]]]//Timing

Length[hcsym=SymmetricHamiltonianCycles[GraphData[{"Coprime",16}],hc,ProgressReporting->True]]//Timing

GroupBy[SymmetricHamiltonianCycleGraph[GraphData[{"Coprime",16}],#]&/@hcsym,GraphSymmetryGroup]

Circular construction All

GraphData[{"Coprime",16},"Hamiltonian"]

GraphData[{"Coprime",16},"HamiltonianCycles"]

GraphData[{"Coprime",16},"HamiltonianCycleCount"]

GraphData[{"Coprime",16},"LCF"]

GraphData[{"Coprime",16},"LCFSignature"]

Length[hc=FindHamiltonianCycle[GraphData[{"Coprime",16}],All][[All,All,1]]]//Timing

gs=CircularEmbeddingFromHamiltonianCycle[GraphData[{"Coprime",16}],#]&/@Take[hc,1]

Length[hcsym=SymmetricHamiltonianCycles[GraphData[{"Coprime",16}],hc,ProgressReporting->True]]//Timing

GroupBy[SymmetricHamiltonianCycleGraph[GraphData[{"Coprime",16}],#]&/@hcsym,GraphSymmetryGroup]

Planar

GraphData[{"Coprime",16},"Planar"]

GraphData[{"Coprime",16},"Graph","Planar"]//StyleGraphs

MinimalCrossingNumber crossings.uos.de

CrossingNumber[GraphData[{"Coprime",16}],Method->"WebCompute"]//AbsoluteTiming

DateString[]

Quit

MinimalCrossingNumber: "EmbeddingScheme" -> 1

(cn=CrossingNumber[GraphData[{"Coprime",16}],"EmbeddingScheme"->1,TimeConstraint->1])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",16}],"EmbeddingScheme"->1,TimeConstraint->10])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",16}],"EmbeddingScheme"->1,TimeConstraint->60])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",16}],"EmbeddingScheme"->1,TimeConstraint->3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",16}],"EmbeddingScheme"->1,TimeConstraint->5 3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",16}],"EmbeddingScheme"->1,TimeConstraint->86400])//AbsoluteTiming

MinimalCrossingNumber: "EmbeddingScheme" -> 2

(cn=CrossingNumber[GraphData[{"Coprime",16}],"EmbeddingScheme"->2,TimeConstraint->1])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",16}],"EmbeddingScheme"->2,TimeConstraint->10])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",16}],"EmbeddingScheme"->2,TimeConstraint->60])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",16}],"EmbeddingScheme"->2,TimeConstraint->3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",16}],"EmbeddingScheme"->2,TimeConstraint->5 3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",16}],"EmbeddingScheme"->2,TimeConstraint->86400])//AbsoluteTiming

MinimalCrossingNumber: "EmbeddingScheme" -> 3

(cn=CrossingNumber[GraphData[{"Coprime",16}],"EmbeddingScheme"->3,TimeConstraint->1])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",16}],"EmbeddingScheme"->3,TimeConstraint->10])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",16}],"EmbeddingScheme"->3,TimeConstraint->60])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",16}],"EmbeddingScheme"->3,TimeConstraint->3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",16}],"EmbeddingScheme"->3,TimeConstraint->5 3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",16}],"EmbeddingScheme"->3,TimeConstraint->86400])//AbsoluteTiming

MinimalCrossing

GraphData[{"Coprime",16},"CN"]

(gs=GraphData[{"Coprime",16},"Graph","MinimalCrossing"])//StyleGraphs

GraphCrossingCount/@gs

GraphCrossingDiagram/@gs

MinimalRectilinearCrossing

GraphData[{"Coprime",16},"RCN"]

GraphData[{"Coprime",16},"Graph","MinimalRectilinearCrossing"]//StyleGraphs

MinimalRectilinearCrossing construction order X [minimum RCN == ]

Length[gs=FindMinimalRectilinearCrossingGraph[GraphData[{"Coprime",16}],Automatic,All,"Size"->Automatic,Method->"SubgraphIsomorphism",Debug->True]]//Timing

MaxMemoryUsed[]/10^9. GB

Tally[RectilinearCrossingCount/@gs]//Timing

Tally[RectilinearLocalCrossingCount/@gs]//Timing

GraphSymmetryGroup/@gs//Tally

Select[gs,GraphSymmetryGroup[#]=!=TransformationGroup[{}]&]

Take[gs,UpTo[100]]

MinimalRectilinearCrossing construction order X [minimum RCN == ]

Length[gs=FindMinimalRectilinearCrossingGraph[GraphData[{"Coprime",16}],Automatic,All,"Size"->XXX,Method->"SubgraphIsomorphism",Debug->True]]//Timing

MaxMemoryUsed[]/10^9. GB

Tally[RectilinearCrossingCount/@gs]//Timing

Tally[RectilinearLocalCrossingCount/@gs]//Timing

GraphSymmetryGroup/@gs//Tally

Select[gs,GraphSymmetryGroup[#]=!=TransformationGroup[{}]&]

Take[gs,UpTo[100]]

MinimalCrossing construction Tutte

(cn=CrossingNumber[GraphData[{"Coprime",16}],TimeConstraint->1])//AbsoluteTiming

(g=MinimalCrossingGraph[GraphData[{"Coprime",16}],"CrossingNumber"->cn])//PolyhedralGraphQ//AbsoluteTiming

faces=ReverseSort@SymmetricallyDistinctFaces[g]

Tally[ReverseSort[Length/@faces]]

TutteGraphs=BilateralGraph[CenterGraph@IGLayoutTutte[g,"OuterFace"->#],"ReturnNonbilateralGraph"->True]&/@faces

TutteGraphsWithOuterCrossingPointCounts={
#,
Count[OuterFace[#],_?(GreaterThan[GraphData[{"Coprime",16},"V"]])]
}&/@TutteGraphs;

Cases[TutteGraphsWithOuterCrossingPointCounts,{g_,0}:>g]

Cases[TutteGraphsWithOuterCrossingPointCounts,{g_,1}:>g]

LocalCrossingNumberWithEmbeddings=
{1+Max[Length/@DeleteCases[
Drop[AdjacencyList[#],GraphData[{"Coprime",16},"V"]],
_Integer?(LessEqualThan[GraphData[{"Coprime",16},"V"]]),
{2}
]],#}&/@TutteGraphs

TutteGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[
#,
AdditionalData->Join[Table[True,GraphData[{"Coprime",16},"V"]],Table[False,cn]],
SameTest->Equal
]
}&/@TutteGraphs;

SymmetricEmbeddingsWithOrientations=DeleteCases[
TutteGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]

Select[SymmetricEmbeddingsWithOrientations[[All,1]],Count[OuterFace[#],_?(GreaterThan[GraphData[{"Coprime",16},"V"]])]==0&]

MinimalCrossing construction Random 1k [XXX s]

(cn=CrossingNumber[GraphData[{"Coprime",16}],TimeConstraint->1])//AbsoluteTiming

Length[diagrams=DistinctMinimalCrossingDiagramData[
GraphData[{"Coprime",16}],
1000,
"CrossingNumber"->cn,
EdgeShapeFunction->"BezierEdge"
]]//AbsoluteTiming

No crossing points on the boundary:

Length[diagrams0=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==0&],"Graph",{}]]//Timing

Take[diagrams0,UpTo[10]]

One crossing point on the boundary:

Length[diagrams1=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==1&],"Graph",{}]]//Timing

Take[diagrams1,UpTo[10]]

graphs=#["Graph"]&/@diagrams;

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[#]
}&/@graphs;//AbsoluteTiming

MaxMemoryUsed[]/10^9.GB

Symmetric embeddings:

Length[SymmetricMinimalEmbeddingData=DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]
]//AbsoluteTiming

SymmetricMinimalEmbeddingData

SymmetricMinimalEmbeddingGraphs=SymmetricMinimalEmbeddingData[[All,1]]

GraphCrossingCount/@SymmetricMinimalEmbeddingGraphs

GraphCrossingDiagram/@SymmetricMinimalEmbeddingGraphs

MinimalCrossing construction Random 5k [XXX s]

(cn=CrossingNumber[GraphData[{"Coprime",16}],TimeConstraint->1])//AbsoluteTiming

Length[diagrams=DistinctMinimalCrossingDiagramData[
GraphData[{"Coprime",16}],
5000,
"CrossingNumber"->cn,
EdgeShapeFunction->"BezierEdge"
]]//AbsoluteTiming

No crossing points on the boundary:

Length[diagrams0=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==0&],"Graph",{}]]//Timing

Take[diagrams0,UpTo[10]]

One crossing point on the boundary:

Length[diagrams1=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==1&],"Graph",{}]]//Timing

Take[diagrams1,UpTo[10]]

graphs=#["Graph"]&/@diagrams;

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[#]
}&/@graphs;//AbsoluteTiming

MaxMemoryUsed[]/10^9.GB

Symmetric embeddings:

Length[SymmetricMinimalEmbeddingData=DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]
]//AbsoluteTiming

SymmetricMinimalEmbeddingData

SymmetricMinimalEmbeddingGraphs=SymmetricMinimalEmbeddingData[[All,1]]

GraphCrossingCount/@SymmetricMinimalEmbeddingGraphs

GraphCrossingDiagram/@SymmetricMinimalEmbeddingGraphs

MinimalCrossing construction Random 20k [XXX s]

(cn=CrossingNumber[GraphData[{"Coprime",16}],TimeConstraint->1])//AbsoluteTiming

Length[diagrams=DistinctMinimalCrossingDiagramData[
GraphData[{"Coprime",16}],
20*^3,
"CrossingNumber"->cn,
EdgeShapeFunction->"BezierEdge"
]]//AbsoluteTiming

No crossing points on the boundary:

Length[diagrams0=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==0&],"Graph",{}]]//Timing

Take[diagrams0,UpTo[10]]

One crossing point on the boundary:

Length[diagrams1=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==1&],"Graph",{}]]//Timing

Take[diagrams1,UpTo[10]]

graphs=#["Graph"]&/@diagrams;

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[#]
}&/@graphs;//AbsoluteTiming

MaxMemoryUsed[]/10^9.GB

Symmetric embeddings:

Length[SymmetricMinimalEmbeddingData=DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]
]//AbsoluteTiming

SymmetricMinimalEmbeddingData

SymmetricMinimalEmbeddingGraphs=SymmetricMinimalEmbeddingData[[All,1]]

GraphCrossingCount/@SymmetricMinimalEmbeddingGraphs

GraphCrossingDiagram/@SymmetricMinimalEmbeddingGraphs

MinimalCrossing construction Random 1k [old]

(cn=CrossingNumber[GraphData[{"Coprime",16}],TimeConstraint->1])//AbsoluteTiming

(RandomGraphs=Table[MinimalCrossingGraph[GraphData[{"Coprime",16}],"CrossingNumber"->cn,RandomSeed->n],{n,1000}]//Union);//Timing

RandomGraphsWithOuterCrossingPointCounts={
#,
Count[OuterFace[#],_?(GreaterThan[GraphData[{"Coprime",16},"V"]])]
}&/@RandomGraphs;

Small numbers of crossing points on the boundary:

Cases[RandomGraphsWithOuterCrossingPointCounts,{g_,0}:>g]

Cases[RandomGraphsWithOuterCrossingPointCounts,{g_,1}:>g]

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[
#,
AdditionalData->Join[Table[True,GraphData[{"Coprime",16},"V"]],Table[False,cn]],
SameTest->Equal
]
}&/@RandomGraphs;

MaxMemoryUsed[]/10^9.GB

DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]/.g_Graph:>BilateralGraph[CenterGraph@g,"ReturnNonbilateralGraph"->True]

MinimalCrossing construction Random 20k [old]

(cn=CrossingNumber[GraphData[{"Coprime",16}],TimeConstraint->1])//AbsoluteTiming

(RandomGraphs=Table[MinimalCrossingGraph[GraphData[{"Coprime",16}],"CrossingNumber"->cn,RandomSeed->n],{n,20000}]//Union);//Timing

RandomGraphsWithOuterCrossingPointCounts={
#,
Count[OuterFace[#],_?(GreaterThan[GraphData[{"Coprime",16},"V"]])]
}&/@RandomGraphs;

Small numbers of crossing points on the boundary:

Cases[RandomGraphsWithOuterCrossingPointCounts,{g_,0}:>g]

Cases[RandomGraphsWithOuterCrossingPointCounts,{g_,1}:>g]

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[
#,
AdditionalData->Join[Table[True,GraphData[{"Coprime",16},"V"]],Table[False,cn]],
SameTest->Equal
]
}&/@RandomGraphs;

MaxMemoryUsed[]/10^9.GB

DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]/.g_Graph:>BilateralGraph[CenterGraph@g,"ReturnNonbilateralGraph"->True]

MinimalLocalCrossing

GraphData[{"Coprime",16},{"LocalCrossingNumber","RectilinearLocalCrossingNumber"}]

GraphData[{"Coprime",16},"Graph","MinimalLocalCrossing"]//StyleGraphs

MinimalRectilinearLocalCrossing

GraphData[{"Coprime",16},{"LocalCrossingNumber","RectilinearLocalCrossingNumber"}]

GraphData[{"Coprime",16},"Graph","MinimalRectilinearLocalCrossing"]//StyleGraphs

MinimaRectilinearlLocalCrossing construction 1000

AdjacentCrossingsQ[g_Graph,cn_Integer]:=Module[{a=AdjacencyList[g],n=VertexCount[g]-cn},Max[Take[a,-cn]]>n]

(cn=CrossingNumber[GraphData[{"Coprime",16}],TimeConstraint->10])//AbsoluteTiming

(gs=Select[Table[MinimalCrossingGraph[GraphData[{"Coprime",16}],"CrossingNumber"->cn,RandomSeed->i],{i,1000}],!AdjacentCrossingsQ[#,cn]&]//Union)//Timing

MinimaRectilinearlLocalCrossing construction 20000

AdjacentCrossingsQ[g_Graph,cn_Integer]:=Module[{a=AdjacencyList[g],n=VertexCount[g]-cn},Max[Take[a,-cn]]>n]

(cn=CrossingNumber[GraphData[{"Coprime",16}],TimeConstraint->10])//AbsoluteTiming

(gs=Select[Table[MinimalCrossingGraph[GraphData[{"Coprime",16}],"CrossingNumber"->cn,RandomSeed->i],{i,20000}],!AdjacentCrossingsQ[#,cn]&]//Union)//Timing

Circulant

GraphData[{"Coprime",16},"Circulant"]

GraphData[{"Coprime",16},"Graph","Circulant"]//StyleGraphs

Circulant construction

GraphData[{"Coprime",16},"NotationRules","Circulant"]

(ci=CirculantIndices[GraphData[{"Coprime",16}]])//AbsoluteTiming

CirculantGraph1@@@ci

Cases[GraphData[{"Coprime",16},"StandardNames"],{"Circulant",i_}:>i]

CirculantGraph1@@@%

Complement graph

compl=GraphData[{"Coprime",16},"ComplementGraph","Name"]

Line graph

GraphData[{"Coprime",16},"Line"]

LineGraphQ[GraphData[{"Coprime",16}]]//Timing

RootGraph

roots=Select[GraphData[All],GraphData[#,"LineGraph","Name"]==={"Coprime",16}&]

RootGraph[GraphData[{"Coprime",16}]]

Halin

GraphData[{"Coprime",16},"Halin"]

GraphData[{"Coprime",16},"Graph","Halin"]//StyleGraphs

Rigid

GraphData[{"Coprime",16},"Rigid"]

GraphData[{"Coprime",16},"Graph","Rigid"]//StyleGraphs

Flexible

GraphData[{"Coprime",16},"Flexible"]

GraphData[{"Coprime",16},"Graph","Flexible"]//StyleGraphs

Voltage

GraphData[{"Coprime",16},"Graph","Voltage"]//StyleGraphs

Voltage construction

gs=VoltageGraph[GraphData[{"Coprime",16}],"MaxResults"->20,Debug->True]

Length[gs]

RecognizeGraph/@gs

VoltageGraphNotation/@gs//Column

EmbeddingClasses/@gs//Column

GraphSymmetryGroup/@gs//Column

LCF

GraphData[{"Coprime",16},"LCF"]

GraphData[{"Coprime",16},"HamiltonianCycleCount"]

GraphData[{"Coprime",16},"LCFSignature"]

GraphData[{"Coprime",16},"LCFNotations"]

GraphData[{"Coprime",16},"Graph","LCF"]//StyleGraphs

Tally[LCFNotation[#][[2]]&/@%]

UnitDistance

GraphData[{"Coprime",16},"UnitDistance"]

UnitDistanceGraphQ[GraphData[{"Coprime",16}],Debug->True]//Timing

GraphData[{"Coprime",16},"Graph","UnitDistance"]//StyleGraphs

UnitDistance by refinement of default embeddings

Graph[edge list]

(g=UnitDistanceEmbeddingRefine[Graph[GraphData[{"Coprime",16},"EdgeList"]],MaxIterations->500])//Timing

UnitDistanceGraphEmbeddingQ[g]

Graph[vertex list, edge list]

(g=UnitDistanceEmbeddingRefine[Graph[GraphData[{"Coprime",16},"VertexList"],GraphData[{"Coprime",16},"EdgeList"]],MaxIterations->500])//Timing

UnitDistanceGraphEmbeddingQ[g]

UnitDistance by refinement of existing embeddings

gs=UnitDistanceEmbeddingRefine[Graph[VertexList[#],EdgeList[#],VertexCoordinates->GraphEmbedding[#]],MaxIterations->500]&/@Complement@@(GraphData[{"Coprime",16},"Graph",#]&/@{"All","UnitDistance"})

TextGrid[
gdata=SortBy[
{#,DegenerateGraphEmbeddingQ[#],GraphSymmetryGroup[#],Max[Abs[EdgeLengths[#]-1]]}&/@gs,
Last
],
Dividers->All
]

Cases[gdata,{__,0.}]

Symmetric:

gs=Cases[
gdata,
{g_,_,sym:Except[TransformationGroup[{}]],diff_}:>{
HighlightGraph[g1=BilateralGraph[CenterGraph[g],"ReturnNonbilateralGraph"->True],Flatten[FindCoincidentVertices[g1]]],
sym,
diff
}]

UnitDistance by FindUnitDistanceEmbedding  (random embeddings returning on messages)

gs=FindUnitDistanceEmbedding[GraphData[{"Coprime",16}],50,"ReturnWithMessage"->True];//Quiet//Timing

gdata=SortBy[
{#,Max[Abs[EdgeLengths[#]-1]]}&/@gs,
Last
]

Cases[gdata,{g_?UnitDistanceGraphEmbeddingQ,_}:>g]

SymmetricEmebddings=Select[gdata,GraphSymmetryGroup[#[[1]]]=!=TransformationGroup[{}]&]

UnitDistance by FindUnitDistanceEmbedding  (random embedding waiting until UD is found)

FindUnitDistanceEmbedding[GraphData[{"Coprime",16}],"ReturnWithMessage"->False]//Quiet//Timing

Matchstick

GraphData[{"Coprime",16},"Matchstick"]

GraphData[{"Coprime",16},"Graph","Matchstick"]//StyleGraphs

3D default

Graph3D[GraphData[{"Coprime",16},"Edges"]]

3D construction

3D All

GraphData[{"Coprime",16},"Graph",{"3D","All"}]

3D UnitDistance construction Random

GraphData[{"Coprime",16},"Dimension"]

(g=UnitDistanceEmbeddingRefine[
Graph3D[
GraphData[{"Coprime",16},"VertexList"],
GraphData[{"Coprime",16},"EdgeList"]
],
WorkingPrecision->25])//Timing

EdgeLengths[g]

UnitDistanceGraphEmbeddingQ[g]

3D UnitDistance

GraphData[{"Coprime",16},"Graph",{"3D","UnitDistance"}]

3D Polyhedron

GraphData[{"Coprime",16},"Polyhedral"]

GraphData[{"Coprime",16},"Graph",{"3D","Polyhedron"}]

{"Coprime", 17}

Names

GraphData[{"Coprime",17},"StandardName"]

GraphData[{"Coprime",17},"StandardNames"]

HouseOfGraphs

hogid=GraphData[{"Coprime",17},"NotationRules","HouseOfGraphs"]

HouseOfGraphsLookup[hogid]

HouseOfGraphsGraph[hogid]//StyleGraphs[#,ImageSize->Small]&

Wikidata

GraphData[{"Coprime",17},"WikidataID"]

GraphData[{"Coprime",17},"WikidataID","URL"]

Primary

GraphData[{"Coprime",17}]//StyleGraphs[#,ImageSize->Small]&

All

GraphData[{"Coprime",17},"Graph","All"]//StyleGraphs

CurvedEdge

GraphData[{"Coprime",17},"Graph","CurvedEdge"]//StyleGraphs

Inexact

Select[GraphData[{"Coprime",17},"Graph","All"],(!FreeQ[GraphEmbedding[#],_?InexactNumberQ]&)]//StyleGraphs

Degenerate

GraphData[{"Coprime",17},"Graph","Degenerate"]//StyleGraphs

DegenerateGraphEmbeddingTypes/@GraphData[{"Coprime",17},"Graph","Degenerate"]//Column

Embeddings

GraphDataEmbeddings[GraphData[{"Coprime",17}]]

Default embedding

g0=GraphPlot[Graph[GraphData[{"Coprime",17},"VertexList"],GraphData[{"Coprime",17},"Edges"]]]

Configuration

GraphData[{"Coprime",17},"Configuration"]

configurations=GraphData[{"Coprime",17},"Graph","Configuration"]//StyleGraphs

GeneralizedPetersen

GraphData[{"Coprime",17},"Graph","GeneralizedPetersen"]//StyleGraphs

IGraph

GraphData[{"Coprime",17},"Graph","IGraph"]//StyleGraphs

CompleteKPartite

GraphData[{"Coprime",17},"Graph","CompleteKPartite"]//StyleGraphs

Bipartite

GraphData[{"Coprime",17},"Bipartite"]

GraphData[{"Coprime",17},"Graph","Bipartite"]//StyleGraphs

Bilateral

GraphData[{"Coprime",17},"Graph","Bilateral"]//StyleGraphs

Grid[DeleteCases[Monitor[{g=#,BilateralGraphEmbeddingTypes[#],GraphSymmetryGroup[#]}&/@GraphData[{"Coprime",17},"Graph","All"],g],{_,_,TransformationGroup[{}]}],Dividers->All,Alignment->{{Center,{Left}}}]//Quiet

Circular

GraphData[{"Coprime",17},"Graph","Circular"]//StyleGraphs

Circular construction 1*^5 [73 s]

Length[hc=FindHamiltonianCycle[GraphData[{"Coprime",17}],1*^5][[All,All,1]]]//Timing

gs=CircularEmbeddingFromHamiltonianCycle[GraphData[{"Coprime",17}],#]&/@Take[hc,1]

Length[hcsym=SymmetricHamiltonianCycles[GraphData[{"Coprime",17}],hc,ProgressReporting->True]]//Timing

GroupBy[SymmetricHamiltonianCycleGraph[GraphData[{"Coprime",17}],#]&/@hcsym,GraphSymmetryGroup]

Circular construction 1*^6 [727 s]

Length[hc=FindHamiltonianCycle[GraphData[{"Coprime",17}],1*^6][[All,All,1]]]//Timing

Length[hcsym=SymmetricHamiltonianCycles[GraphData[{"Coprime",17}],hc,ProgressReporting->True]]//Timing

GroupBy[SymmetricHamiltonianCycleGraph[GraphData[{"Coprime",17}],#]&/@hcsym,GraphSymmetryGroup]

Circular construction 1*^7 [7249 s]

Length[hc=FindHamiltonianCycle[GraphData[{"Coprime",17}],1*^7][[All,All,1]]]//Timing

Length[hcsym=SymmetricHamiltonianCycles[GraphData[{"Coprime",17}],hc,ProgressReporting->True]]//Timing

GroupBy[SymmetricHamiltonianCycleGraph[GraphData[{"Coprime",17}],#]&/@hcsym,GraphSymmetryGroup]

Circular construction All

GraphData[{"Coprime",17},"Hamiltonian"]

GraphData[{"Coprime",17},"HamiltonianCycles"]

GraphData[{"Coprime",17},"HamiltonianCycleCount"]

GraphData[{"Coprime",17},"LCF"]

GraphData[{"Coprime",17},"LCFSignature"]

Length[hc=FindHamiltonianCycle[GraphData[{"Coprime",17}],All][[All,All,1]]]//Timing

gs=CircularEmbeddingFromHamiltonianCycle[GraphData[{"Coprime",17}],#]&/@Take[hc,1]

Length[hcsym=SymmetricHamiltonianCycles[GraphData[{"Coprime",17}],hc,ProgressReporting->True]]//Timing

GroupBy[SymmetricHamiltonianCycleGraph[GraphData[{"Coprime",17}],#]&/@hcsym,GraphSymmetryGroup]

Planar

GraphData[{"Coprime",17},"Planar"]

GraphData[{"Coprime",17},"Graph","Planar"]//StyleGraphs

MinimalCrossingNumber crossings.uos.de

CrossingNumber[GraphData[{"Coprime",17}],Method->"WebCompute"]//AbsoluteTiming

DateString[]

Quit

MinimalCrossingNumber: "EmbeddingScheme" -> 1

(cn=CrossingNumber[GraphData[{"Coprime",17}],"EmbeddingScheme"->1,TimeConstraint->1])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",17}],"EmbeddingScheme"->1,TimeConstraint->10])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",17}],"EmbeddingScheme"->1,TimeConstraint->60])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",17}],"EmbeddingScheme"->1,TimeConstraint->3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",17}],"EmbeddingScheme"->1,TimeConstraint->5 3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",17}],"EmbeddingScheme"->1,TimeConstraint->86400])//AbsoluteTiming

MinimalCrossingNumber: "EmbeddingScheme" -> 2

(cn=CrossingNumber[GraphData[{"Coprime",17}],"EmbeddingScheme"->2,TimeConstraint->1])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",17}],"EmbeddingScheme"->2,TimeConstraint->10])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",17}],"EmbeddingScheme"->2,TimeConstraint->60])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",17}],"EmbeddingScheme"->2,TimeConstraint->3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",17}],"EmbeddingScheme"->2,TimeConstraint->5 3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",17}],"EmbeddingScheme"->2,TimeConstraint->86400])//AbsoluteTiming

MinimalCrossingNumber: "EmbeddingScheme" -> 3

(cn=CrossingNumber[GraphData[{"Coprime",17}],"EmbeddingScheme"->3,TimeConstraint->1])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",17}],"EmbeddingScheme"->3,TimeConstraint->10])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",17}],"EmbeddingScheme"->3,TimeConstraint->60])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",17}],"EmbeddingScheme"->3,TimeConstraint->3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",17}],"EmbeddingScheme"->3,TimeConstraint->5 3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",17}],"EmbeddingScheme"->3,TimeConstraint->86400])//AbsoluteTiming

MinimalCrossing

GraphData[{"Coprime",17},"CN"]

(gs=GraphData[{"Coprime",17},"Graph","MinimalCrossing"])//StyleGraphs

GraphCrossingCount/@gs

GraphCrossingDiagram/@gs

MinimalRectilinearCrossing

GraphData[{"Coprime",17},"RCN"]

GraphData[{"Coprime",17},"Graph","MinimalRectilinearCrossing"]//StyleGraphs

MinimalCrossing construction Tutte

(cn=CrossingNumber[GraphData[{"Coprime",17}],TimeConstraint->1])//AbsoluteTiming

(g=MinimalCrossingGraph[GraphData[{"Coprime",17}],"CrossingNumber"->cn])//PolyhedralGraphQ//AbsoluteTiming

faces=ReverseSort@SymmetricallyDistinctFaces[g]

Tally[ReverseSort[Length/@faces]]

TutteGraphs=BilateralGraph[CenterGraph@IGLayoutTutte[g,"OuterFace"->#],"ReturnNonbilateralGraph"->True]&/@faces

TutteGraphsWithOuterCrossingPointCounts={
#,
Count[OuterFace[#],_?(GreaterThan[GraphData[{"Coprime",17},"V"]])]
}&/@TutteGraphs;

Cases[TutteGraphsWithOuterCrossingPointCounts,{g_,0}:>g]

Cases[TutteGraphsWithOuterCrossingPointCounts,{g_,1}:>g]

LocalCrossingNumberWithEmbeddings=
{1+Max[Length/@DeleteCases[
Drop[AdjacencyList[#],GraphData[{"Coprime",17},"V"]],
_Integer?(LessEqualThan[GraphData[{"Coprime",17},"V"]]),
{2}
]],#}&/@TutteGraphs

TutteGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[
#,
AdditionalData->Join[Table[True,GraphData[{"Coprime",17},"V"]],Table[False,cn]],
SameTest->Equal
]
}&/@TutteGraphs;

SymmetricEmbeddingsWithOrientations=DeleteCases[
TutteGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]

Select[SymmetricEmbeddingsWithOrientations[[All,1]],Count[OuterFace[#],_?(GreaterThan[GraphData[{"Coprime",17},"V"]])]==0&]

MinimalCrossing construction Random 1k [XXX s]

(cn=CrossingNumber[GraphData[{"Coprime",17}],TimeConstraint->1])//AbsoluteTiming

Length[diagrams=DistinctMinimalCrossingDiagramData[
GraphData[{"Coprime",17}],
1000,
"CrossingNumber"->cn,
EdgeShapeFunction->"BezierEdge"
]]//AbsoluteTiming

No crossing points on the boundary:

Length[diagrams0=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==0&],"Graph",{}]]//Timing

Take[diagrams0,UpTo[10]]

One crossing point on the boundary:

Length[diagrams1=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==1&],"Graph",{}]]//Timing

Take[diagrams1,UpTo[10]]

graphs=#["Graph"]&/@diagrams;

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[#]
}&/@graphs;//AbsoluteTiming

MaxMemoryUsed[]/10^9.GB

Symmetric embeddings:

Length[SymmetricMinimalEmbeddingData=DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]
]//AbsoluteTiming

SymmetricMinimalEmbeddingData

SymmetricMinimalEmbeddingGraphs=SymmetricMinimalEmbeddingData[[All,1]]

GraphCrossingCount/@SymmetricMinimalEmbeddingGraphs

GraphCrossingDiagram/@SymmetricMinimalEmbeddingGraphs

MinimalCrossing construction Random 5k [XXX s]

(cn=CrossingNumber[GraphData[{"Coprime",17}],TimeConstraint->1])//AbsoluteTiming

Length[diagrams=DistinctMinimalCrossingDiagramData[
GraphData[{"Coprime",17}],
5000,
"CrossingNumber"->cn,
EdgeShapeFunction->"BezierEdge"
]]//AbsoluteTiming

No crossing points on the boundary:

Length[diagrams0=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==0&],"Graph",{}]]//Timing

Take[diagrams0,UpTo[10]]

One crossing point on the boundary:

Length[diagrams1=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==1&],"Graph",{}]]//Timing

Take[diagrams1,UpTo[10]]

graphs=#["Graph"]&/@diagrams;

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[#]
}&/@graphs;//AbsoluteTiming

MaxMemoryUsed[]/10^9.GB

Symmetric embeddings:

Length[SymmetricMinimalEmbeddingData=DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]
]//AbsoluteTiming

SymmetricMinimalEmbeddingData

SymmetricMinimalEmbeddingGraphs=SymmetricMinimalEmbeddingData[[All,1]]

GraphCrossingCount/@SymmetricMinimalEmbeddingGraphs

GraphCrossingDiagram/@SymmetricMinimalEmbeddingGraphs

MinimalCrossing construction Random 20k [XXX s]

(cn=CrossingNumber[GraphData[{"Coprime",17}],TimeConstraint->1])//AbsoluteTiming

Length[diagrams=DistinctMinimalCrossingDiagramData[
GraphData[{"Coprime",17}],
20*^3,
"CrossingNumber"->cn,
EdgeShapeFunction->"BezierEdge"
]]//AbsoluteTiming

No crossing points on the boundary:

Length[diagrams0=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==0&],"Graph",{}]]//Timing

Take[diagrams0,UpTo[10]]

One crossing point on the boundary:

Length[diagrams1=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==1&],"Graph",{}]]//Timing

Take[diagrams1,UpTo[10]]

graphs=#["Graph"]&/@diagrams;

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[#]
}&/@graphs;//AbsoluteTiming

MaxMemoryUsed[]/10^9.GB

Symmetric embeddings:

Length[SymmetricMinimalEmbeddingData=DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]
]//AbsoluteTiming

SymmetricMinimalEmbeddingData

SymmetricMinimalEmbeddingGraphs=SymmetricMinimalEmbeddingData[[All,1]]

GraphCrossingCount/@SymmetricMinimalEmbeddingGraphs

GraphCrossingDiagram/@SymmetricMinimalEmbeddingGraphs

MinimalCrossing construction Random 1k [old]

(cn=CrossingNumber[GraphData[{"Coprime",17}],TimeConstraint->1])//AbsoluteTiming

(RandomGraphs=Table[MinimalCrossingGraph[GraphData[{"Coprime",17}],"CrossingNumber"->cn,RandomSeed->n],{n,1000}]//Union);//Timing

RandomGraphsWithOuterCrossingPointCounts={
#,
Count[OuterFace[#],_?(GreaterThan[GraphData[{"Coprime",17},"V"]])]
}&/@RandomGraphs;

Small numbers of crossing points on the boundary:

Cases[RandomGraphsWithOuterCrossingPointCounts,{g_,0}:>g]

Cases[RandomGraphsWithOuterCrossingPointCounts,{g_,1}:>g]

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[
#,
AdditionalData->Join[Table[True,GraphData[{"Coprime",17},"V"]],Table[False,cn]],
SameTest->Equal
]
}&/@RandomGraphs;

MaxMemoryUsed[]/10^9.GB

DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]/.g_Graph:>BilateralGraph[CenterGraph@g,"ReturnNonbilateralGraph"->True]

MinimalCrossing construction Random 20k [old]

(cn=CrossingNumber[GraphData[{"Coprime",17}],TimeConstraint->1])//AbsoluteTiming

(RandomGraphs=Table[MinimalCrossingGraph[GraphData[{"Coprime",17}],"CrossingNumber"->cn,RandomSeed->n],{n,20000}]//Union);//Timing

RandomGraphsWithOuterCrossingPointCounts={
#,
Count[OuterFace[#],_?(GreaterThan[GraphData[{"Coprime",17},"V"]])]
}&/@RandomGraphs;

Small numbers of crossing points on the boundary:

Cases[RandomGraphsWithOuterCrossingPointCounts,{g_,0}:>g]

Cases[RandomGraphsWithOuterCrossingPointCounts,{g_,1}:>g]

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[
#,
AdditionalData->Join[Table[True,GraphData[{"Coprime",17},"V"]],Table[False,cn]],
SameTest->Equal
]
}&/@RandomGraphs;

MaxMemoryUsed[]/10^9.GB

DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]/.g_Graph:>BilateralGraph[CenterGraph@g,"ReturnNonbilateralGraph"->True]

MinimalLocalCrossing

GraphData[{"Coprime",17},{"LocalCrossingNumber","RectilinearLocalCrossingNumber"}]

GraphData[{"Coprime",17},"Graph","MinimalLocalCrossing"]//StyleGraphs

MinimalRectilinearLocalCrossing

GraphData[{"Coprime",17},{"LocalCrossingNumber","RectilinearLocalCrossingNumber"}]

GraphData[{"Coprime",17},"Graph","MinimalRectilinearLocalCrossing"]//StyleGraphs

MinimaRectilinearlLocalCrossing construction 1000

AdjacentCrossingsQ[g_Graph,cn_Integer]:=Module[{a=AdjacencyList[g],n=VertexCount[g]-cn},Max[Take[a,-cn]]>n]

(cn=CrossingNumber[GraphData[{"Coprime",17}],TimeConstraint->10])//AbsoluteTiming

(gs=Select[Table[MinimalCrossingGraph[GraphData[{"Coprime",17}],"CrossingNumber"->cn,RandomSeed->i],{i,1000}],!AdjacentCrossingsQ[#,cn]&]//Union)//Timing

MinimaRectilinearlLocalCrossing construction 20000

AdjacentCrossingsQ[g_Graph,cn_Integer]:=Module[{a=AdjacencyList[g],n=VertexCount[g]-cn},Max[Take[a,-cn]]>n]

(cn=CrossingNumber[GraphData[{"Coprime",17}],TimeConstraint->10])//AbsoluteTiming

(gs=Select[Table[MinimalCrossingGraph[GraphData[{"Coprime",17}],"CrossingNumber"->cn,RandomSeed->i],{i,20000}],!AdjacentCrossingsQ[#,cn]&]//Union)//Timing

Circulant

GraphData[{"Coprime",17},"Circulant"]

GraphData[{"Coprime",17},"Graph","Circulant"]//StyleGraphs

Circulant construction

GraphData[{"Coprime",17},"NotationRules","Circulant"]

(ci=CirculantIndices[GraphData[{"Coprime",17}]])//AbsoluteTiming

CirculantGraph1@@@ci

Cases[GraphData[{"Coprime",17},"StandardNames"],{"Circulant",i_}:>i]

CirculantGraph1@@@%

Complement graph

compl=GraphData[{"Coprime",17},"ComplementGraph","Name"]

Line graph

GraphData[{"Coprime",17},"Line"]

LineGraphQ[GraphData[{"Coprime",17}]]//Timing

RootGraph

roots=Select[GraphData[All],GraphData[#,"LineGraph","Name"]==={"Coprime",17}&]

RootGraph[GraphData[{"Coprime",17}]]

Halin

GraphData[{"Coprime",17},"Halin"]

GraphData[{"Coprime",17},"Graph","Halin"]//StyleGraphs

Rigid

GraphData[{"Coprime",17},"Rigid"]

GraphData[{"Coprime",17},"Graph","Rigid"]//StyleGraphs

Flexible

GraphData[{"Coprime",17},"Flexible"]

GraphData[{"Coprime",17},"Graph","Flexible"]//StyleGraphs

Voltage

GraphData[{"Coprime",17},"Graph","Voltage"]//StyleGraphs

Voltage construction

gs=VoltageGraph[GraphData[{"Coprime",17}],"MaxResults"->20,Debug->True]

Length[gs]

RecognizeGraph/@gs

VoltageGraphNotation/@gs//Column

EmbeddingClasses/@gs//Column

GraphSymmetryGroup/@gs//Column

LCF

GraphData[{"Coprime",17},"LCF"]

GraphData[{"Coprime",17},"HamiltonianCycleCount"]

GraphData[{"Coprime",17},"LCFSignature"]

GraphData[{"Coprime",17},"LCFNotations"]

GraphData[{"Coprime",17},"Graph","LCF"]//StyleGraphs

Tally[LCFNotation[#][[2]]&/@%]

UnitDistance

GraphData[{"Coprime",17},"UnitDistance"]

UnitDistanceGraphQ[GraphData[{"Coprime",17}],Debug->True]//Timing

GraphData[{"Coprime",17},"Graph","UnitDistance"]//StyleGraphs

UnitDistance by refinement of default embeddings

Graph[edge list]

(g=UnitDistanceEmbeddingRefine[Graph[GraphData[{"Coprime",17},"EdgeList"]],MaxIterations->500])//Timing

UnitDistanceGraphEmbeddingQ[g]

Graph[vertex list, edge list]

(g=UnitDistanceEmbeddingRefine[Graph[GraphData[{"Coprime",17},"VertexList"],GraphData[{"Coprime",17},"EdgeList"]],MaxIterations->500])//Timing

UnitDistanceGraphEmbeddingQ[g]

UnitDistance by refinement of existing embeddings

gs=UnitDistanceEmbeddingRefine[Graph[VertexList[#],EdgeList[#],VertexCoordinates->GraphEmbedding[#]],MaxIterations->500]&/@Complement@@(GraphData[{"Coprime",17},"Graph",#]&/@{"All","UnitDistance"})

TextGrid[
gdata=SortBy[
{#,DegenerateGraphEmbeddingQ[#],GraphSymmetryGroup[#],Max[Abs[EdgeLengths[#]-1]]}&/@gs,
Last
],
Dividers->All
]

Cases[gdata,{__,0.}]

Symmetric:

gs=Cases[
gdata,
{g_,_,sym:Except[TransformationGroup[{}]],diff_}:>{
HighlightGraph[g1=BilateralGraph[CenterGraph[g],"ReturnNonbilateralGraph"->True],Flatten[FindCoincidentVertices[g1]]],
sym,
diff
}]

UnitDistance by FindUnitDistanceEmbedding  (random embeddings returning on messages)

gs=FindUnitDistanceEmbedding[GraphData[{"Coprime",17}],50,"ReturnWithMessage"->True];//Quiet//Timing

gdata=SortBy[
{#,Max[Abs[EdgeLengths[#]-1]]}&/@gs,
Last
]

Cases[gdata,{g_?UnitDistanceGraphEmbeddingQ,_}:>g]

SymmetricEmebddings=Select[gdata,GraphSymmetryGroup[#[[1]]]=!=TransformationGroup[{}]&]

UnitDistance by FindUnitDistanceEmbedding  (random embedding waiting until UD is found)

FindUnitDistanceEmbedding[GraphData[{"Coprime",17}],"ReturnWithMessage"->False]//Quiet//Timing

Matchstick

GraphData[{"Coprime",17},"Matchstick"]

GraphData[{"Coprime",17},"Graph","Matchstick"]//StyleGraphs

3D default

Graph3D[GraphData[{"Coprime",17},"Edges"]]

3D construction

3D All

GraphData[{"Coprime",17},"Graph",{"3D","All"}]

3D UnitDistance construction Random

GraphData[{"Coprime",17},"Dimension"]

(g=UnitDistanceEmbeddingRefine[
Graph3D[
GraphData[{"Coprime",17},"VertexList"],
GraphData[{"Coprime",17},"EdgeList"]
],
WorkingPrecision->25])//Timing

EdgeLengths[g]

UnitDistanceGraphEmbeddingQ[g]

3D UnitDistance

GraphData[{"Coprime",17},"Graph",{"3D","UnitDistance"}]

3D Polyhedron

GraphData[{"Coprime",17},"Polyhedral"]

GraphData[{"Coprime",17},"Graph",{"3D","Polyhedron"}]

{"Coprime", 18}

Names

GraphData[{"Coprime",18},"StandardName"]

GraphData[{"Coprime",18},"StandardNames"]

HouseOfGraphs

hogid=GraphData[{"Coprime",18},"NotationRules","HouseOfGraphs"]

HouseOfGraphsLookup[hogid]

HouseOfGraphsGraph[hogid]//StyleGraphs[#,ImageSize->Small]&

Wikidata

GraphData[{"Coprime",18},"WikidataID"]

GraphData[{"Coprime",18},"WikidataID","URL"]

Primary

GraphData[{"Coprime",18}]//StyleGraphs[#,ImageSize->Small]&

All

GraphData[{"Coprime",18},"Graph","All"]//StyleGraphs

CurvedEdge

GraphData[{"Coprime",18},"Graph","CurvedEdge"]//StyleGraphs

Inexact

Select[GraphData[{"Coprime",18},"Graph","All"],(!FreeQ[GraphEmbedding[#],_?InexactNumberQ]&)]//StyleGraphs

Degenerate

GraphData[{"Coprime",18},"Graph","Degenerate"]//StyleGraphs

DegenerateGraphEmbeddingTypes/@GraphData[{"Coprime",18},"Graph","Degenerate"]//Column

Embeddings

GraphDataEmbeddings[GraphData[{"Coprime",18}]]

Default embedding

g0=GraphPlot[Graph[GraphData[{"Coprime",18},"VertexList"],GraphData[{"Coprime",18},"Edges"]]]

Configuration

GraphData[{"Coprime",18},"Configuration"]

configurations=GraphData[{"Coprime",18},"Graph","Configuration"]//StyleGraphs

GeneralizedPetersen

GraphData[{"Coprime",18},"Graph","GeneralizedPetersen"]//StyleGraphs

IGraph

GraphData[{"Coprime",18},"Graph","IGraph"]//StyleGraphs

CompleteKPartite

GraphData[{"Coprime",18},"Graph","CompleteKPartite"]//StyleGraphs

Bipartite

GraphData[{"Coprime",18},"Bipartite"]

GraphData[{"Coprime",18},"Graph","Bipartite"]//StyleGraphs

Bilateral

GraphData[{"Coprime",18},"Graph","Bilateral"]//StyleGraphs

Grid[DeleteCases[Monitor[{g=#,BilateralGraphEmbeddingTypes[#],GraphSymmetryGroup[#]}&/@GraphData[{"Coprime",18},"Graph","All"],g],{_,_,TransformationGroup[{}]}],Dividers->All,Alignment->{{Center,{Left}}}]//Quiet

Circular

GraphData[{"Coprime",18},"Graph","Circular"]//StyleGraphs

Circular construction 1*^4 [ s]

Length[hc=FindHamiltonianCycle[GraphData[{"Coprime",18}],1*^4][[All,All,1]]]//Timing

gs=CircularEmbeddingFromHamiltonianCycle[GraphData[{"Coprime",18}],#]&/@Take[hc,1]

Length[hcsym=SymmetricHamiltonianCycles[GraphData[{"Coprime",18}],hc,ProgressReporting->True]]//Timing

GroupBy[SymmetricHamiltonianCycleGraph[GraphData[{"Coprime",18}],#]&/@hcsym,GraphSymmetryGroup]

Circular construction 1*^5 [ s]

Length[hc=FindHamiltonianCycle[GraphData[{"Coprime",18}],1*^5][[All,All,1]]]//Timing

Length[hcsym=SymmetricHamiltonianCycles[GraphData[{"Coprime",18}],hc,ProgressReporting->True]]//Timing

GroupBy[SymmetricHamiltonianCycleGraph[GraphData[{"Coprime",18}],#]&/@hcsym,GraphSymmetryGroup]

Circular construction All

GraphData[{"Coprime",18},"Hamiltonian"]

GraphData[{"Coprime",18},"HamiltonianCycles"]

GraphData[{"Coprime",18},"HamiltonianCycleCount"]

GraphData[{"Coprime",18},"LCF"]

GraphData[{"Coprime",18},"LCFSignature"]

Length[hc=FindHamiltonianCycle[GraphData[{"Coprime",18}],All][[All,All,1]]]//Timing

Length[hcsym=SymmetricHamiltonianCycles[GraphData[{"Coprime",18}],hc,ProgressReporting->True]]//Timing

GroupBy[SymmetricHamiltonianCycleGraph[GraphData[{"Coprime",18}],#]&/@hcsym,GraphSymmetryGroup]

Planar

GraphData[{"Coprime",18},"Planar"]

GraphData[{"Coprime",18},"Graph","Planar"]//StyleGraphs

MinimalCrossingNumber crossings.uos.de

CrossingNumber[GraphData[{"Coprime",18}],Method->"WebCompute"]//AbsoluteTiming

DateString[]

Quit

MinimalCrossingNumber: "EmbeddingScheme" -> 1

(cn=CrossingNumber[GraphData[{"Coprime",18}],"EmbeddingScheme"->1,TimeConstraint->1])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",18}],"EmbeddingScheme"->1,TimeConstraint->10])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",18}],"EmbeddingScheme"->1,TimeConstraint->60])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",18}],"EmbeddingScheme"->1,TimeConstraint->3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",18}],"EmbeddingScheme"->1,TimeConstraint->5 3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",18}],"EmbeddingScheme"->1,TimeConstraint->86400])//AbsoluteTiming

MinimalCrossingNumber: "EmbeddingScheme" -> 2

(cn=CrossingNumber[GraphData[{"Coprime",18}],"EmbeddingScheme"->2,TimeConstraint->1])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",18}],"EmbeddingScheme"->2,TimeConstraint->10])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",18}],"EmbeddingScheme"->2,TimeConstraint->60])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",18}],"EmbeddingScheme"->2,TimeConstraint->3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",18}],"EmbeddingScheme"->2,TimeConstraint->5 3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",18}],"EmbeddingScheme"->2,TimeConstraint->86400])//AbsoluteTiming

MinimalCrossingNumber: "EmbeddingScheme" -> 3

(cn=CrossingNumber[GraphData[{"Coprime",18}],"EmbeddingScheme"->3,TimeConstraint->1])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",18}],"EmbeddingScheme"->3,TimeConstraint->10])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",18}],"EmbeddingScheme"->3,TimeConstraint->60])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",18}],"EmbeddingScheme"->3,TimeConstraint->3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",18}],"EmbeddingScheme"->3,TimeConstraint->5 3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",18}],"EmbeddingScheme"->3,TimeConstraint->86400])//AbsoluteTiming

MinimalCrossing

GraphData[{"Coprime",18},"CN"]

(gs=GraphData[{"Coprime",18},"Graph","MinimalCrossing"])//StyleGraphs

GraphCrossingCount/@gs

GraphCrossingDiagram/@gs

MinimalRectilinearCrossing

GraphData[{"Coprime",18},"RCN"]

GraphData[{"Coprime",18},"Graph","MinimalRectilinearCrossing"]//StyleGraphs

MinimalRectilinearCrossing construction order X [minimum RCN == ]

Length[gs=FindMinimalRectilinearCrossingGraph[GraphData[{"Coprime",18}],Automatic,All,"Size"->Automatic,Method->"SubgraphIsomorphism",Debug->True]]//Timing

MaxMemoryUsed[]/10^9. GB

Tally[RectilinearCrossingCount/@gs]//Timing

Tally[RectilinearLocalCrossingCount/@gs]//Timing

GraphSymmetryGroup/@gs//Tally

Select[gs,GraphSymmetryGroup[#]=!=TransformationGroup[{}]&]

Take[gs,UpTo[100]]

MinimalRectilinearCrossing construction order X [minimum RCN == ]

Length[gs=FindMinimalRectilinearCrossingGraph[GraphData[{"Coprime",18}],Automatic,All,"Size"->XXX,Method->"SubgraphIsomorphism",Debug->True]]//Timing

MaxMemoryUsed[]/10^9. GB

Tally[RectilinearCrossingCount/@gs]//Timing

Tally[RectilinearLocalCrossingCount/@gs]//Timing

GraphSymmetryGroup/@gs//Tally

Select[gs,GraphSymmetryGroup[#]=!=TransformationGroup[{}]&]

Take[gs,UpTo[100]]

MinimalCrossing construction Tutte

(cn=CrossingNumber[GraphData[{"Coprime",18}],TimeConstraint->1])//AbsoluteTiming

(g=MinimalCrossingGraph[GraphData[{"Coprime",18}],"CrossingNumber"->cn])//PolyhedralGraphQ//AbsoluteTiming

faces=ReverseSort@SymmetricallyDistinctFaces[g]

Tally[ReverseSort[Length/@faces]]

TutteGraphs=BilateralGraph[CenterGraph@IGLayoutTutte[g,"OuterFace"->#],"ReturnNonbilateralGraph"->True]&/@faces

TutteGraphsWithOuterCrossingPointCounts={
#,
Count[OuterFace[#],_?(GreaterThan[GraphData[{"Coprime",18},"V"]])]
}&/@TutteGraphs;

Cases[TutteGraphsWithOuterCrossingPointCounts,{g_,0}:>g]

Cases[TutteGraphsWithOuterCrossingPointCounts,{g_,1}:>g]

LocalCrossingNumberWithEmbeddings=
{1+Max[Length/@DeleteCases[
Drop[AdjacencyList[#],GraphData[{"Coprime",18},"V"]],
_Integer?(LessEqualThan[GraphData[{"Coprime",18},"V"]]),
{2}
]],#}&/@TutteGraphs

TutteGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[
#,
AdditionalData->Join[Table[True,GraphData[{"Coprime",18},"V"]],Table[False,cn]],
SameTest->Equal
]
}&/@TutteGraphs;

SymmetricEmbeddingsWithOrientations=DeleteCases[
TutteGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]

Select[SymmetricEmbeddingsWithOrientations[[All,1]],Count[OuterFace[#],_?(GreaterThan[GraphData[{"Coprime",18},"V"]])]==0&]

MinimalCrossing construction Random 1k [XXX s]

(cn=CrossingNumber[GraphData[{"Coprime",18}],TimeConstraint->1])//AbsoluteTiming

Length[diagrams=DistinctMinimalCrossingDiagramData[
GraphData[{"Coprime",18}],
1000,
"CrossingNumber"->cn,
EdgeShapeFunction->"BezierEdge"
]]//AbsoluteTiming

No crossing points on the boundary:

Length[diagrams0=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==0&],"Graph",{}]]//Timing

Take[diagrams0,UpTo[10]]

One crossing point on the boundary:

Length[diagrams1=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==1&],"Graph",{}]]//Timing

Take[diagrams1,UpTo[10]]

graphs=#["Graph"]&/@diagrams;

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[#]
}&/@graphs;//AbsoluteTiming

MaxMemoryUsed[]/10^9.GB

Symmetric embeddings:

Length[SymmetricMinimalEmbeddingData=DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]
]//AbsoluteTiming

SymmetricMinimalEmbeddingData

SymmetricMinimalEmbeddingGraphs=SymmetricMinimalEmbeddingData[[All,1]]

GraphCrossingCount/@SymmetricMinimalEmbeddingGraphs

GraphCrossingDiagram/@SymmetricMinimalEmbeddingGraphs

MinimalCrossing construction Random 5k [XXX s]

(cn=CrossingNumber[GraphData[{"Coprime",18}],TimeConstraint->1])//AbsoluteTiming

Length[diagrams=DistinctMinimalCrossingDiagramData[
GraphData[{"Coprime",18}],
5000,
"CrossingNumber"->cn,
EdgeShapeFunction->"BezierEdge"
]]//AbsoluteTiming

No crossing points on the boundary:

Length[diagrams0=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==0&],"Graph",{}]]//Timing

Take[diagrams0,UpTo[10]]

One crossing point on the boundary:

Length[diagrams1=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==1&],"Graph",{}]]//Timing

Take[diagrams1,UpTo[10]]

graphs=#["Graph"]&/@diagrams;

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[#]
}&/@graphs;//AbsoluteTiming

MaxMemoryUsed[]/10^9.GB

Symmetric embeddings:

Length[SymmetricMinimalEmbeddingData=DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]
]//AbsoluteTiming

SymmetricMinimalEmbeddingData

SymmetricMinimalEmbeddingGraphs=SymmetricMinimalEmbeddingData[[All,1]]

GraphCrossingCount/@SymmetricMinimalEmbeddingGraphs

GraphCrossingDiagram/@SymmetricMinimalEmbeddingGraphs

MinimalCrossing construction Random 20k [XXX s]

(cn=CrossingNumber[GraphData[{"Coprime",18}],TimeConstraint->1])//AbsoluteTiming

Length[diagrams=DistinctMinimalCrossingDiagramData[
GraphData[{"Coprime",18}],
20*^3,
"CrossingNumber"->cn,
EdgeShapeFunction->"BezierEdge"
]]//AbsoluteTiming

No crossing points on the boundary:

Length[diagrams0=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==0&],"Graph",{}]]//Timing

Take[diagrams0,UpTo[10]]

One crossing point on the boundary:

Length[diagrams1=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==1&],"Graph",{}]]//Timing

Take[diagrams1,UpTo[10]]

graphs=#["Graph"]&/@diagrams;

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[#]
}&/@graphs;//AbsoluteTiming

MaxMemoryUsed[]/10^9.GB

Symmetric embeddings:

Length[SymmetricMinimalEmbeddingData=DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]
]//AbsoluteTiming

SymmetricMinimalEmbeddingData

SymmetricMinimalEmbeddingGraphs=SymmetricMinimalEmbeddingData[[All,1]]

GraphCrossingCount/@SymmetricMinimalEmbeddingGraphs

GraphCrossingDiagram/@SymmetricMinimalEmbeddingGraphs

MinimalCrossing construction Random 1k [old]

(cn=CrossingNumber[GraphData[{"Coprime",18}],TimeConstraint->1])//AbsoluteTiming

(RandomGraphs=Table[MinimalCrossingGraph[GraphData[{"Coprime",18}],"CrossingNumber"->cn,RandomSeed->n],{n,1000}]//Union);//Timing

RandomGraphsWithOuterCrossingPointCounts={
#,
Count[OuterFace[#],_?(GreaterThan[GraphData[{"Coprime",18},"V"]])]
}&/@RandomGraphs;

Small numbers of crossing points on the boundary:

Cases[RandomGraphsWithOuterCrossingPointCounts,{g_,0}:>g]

Cases[RandomGraphsWithOuterCrossingPointCounts,{g_,1}:>g]

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[
#,
AdditionalData->Join[Table[True,GraphData[{"Coprime",18},"V"]],Table[False,cn]],
SameTest->Equal
]
}&/@RandomGraphs;

MaxMemoryUsed[]/10^9.GB

DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]/.g_Graph:>BilateralGraph[CenterGraph@g,"ReturnNonbilateralGraph"->True]

MinimalCrossing construction Random 20k [old]

(cn=CrossingNumber[GraphData[{"Coprime",18}],TimeConstraint->1])//AbsoluteTiming

(RandomGraphs=Table[MinimalCrossingGraph[GraphData[{"Coprime",18}],"CrossingNumber"->cn,RandomSeed->n],{n,20000}]//Union);//Timing

RandomGraphsWithOuterCrossingPointCounts={
#,
Count[OuterFace[#],_?(GreaterThan[GraphData[{"Coprime",18},"V"]])]
}&/@RandomGraphs;

Small numbers of crossing points on the boundary:

Cases[RandomGraphsWithOuterCrossingPointCounts,{g_,0}:>g]

Cases[RandomGraphsWithOuterCrossingPointCounts,{g_,1}:>g]

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[
#,
AdditionalData->Join[Table[True,GraphData[{"Coprime",18},"V"]],Table[False,cn]],
SameTest->Equal
]
}&/@RandomGraphs;

MaxMemoryUsed[]/10^9.GB

DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]/.g_Graph:>BilateralGraph[CenterGraph@g,"ReturnNonbilateralGraph"->True]

MinimalLocalCrossing

GraphData[{"Coprime",18},{"LocalCrossingNumber","RectilinearLocalCrossingNumber"}]

GraphData[{"Coprime",18},"Graph","MinimalLocalCrossing"]//StyleGraphs

MinimalRectilinearLocalCrossing

GraphData[{"Coprime",18},{"LocalCrossingNumber","RectilinearLocalCrossingNumber"}]

GraphData[{"Coprime",18},"Graph","MinimalRectilinearLocalCrossing"]//StyleGraphs

MinimaRectilinearlLocalCrossing construction 1000

AdjacentCrossingsQ[g_Graph,cn_Integer]:=Module[{a=AdjacencyList[g],n=VertexCount[g]-cn},Max[Take[a,-cn]]>n]

(cn=CrossingNumber[GraphData[{"Coprime",18}],TimeConstraint->10])//AbsoluteTiming

(gs=Select[Table[MinimalCrossingGraph[GraphData[{"Coprime",18}],"CrossingNumber"->cn,RandomSeed->i],{i,1000}],!AdjacentCrossingsQ[#,cn]&]//Union)//Timing

MinimaRectilinearlLocalCrossing construction 20000

AdjacentCrossingsQ[g_Graph,cn_Integer]:=Module[{a=AdjacencyList[g],n=VertexCount[g]-cn},Max[Take[a,-cn]]>n]

(cn=CrossingNumber[GraphData[{"Coprime",18}],TimeConstraint->10])//AbsoluteTiming

(gs=Select[Table[MinimalCrossingGraph[GraphData[{"Coprime",18}],"CrossingNumber"->cn,RandomSeed->i],{i,20000}],!AdjacentCrossingsQ[#,cn]&]//Union)//Timing

Circulant

GraphData[{"Coprime",18},"Circulant"]

GraphData[{"Coprime",18},"Graph","Circulant"]//StyleGraphs

Circulant construction

GraphData[{"Coprime",18},"NotationRules","Circulant"]

(ci=CirculantIndices[GraphData[{"Coprime",18}]])//AbsoluteTiming

CirculantGraph1@@@ci

Cases[GraphData[{"Coprime",18},"StandardNames"],{"Circulant",i_}:>i]

CirculantGraph1@@@%

Complement graph

compl=GraphData[{"Coprime",18},"ComplementGraph","Name"]

Line graph

GraphData[{"Coprime",18},"Line"]

LineGraphQ[GraphData[{"Coprime",18}]]//Timing

RootGraph

roots=Select[GraphData[All],GraphData[#,"LineGraph","Name"]==={"Coprime",18}&]

RootGraph[GraphData[{"Coprime",18}]]

Halin

GraphData[{"Coprime",18},"Halin"]

GraphData[{"Coprime",18},"Graph","Halin"]//StyleGraphs

Rigid

GraphData[{"Coprime",18},"Rigid"]

GraphData[{"Coprime",18},"Graph","Rigid"]//StyleGraphs

Flexible

GraphData[{"Coprime",18},"Flexible"]

GraphData[{"Coprime",18},"Graph","Flexible"]//StyleGraphs

Voltage

GraphData[{"Coprime",18},"Graph","Voltage"]//StyleGraphs

Voltage construction

gs=VoltageGraph[GraphData[{"Coprime",18}],"MaxResults"->20,Debug->True]

Length[gs]

RecognizeGraph/@gs

VoltageGraphNotation/@gs//Column

EmbeddingClasses/@gs//Column

GraphSymmetryGroup/@gs//Column

LCF

GraphData[{"Coprime",18},"LCF"]

GraphData[{"Coprime",18},"HamiltonianCycleCount"]

GraphData[{"Coprime",18},"LCFSignature"]

GraphData[{"Coprime",18},"LCFNotations"]

GraphData[{"Coprime",18},"Graph","LCF"]//StyleGraphs

Tally[LCFNotation[#][[2]]&/@%]

UnitDistance

GraphData[{"Coprime",18},"UnitDistance"]

UnitDistanceGraphQ[GraphData[{"Coprime",18}],Debug->True]//Timing

GraphData[{"Coprime",18},"Graph","UnitDistance"]//StyleGraphs

UnitDistance by refinement of default embeddings

Graph[edge list]

(g=UnitDistanceEmbeddingRefine[Graph[GraphData[{"Coprime",18},"EdgeList"]],MaxIterations->500])//Timing

UnitDistanceGraphEmbeddingQ[g]

Graph[vertex list, edge list]

(g=UnitDistanceEmbeddingRefine[Graph[GraphData[{"Coprime",18},"VertexList"],GraphData[{"Coprime",18},"EdgeList"]],MaxIterations->500])//Timing

UnitDistanceGraphEmbeddingQ[g]

UnitDistance by refinement of existing embeddings

gs=UnitDistanceEmbeddingRefine[Graph[VertexList[#],EdgeList[#],VertexCoordinates->GraphEmbedding[#]],MaxIterations->500]&/@Complement@@(GraphData[{"Coprime",18},"Graph",#]&/@{"All","UnitDistance"})

TextGrid[
gdata=SortBy[
{#,DegenerateGraphEmbeddingQ[#],GraphSymmetryGroup[#],Max[Abs[EdgeLengths[#]-1]]}&/@gs,
Last
],
Dividers->All
]

Cases[gdata,{__,0.}]

Symmetric:

gs=Cases[
gdata,
{g_,_,sym:Except[TransformationGroup[{}]],diff_}:>{
HighlightGraph[g1=BilateralGraph[CenterGraph[g],"ReturnNonbilateralGraph"->True],Flatten[FindCoincidentVertices[g1]]],
sym,
diff
}]

UnitDistance by FindUnitDistanceEmbedding  (random embeddings returning on messages)

gs=FindUnitDistanceEmbedding[GraphData[{"Coprime",18}],50,"ReturnWithMessage"->True];//Quiet//Timing

gdata=SortBy[
{#,Max[Abs[EdgeLengths[#]-1]]}&/@gs,
Last
]

Cases[gdata,{g_?UnitDistanceGraphEmbeddingQ,_}:>g]

SymmetricEmebddings=Select[gdata,GraphSymmetryGroup[#[[1]]]=!=TransformationGroup[{}]&]

UnitDistance by FindUnitDistanceEmbedding  (random embedding waiting until UD is found)

FindUnitDistanceEmbedding[GraphData[{"Coprime",18}],"ReturnWithMessage"->False]//Quiet//Timing

Matchstick

GraphData[{"Coprime",18},"Matchstick"]

GraphData[{"Coprime",18},"Graph","Matchstick"]//StyleGraphs

3D default

Graph3D[GraphData[{"Coprime",18},"Edges"]]

3D construction

3D All

GraphData[{"Coprime",18},"Graph",{"3D","All"}]

3D UnitDistance construction Random

GraphData[{"Coprime",18},"Dimension"]

(g=UnitDistanceEmbeddingRefine[
Graph3D[
GraphData[{"Coprime",18},"VertexList"],
GraphData[{"Coprime",18},"EdgeList"]
],
WorkingPrecision->25])//Timing

EdgeLengths[g]

UnitDistanceGraphEmbeddingQ[g]

3D UnitDistance

GraphData[{"Coprime",18},"Graph",{"3D","UnitDistance"}]

3D Polyhedron

GraphData[{"Coprime",18},"Polyhedral"]

GraphData[{"Coprime",18},"Graph",{"3D","Polyhedron"}]

{"Coprime", 19}

Names

GraphData[{"Coprime",19},"StandardName"]

GraphData[{"Coprime",19},"StandardNames"]

HouseOfGraphs

hogid=GraphData[{"Coprime",19},"NotationRules","HouseOfGraphs"]

HouseOfGraphsLookup[hogid]

HouseOfGraphsGraph[hogid]//StyleGraphs[#,ImageSize->Small]&

Wikidata

GraphData[{"Coprime",19},"WikidataID"]

GraphData[{"Coprime",19},"WikidataID","URL"]

Primary

GraphData[{"Coprime",19}]//StyleGraphs[#,ImageSize->Small]&

All

GraphData[{"Coprime",19},"Graph","All"]//StyleGraphs

CurvedEdge

GraphData[{"Coprime",19},"Graph","CurvedEdge"]//StyleGraphs

Inexact

Select[GraphData[{"Coprime",19},"Graph","All"],(!FreeQ[GraphEmbedding[#],_?InexactNumberQ]&)]//StyleGraphs

Degenerate

GraphData[{"Coprime",19},"Graph","Degenerate"]//StyleGraphs

DegenerateGraphEmbeddingTypes/@GraphData[{"Coprime",19},"Graph","Degenerate"]//Column

Embeddings

GraphDataEmbeddings[GraphData[{"Coprime",19}]]

Default embedding

g0=GraphPlot[Graph[GraphData[{"Coprime",19},"VertexList"],GraphData[{"Coprime",19},"Edges"]]]

Configuration

GraphData[{"Coprime",19},"Configuration"]

configurations=GraphData[{"Coprime",19},"Graph","Configuration"]//StyleGraphs

GeneralizedPetersen

GraphData[{"Coprime",19},"Graph","GeneralizedPetersen"]//StyleGraphs

IGraph

GraphData[{"Coprime",19},"Graph","IGraph"]//StyleGraphs

CompleteKPartite

GraphData[{"Coprime",19},"Graph","CompleteKPartite"]//StyleGraphs

Bipartite

GraphData[{"Coprime",19},"Bipartite"]

GraphData[{"Coprime",19},"Graph","Bipartite"]//StyleGraphs

Bilateral

GraphData[{"Coprime",19},"Graph","Bilateral"]//StyleGraphs

Grid[DeleteCases[Monitor[{g=#,BilateralGraphEmbeddingTypes[#],GraphSymmetryGroup[#]}&/@GraphData[{"Coprime",19},"Graph","All"],g],{_,_,TransformationGroup[{}]}],Dividers->All,Alignment->{{Center,{Left}}}]//Quiet

Circular

GraphData[{"Coprime",19},"Graph","Circular"]//StyleGraphs

Circular construction 1*^4 [ s]

Length[hc=FindHamiltonianCycle[GraphData[{"Coprime",19}],1*^4][[All,All,1]]]//Timing

gs=CircularEmbeddingFromHamiltonianCycle[GraphData[{"Coprime",19}],#]&/@Take[hc,1]

Length[hcsym=SymmetricHamiltonianCycles[GraphData[{"Coprime",19}],hc,ProgressReporting->True]]//Timing

GroupBy[SymmetricHamiltonianCycleGraph[GraphData[{"Coprime",19}],#]&/@hcsym,GraphSymmetryGroup]

Circular construction 1*^5 [ s]

Length[hc=FindHamiltonianCycle[GraphData[{"Coprime",19}],1*^5][[All,All,1]]]//Timing

Length[hcsym=SymmetricHamiltonianCycles[GraphData[{"Coprime",19}],hc,ProgressReporting->True]]//Timing

GroupBy[SymmetricHamiltonianCycleGraph[GraphData[{"Coprime",19}],#]&/@hcsym,GraphSymmetryGroup]

Circular construction All

GraphData[{"Coprime",19},"Hamiltonian"]

GraphData[{"Coprime",19},"HamiltonianCycles"]

GraphData[{"Coprime",19},"HamiltonianCycleCount"]

GraphData[{"Coprime",19},"LCF"]

GraphData[{"Coprime",19},"LCFSignature"]

Length[hc=FindHamiltonianCycle[GraphData[{"Coprime",19}],All][[All,All,1]]]//Timing

Length[hcsym=SymmetricHamiltonianCycles[GraphData[{"Coprime",19}],hc,ProgressReporting->True]]//Timing

GroupBy[SymmetricHamiltonianCycleGraph[GraphData[{"Coprime",19}],#]&/@hcsym,GraphSymmetryGroup]

Planar

GraphData[{"Coprime",19},"Planar"]

GraphData[{"Coprime",19},"Graph","Planar"]//StyleGraphs

MinimalCrossingNumber crossings.uos.de

CrossingNumber[GraphData[{"Coprime",19}],Method->"WebCompute"]//AbsoluteTiming

DateString[]

Quit

MinimalCrossingNumber: "EmbeddingScheme" -> 1

(cn=CrossingNumber[GraphData[{"Coprime",19}],"EmbeddingScheme"->1,TimeConstraint->1])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",19}],"EmbeddingScheme"->1,TimeConstraint->10])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",19}],"EmbeddingScheme"->1,TimeConstraint->60])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",19}],"EmbeddingScheme"->1,TimeConstraint->3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",19}],"EmbeddingScheme"->1,TimeConstraint->5 3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",19}],"EmbeddingScheme"->1,TimeConstraint->86400])//AbsoluteTiming

MinimalCrossingNumber: "EmbeddingScheme" -> 2

(cn=CrossingNumber[GraphData[{"Coprime",19}],"EmbeddingScheme"->2,TimeConstraint->1])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",19}],"EmbeddingScheme"->2,TimeConstraint->10])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",19}],"EmbeddingScheme"->2,TimeConstraint->60])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",19}],"EmbeddingScheme"->2,TimeConstraint->3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",19}],"EmbeddingScheme"->2,TimeConstraint->5 3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",19}],"EmbeddingScheme"->2,TimeConstraint->86400])//AbsoluteTiming

MinimalCrossingNumber: "EmbeddingScheme" -> 3

(cn=CrossingNumber[GraphData[{"Coprime",19}],"EmbeddingScheme"->3,TimeConstraint->1])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",19}],"EmbeddingScheme"->3,TimeConstraint->10])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",19}],"EmbeddingScheme"->3,TimeConstraint->60])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",19}],"EmbeddingScheme"->3,TimeConstraint->3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",19}],"EmbeddingScheme"->3,TimeConstraint->5 3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",19}],"EmbeddingScheme"->3,TimeConstraint->86400])//AbsoluteTiming

MinimalCrossing

GraphData[{"Coprime",19},"CN"]

(gs=GraphData[{"Coprime",19},"Graph","MinimalCrossing"])//StyleGraphs

GraphCrossingCount/@gs

GraphCrossingDiagram/@gs

MinimalRectilinearCrossing

GraphData[{"Coprime",19},"RCN"]

GraphData[{"Coprime",19},"Graph","MinimalRectilinearCrossing"]//StyleGraphs

MinimalRectilinearCrossing construction order X [minimum RCN == ]

Length[gs=FindMinimalRectilinearCrossingGraph[GraphData[{"Coprime",19}],Automatic,All,"Size"->Automatic,Method->"SubgraphIsomorphism",Debug->True]]//Timing

MaxMemoryUsed[]/10^9. GB

Tally[RectilinearCrossingCount/@gs]//Timing

Tally[RectilinearLocalCrossingCount/@gs]//Timing

GraphSymmetryGroup/@gs//Tally

Select[gs,GraphSymmetryGroup[#]=!=TransformationGroup[{}]&]

Take[gs,UpTo[100]]

MinimalRectilinearCrossing construction order X [minimum RCN == ]

Length[gs=FindMinimalRectilinearCrossingGraph[GraphData[{"Coprime",19}],Automatic,All,"Size"->XXX,Method->"SubgraphIsomorphism",Debug->True]]//Timing

MaxMemoryUsed[]/10^9. GB

Tally[RectilinearCrossingCount/@gs]//Timing

Tally[RectilinearLocalCrossingCount/@gs]//Timing

GraphSymmetryGroup/@gs//Tally

Select[gs,GraphSymmetryGroup[#]=!=TransformationGroup[{}]&]

Take[gs,UpTo[100]]

MinimalCrossing construction Tutte

(cn=CrossingNumber[GraphData[{"Coprime",19}],TimeConstraint->1])//AbsoluteTiming

(g=MinimalCrossingGraph[GraphData[{"Coprime",19}],"CrossingNumber"->cn])//PolyhedralGraphQ//AbsoluteTiming

faces=ReverseSort@SymmetricallyDistinctFaces[g]

Tally[ReverseSort[Length/@faces]]

TutteGraphs=BilateralGraph[CenterGraph@IGLayoutTutte[g,"OuterFace"->#],"ReturnNonbilateralGraph"->True]&/@faces

TutteGraphsWithOuterCrossingPointCounts={
#,
Count[OuterFace[#],_?(GreaterThan[GraphData[{"Coprime",19},"V"]])]
}&/@TutteGraphs;

Cases[TutteGraphsWithOuterCrossingPointCounts,{g_,0}:>g]

Cases[TutteGraphsWithOuterCrossingPointCounts,{g_,1}:>g]

LocalCrossingNumberWithEmbeddings=
{1+Max[Length/@DeleteCases[
Drop[AdjacencyList[#],GraphData[{"Coprime",19},"V"]],
_Integer?(LessEqualThan[GraphData[{"Coprime",19},"V"]]),
{2}
]],#}&/@TutteGraphs

TutteGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[
#,
AdditionalData->Join[Table[True,GraphData[{"Coprime",19},"V"]],Table[False,cn]],
SameTest->Equal
]
}&/@TutteGraphs;

SymmetricEmbeddingsWithOrientations=DeleteCases[
TutteGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]

Select[SymmetricEmbeddingsWithOrientations[[All,1]],Count[OuterFace[#],_?(GreaterThan[GraphData[{"Coprime",19},"V"]])]==0&]

MinimalCrossing construction Random 1k [XXX s]

(cn=CrossingNumber[GraphData[{"Coprime",19}],TimeConstraint->1])//AbsoluteTiming

Length[diagrams=DistinctMinimalCrossingDiagramData[
GraphData[{"Coprime",19}],
1000,
"CrossingNumber"->cn,
EdgeShapeFunction->"BezierEdge"
]]//AbsoluteTiming

No crossing points on the boundary:

Length[diagrams0=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==0&],"Graph",{}]]//Timing

Take[diagrams0,UpTo[10]]

One crossing point on the boundary:

Length[diagrams1=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==1&],"Graph",{}]]//Timing

Take[diagrams1,UpTo[10]]

graphs=#["Graph"]&/@diagrams;

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[#]
}&/@graphs;//AbsoluteTiming

MaxMemoryUsed[]/10^9.GB

Symmetric embeddings:

Length[SymmetricMinimalEmbeddingData=DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]
]//AbsoluteTiming

SymmetricMinimalEmbeddingData

SymmetricMinimalEmbeddingGraphs=SymmetricMinimalEmbeddingData[[All,1]]

GraphCrossingCount/@SymmetricMinimalEmbeddingGraphs

GraphCrossingDiagram/@SymmetricMinimalEmbeddingGraphs

MinimalCrossing construction Random 5k [XXX s]

(cn=CrossingNumber[GraphData[{"Coprime",19}],TimeConstraint->1])//AbsoluteTiming

Length[diagrams=DistinctMinimalCrossingDiagramData[
GraphData[{"Coprime",19}],
5000,
"CrossingNumber"->cn,
EdgeShapeFunction->"BezierEdge"
]]//AbsoluteTiming

No crossing points on the boundary:

Length[diagrams0=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==0&],"Graph",{}]]//Timing

Take[diagrams0,UpTo[10]]

One crossing point on the boundary:

Length[diagrams1=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==1&],"Graph",{}]]//Timing

Take[diagrams1,UpTo[10]]

graphs=#["Graph"]&/@diagrams;

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[#]
}&/@graphs;//AbsoluteTiming

MaxMemoryUsed[]/10^9.GB

Symmetric embeddings:

Length[SymmetricMinimalEmbeddingData=DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]
]//AbsoluteTiming

SymmetricMinimalEmbeddingData

SymmetricMinimalEmbeddingGraphs=SymmetricMinimalEmbeddingData[[All,1]]

GraphCrossingCount/@SymmetricMinimalEmbeddingGraphs

GraphCrossingDiagram/@SymmetricMinimalEmbeddingGraphs

MinimalCrossing construction Random 20k [XXX s]

(cn=CrossingNumber[GraphData[{"Coprime",19}],TimeConstraint->1])//AbsoluteTiming

Length[diagrams=DistinctMinimalCrossingDiagramData[
GraphData[{"Coprime",19}],
20*^3,
"CrossingNumber"->cn,
EdgeShapeFunction->"BezierEdge"
]]//AbsoluteTiming

No crossing points on the boundary:

Length[diagrams0=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==0&],"Graph",{}]]//Timing

Take[diagrams0,UpTo[10]]

One crossing point on the boundary:

Length[diagrams1=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==1&],"Graph",{}]]//Timing

Take[diagrams1,UpTo[10]]

graphs=#["Graph"]&/@diagrams;

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[#]
}&/@graphs;//AbsoluteTiming

MaxMemoryUsed[]/10^9.GB

Symmetric embeddings:

Length[SymmetricMinimalEmbeddingData=DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]
]//AbsoluteTiming

SymmetricMinimalEmbeddingData

SymmetricMinimalEmbeddingGraphs=SymmetricMinimalEmbeddingData[[All,1]]

GraphCrossingCount/@SymmetricMinimalEmbeddingGraphs

GraphCrossingDiagram/@SymmetricMinimalEmbeddingGraphs

MinimalCrossing construction Random 1k [old]

(cn=CrossingNumber[GraphData[{"Coprime",19}],TimeConstraint->1])//AbsoluteTiming

(RandomGraphs=Table[MinimalCrossingGraph[GraphData[{"Coprime",19}],"CrossingNumber"->cn,RandomSeed->n],{n,1000}]//Union);//Timing

RandomGraphsWithOuterCrossingPointCounts={
#,
Count[OuterFace[#],_?(GreaterThan[GraphData[{"Coprime",19},"V"]])]
}&/@RandomGraphs;

Small numbers of crossing points on the boundary:

Cases[RandomGraphsWithOuterCrossingPointCounts,{g_,0}:>g]

Cases[RandomGraphsWithOuterCrossingPointCounts,{g_,1}:>g]

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[
#,
AdditionalData->Join[Table[True,GraphData[{"Coprime",19},"V"]],Table[False,cn]],
SameTest->Equal
]
}&/@RandomGraphs;

MaxMemoryUsed[]/10^9.GB

DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]/.g_Graph:>BilateralGraph[CenterGraph@g,"ReturnNonbilateralGraph"->True]

MinimalCrossing construction Random 20k [old]

(cn=CrossingNumber[GraphData[{"Coprime",19}],TimeConstraint->1])//AbsoluteTiming

(RandomGraphs=Table[MinimalCrossingGraph[GraphData[{"Coprime",19}],"CrossingNumber"->cn,RandomSeed->n],{n,20000}]//Union);//Timing

RandomGraphsWithOuterCrossingPointCounts={
#,
Count[OuterFace[#],_?(GreaterThan[GraphData[{"Coprime",19},"V"]])]
}&/@RandomGraphs;

Small numbers of crossing points on the boundary:

Cases[RandomGraphsWithOuterCrossingPointCounts,{g_,0}:>g]

Cases[RandomGraphsWithOuterCrossingPointCounts,{g_,1}:>g]

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[
#,
AdditionalData->Join[Table[True,GraphData[{"Coprime",19},"V"]],Table[False,cn]],
SameTest->Equal
]
}&/@RandomGraphs;

MaxMemoryUsed[]/10^9.GB

DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]/.g_Graph:>BilateralGraph[CenterGraph@g,"ReturnNonbilateralGraph"->True]

MinimalLocalCrossing

GraphData[{"Coprime",19},{"LocalCrossingNumber","RectilinearLocalCrossingNumber"}]

GraphData[{"Coprime",19},"Graph","MinimalLocalCrossing"]//StyleGraphs

MinimalRectilinearLocalCrossing

GraphData[{"Coprime",19},{"LocalCrossingNumber","RectilinearLocalCrossingNumber"}]

GraphData[{"Coprime",19},"Graph","MinimalRectilinearLocalCrossing"]//StyleGraphs

MinimaRectilinearlLocalCrossing construction 1000

AdjacentCrossingsQ[g_Graph,cn_Integer]:=Module[{a=AdjacencyList[g],n=VertexCount[g]-cn},Max[Take[a,-cn]]>n]

(cn=CrossingNumber[GraphData[{"Coprime",19}],TimeConstraint->10])//AbsoluteTiming

(gs=Select[Table[MinimalCrossingGraph[GraphData[{"Coprime",19}],"CrossingNumber"->cn,RandomSeed->i],{i,1000}],!AdjacentCrossingsQ[#,cn]&]//Union)//Timing

MinimaRectilinearlLocalCrossing construction 20000

AdjacentCrossingsQ[g_Graph,cn_Integer]:=Module[{a=AdjacencyList[g],n=VertexCount[g]-cn},Max[Take[a,-cn]]>n]

(cn=CrossingNumber[GraphData[{"Coprime",19}],TimeConstraint->10])//AbsoluteTiming

(gs=Select[Table[MinimalCrossingGraph[GraphData[{"Coprime",19}],"CrossingNumber"->cn,RandomSeed->i],{i,20000}],!AdjacentCrossingsQ[#,cn]&]//Union)//Timing

Circulant

GraphData[{"Coprime",19},"Circulant"]

GraphData[{"Coprime",19},"Graph","Circulant"]//StyleGraphs

Circulant construction

GraphData[{"Coprime",19},"NotationRules","Circulant"]

(ci=CirculantIndices[GraphData[{"Coprime",19}]])//AbsoluteTiming

CirculantGraph1@@@ci

Cases[GraphData[{"Coprime",19},"StandardNames"],{"Circulant",i_}:>i]

CirculantGraph1@@@%

Complement graph

compl=GraphData[{"Coprime",19},"ComplementGraph","Name"]

Line graph

GraphData[{"Coprime",19},"Line"]

LineGraphQ[GraphData[{"Coprime",19}]]//Timing

RootGraph

roots=Select[GraphData[All],GraphData[#,"LineGraph","Name"]==={"Coprime",19}&]

RootGraph[GraphData[{"Coprime",19}]]

Halin

GraphData[{"Coprime",19},"Halin"]

GraphData[{"Coprime",19},"Graph","Halin"]//StyleGraphs

Rigid

GraphData[{"Coprime",19},"Rigid"]

GraphData[{"Coprime",19},"Graph","Rigid"]//StyleGraphs

Flexible

GraphData[{"Coprime",19},"Flexible"]

GraphData[{"Coprime",19},"Graph","Flexible"]//StyleGraphs

Voltage

GraphData[{"Coprime",19},"Graph","Voltage"]//StyleGraphs

Voltage construction

gs=VoltageGraph[GraphData[{"Coprime",19}],"MaxResults"->20,Debug->True]

Length[gs]

RecognizeGraph/@gs

VoltageGraphNotation/@gs//Column

EmbeddingClasses/@gs//Column

GraphSymmetryGroup/@gs//Column

LCF

GraphData[{"Coprime",19},"LCF"]

GraphData[{"Coprime",19},"HamiltonianCycleCount"]

GraphData[{"Coprime",19},"LCFSignature"]

GraphData[{"Coprime",19},"LCFNotations"]

GraphData[{"Coprime",19},"Graph","LCF"]//StyleGraphs

Tally[LCFNotation[#][[2]]&/@%]

UnitDistance

GraphData[{"Coprime",19},"UnitDistance"]

UnitDistanceGraphQ[GraphData[{"Coprime",19}],Debug->True]//Timing

GraphData[{"Coprime",19},"Graph","UnitDistance"]//StyleGraphs

UnitDistance by refinement of default embeddings

Graph[edge list]

(g=UnitDistanceEmbeddingRefine[Graph[GraphData[{"Coprime",19},"EdgeList"]],MaxIterations->500])//Timing

UnitDistanceGraphEmbeddingQ[g]

Graph[vertex list, edge list]

(g=UnitDistanceEmbeddingRefine[Graph[GraphData[{"Coprime",19},"VertexList"],GraphData[{"Coprime",19},"EdgeList"]],MaxIterations->500])//Timing

UnitDistanceGraphEmbeddingQ[g]

UnitDistance by refinement of existing embeddings

gs=UnitDistanceEmbeddingRefine[Graph[VertexList[#],EdgeList[#],VertexCoordinates->GraphEmbedding[#]],MaxIterations->500]&/@Complement@@(GraphData[{"Coprime",19},"Graph",#]&/@{"All","UnitDistance"})

TextGrid[
gdata=SortBy[
{#,DegenerateGraphEmbeddingQ[#],GraphSymmetryGroup[#],Max[Abs[EdgeLengths[#]-1]]}&/@gs,
Last
],
Dividers->All
]

Cases[gdata,{__,0.}]

Symmetric:

gs=Cases[
gdata,
{g_,_,sym:Except[TransformationGroup[{}]],diff_}:>{
HighlightGraph[g1=BilateralGraph[CenterGraph[g],"ReturnNonbilateralGraph"->True],Flatten[FindCoincidentVertices[g1]]],
sym,
diff
}]

UnitDistance by FindUnitDistanceEmbedding  (random embeddings returning on messages)

gs=FindUnitDistanceEmbedding[GraphData[{"Coprime",19}],50,"ReturnWithMessage"->True];//Quiet//Timing

gdata=SortBy[
{#,Max[Abs[EdgeLengths[#]-1]]}&/@gs,
Last
]

Cases[gdata,{g_?UnitDistanceGraphEmbeddingQ,_}:>g]

SymmetricEmebddings=Select[gdata,GraphSymmetryGroup[#[[1]]]=!=TransformationGroup[{}]&]

UnitDistance by FindUnitDistanceEmbedding  (random embedding waiting until UD is found)

FindUnitDistanceEmbedding[GraphData[{"Coprime",19}],"ReturnWithMessage"->False]//Quiet//Timing

Matchstick

GraphData[{"Coprime",19},"Matchstick"]

GraphData[{"Coprime",19},"Graph","Matchstick"]//StyleGraphs

3D default

Graph3D[GraphData[{"Coprime",19},"Edges"]]

3D construction

3D All

GraphData[{"Coprime",19},"Graph",{"3D","All"}]

3D UnitDistance construction Random

GraphData[{"Coprime",19},"Dimension"]

(g=UnitDistanceEmbeddingRefine[
Graph3D[
GraphData[{"Coprime",19},"VertexList"],
GraphData[{"Coprime",19},"EdgeList"]
],
WorkingPrecision->25])//Timing

EdgeLengths[g]

UnitDistanceGraphEmbeddingQ[g]

3D UnitDistance

GraphData[{"Coprime",19},"Graph",{"3D","UnitDistance"}]

3D Polyhedron

GraphData[{"Coprime",19},"Polyhedral"]

GraphData[{"Coprime",19},"Graph",{"3D","Polyhedron"}]

{"Coprime", 20}

Names

GraphData[{"Coprime",20},"StandardName"]

GraphData[{"Coprime",20},"StandardNames"]

HouseOfGraphs

hogid=GraphData[{"Coprime",20},"NotationRules","HouseOfGraphs"]

HouseOfGraphsLookup[hogid]

HouseOfGraphsGraph[hogid]//StyleGraphs[#,ImageSize->Small]&

Wikidata

GraphData[{"Coprime",20},"WikidataID"]

GraphData[{"Coprime",20},"WikidataID","URL"]

Primary

GraphData[{"Coprime",20}]//StyleGraphs[#,ImageSize->Small]&

All

GraphData[{"Coprime",20},"Graph","All"]//StyleGraphs

CurvedEdge

GraphData[{"Coprime",20},"Graph","CurvedEdge"]//StyleGraphs

Inexact

Select[GraphData[{"Coprime",20},"Graph","All"],(!FreeQ[GraphEmbedding[#],_?InexactNumberQ]&)]//StyleGraphs

Degenerate

GraphData[{"Coprime",20},"Graph","Degenerate"]//StyleGraphs

DegenerateGraphEmbeddingTypes/@GraphData[{"Coprime",20},"Graph","Degenerate"]//Column

Embeddings

GraphDataEmbeddings[GraphData[{"Coprime",20}]]

Default embedding

g0=GraphPlot[Graph[GraphData[{"Coprime",20},"VertexList"],GraphData[{"Coprime",20},"Edges"]]]

Configuration

GraphData[{"Coprime",20},"Configuration"]

configurations=GraphData[{"Coprime",20},"Graph","Configuration"]//StyleGraphs

GeneralizedPetersen

GraphData[{"Coprime",20},"Graph","GeneralizedPetersen"]//StyleGraphs

IGraph

GraphData[{"Coprime",20},"Graph","IGraph"]//StyleGraphs

CompleteKPartite

GraphData[{"Coprime",20},"Graph","CompleteKPartite"]//StyleGraphs

Bipartite

GraphData[{"Coprime",20},"Bipartite"]

GraphData[{"Coprime",20},"Graph","Bipartite"]//StyleGraphs

Bilateral

GraphData[{"Coprime",20},"Graph","Bilateral"]//StyleGraphs

Grid[DeleteCases[Monitor[{g=#,BilateralGraphEmbeddingTypes[#],GraphSymmetryGroup[#]}&/@GraphData[{"Coprime",20},"Graph","All"],g],{_,_,TransformationGroup[{}]}],Dividers->All,Alignment->{{Center,{Left}}}]//Quiet

Circular

GraphData[{"Coprime",20},"Graph","Circular"]//StyleGraphs

Circular construction 1*^4 [ s]

Length[hc=FindHamiltonianCycle[GraphData[{"Coprime",20}],1*^4][[All,All,1]]]//Timing

gs=CircularEmbeddingFromHamiltonianCycle[GraphData[{"Coprime",20}],#]&/@Take[hc,1]

Length[hcsym=SymmetricHamiltonianCycles[GraphData[{"Coprime",20}],hc,ProgressReporting->True]]//Timing

GroupBy[SymmetricHamiltonianCycleGraph[GraphData[{"Coprime",20}],#]&/@hcsym,GraphSymmetryGroup]

Circular construction 1*^5 [ s]

Length[hc=FindHamiltonianCycle[GraphData[{"Coprime",20}],1*^5][[All,All,1]]]//Timing

Length[hcsym=SymmetricHamiltonianCycles[GraphData[{"Coprime",20}],hc,ProgressReporting->True]]//Timing

GroupBy[SymmetricHamiltonianCycleGraph[GraphData[{"Coprime",20}],#]&/@hcsym,GraphSymmetryGroup]

Circular construction All

GraphData[{"Coprime",20},"Hamiltonian"]

GraphData[{"Coprime",20},"HamiltonianCycles"]

GraphData[{"Coprime",20},"HamiltonianCycleCount"]

GraphData[{"Coprime",20},"LCF"]

GraphData[{"Coprime",20},"LCFSignature"]

Length[hc=FindHamiltonianCycle[GraphData[{"Coprime",20}],All][[All,All,1]]]//Timing

Length[hcsym=SymmetricHamiltonianCycles[GraphData[{"Coprime",20}],hc,ProgressReporting->True]]//Timing

GroupBy[SymmetricHamiltonianCycleGraph[GraphData[{"Coprime",20}],#]&/@hcsym,GraphSymmetryGroup]

Planar

GraphData[{"Coprime",20},"Planar"]

GraphData[{"Coprime",20},"Graph","Planar"]//StyleGraphs

MinimalCrossingNumber crossings.uos.de

CrossingNumber[GraphData[{"Coprime",20}],Method->"WebCompute"]//AbsoluteTiming

DateString[]

Quit

MinimalCrossingNumber: "EmbeddingScheme" -> 1

(cn=CrossingNumber[GraphData[{"Coprime",20}],"EmbeddingScheme"->1,TimeConstraint->1])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",20}],"EmbeddingScheme"->1,TimeConstraint->10])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",20}],"EmbeddingScheme"->1,TimeConstraint->60])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",20}],"EmbeddingScheme"->1,TimeConstraint->3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",20}],"EmbeddingScheme"->1,TimeConstraint->5 3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",20}],"EmbeddingScheme"->1,TimeConstraint->86400])//AbsoluteTiming

MinimalCrossingNumber: "EmbeddingScheme" -> 2

(cn=CrossingNumber[GraphData[{"Coprime",20}],"EmbeddingScheme"->2,TimeConstraint->1])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",20}],"EmbeddingScheme"->2,TimeConstraint->10])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",20}],"EmbeddingScheme"->2,TimeConstraint->60])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",20}],"EmbeddingScheme"->2,TimeConstraint->3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",20}],"EmbeddingScheme"->2,TimeConstraint->5 3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",20}],"EmbeddingScheme"->2,TimeConstraint->86400])//AbsoluteTiming

MinimalCrossingNumber: "EmbeddingScheme" -> 3

(cn=CrossingNumber[GraphData[{"Coprime",20}],"EmbeddingScheme"->3,TimeConstraint->1])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",20}],"EmbeddingScheme"->3,TimeConstraint->10])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",20}],"EmbeddingScheme"->3,TimeConstraint->60])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",20}],"EmbeddingScheme"->3,TimeConstraint->3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",20}],"EmbeddingScheme"->3,TimeConstraint->5 3600])//AbsoluteTiming

(cn=CrossingNumber[GraphData[{"Coprime",20}],"EmbeddingScheme"->3,TimeConstraint->86400])//AbsoluteTiming

MinimalCrossing

GraphData[{"Coprime",20},"CN"]

(gs=GraphData[{"Coprime",20},"Graph","MinimalCrossing"])//StyleGraphs

GraphCrossingCount/@gs

GraphCrossingDiagram/@gs

MinimalRectilinearCrossing

GraphData[{"Coprime",20},"RCN"]

GraphData[{"Coprime",20},"Graph","MinimalRectilinearCrossing"]//StyleGraphs

MinimalRectilinearCrossing construction order X [minimum RCN == ]

Length[gs=FindMinimalRectilinearCrossingGraph[GraphData[{"Coprime",20}],Automatic,All,"Size"->Automatic,Method->"SubgraphIsomorphism",Debug->True]]//Timing

MaxMemoryUsed[]/10^9. GB

Tally[RectilinearCrossingCount/@gs]//Timing

Tally[RectilinearLocalCrossingCount/@gs]//Timing

GraphSymmetryGroup/@gs//Tally

Select[gs,GraphSymmetryGroup[#]=!=TransformationGroup[{}]&]

Take[gs,UpTo[100]]

MinimalRectilinearCrossing construction order X [minimum RCN == ]

Length[gs=FindMinimalRectilinearCrossingGraph[GraphData[{"Coprime",20}],Automatic,All,"Size"->XXX,Method->"SubgraphIsomorphism",Debug->True]]//Timing

MaxMemoryUsed[]/10^9. GB

Tally[RectilinearCrossingCount/@gs]//Timing

Tally[RectilinearLocalCrossingCount/@gs]//Timing

GraphSymmetryGroup/@gs//Tally

Select[gs,GraphSymmetryGroup[#]=!=TransformationGroup[{}]&]

Take[gs,UpTo[100]]

MinimalCrossing construction Tutte

(cn=CrossingNumber[GraphData[{"Coprime",20}],TimeConstraint->1])//AbsoluteTiming

(g=MinimalCrossingGraph[GraphData[{"Coprime",20}],"CrossingNumber"->cn])//PolyhedralGraphQ//AbsoluteTiming

faces=ReverseSort@SymmetricallyDistinctFaces[g]

Tally[ReverseSort[Length/@faces]]

TutteGraphs=BilateralGraph[CenterGraph@IGLayoutTutte[g,"OuterFace"->#],"ReturnNonbilateralGraph"->True]&/@faces

TutteGraphsWithOuterCrossingPointCounts={
#,
Count[OuterFace[#],_?(GreaterThan[GraphData[{"Coprime",20},"V"]])]
}&/@TutteGraphs;

Cases[TutteGraphsWithOuterCrossingPointCounts,{g_,0}:>g]

Cases[TutteGraphsWithOuterCrossingPointCounts,{g_,1}:>g]

LocalCrossingNumberWithEmbeddings=
{1+Max[Length/@DeleteCases[
Drop[AdjacencyList[#],GraphData[{"Coprime",20},"V"]],
_Integer?(LessEqualThan[GraphData[{"Coprime",20},"V"]]),
{2}
]],#}&/@TutteGraphs

TutteGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[
#,
AdditionalData->Join[Table[True,GraphData[{"Coprime",20},"V"]],Table[False,cn]],
SameTest->Equal
]
}&/@TutteGraphs;

SymmetricEmbeddingsWithOrientations=DeleteCases[
TutteGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]

Select[SymmetricEmbeddingsWithOrientations[[All,1]],Count[OuterFace[#],_?(GreaterThan[GraphData[{"Coprime",20},"V"]])]==0&]

MinimalCrossing construction Random 1k [XXX s]

(cn=CrossingNumber[GraphData[{"Coprime",20}],TimeConstraint->1])//AbsoluteTiming

Length[diagrams=DistinctMinimalCrossingDiagramData[
GraphData[{"Coprime",20}],
1000,
"CrossingNumber"->cn,
EdgeShapeFunction->"BezierEdge"
]]//AbsoluteTiming

No crossing points on the boundary:

Length[diagrams0=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==0&],"Graph",{}]]//Timing

Take[diagrams0,UpTo[10]]

One crossing point on the boundary:

Length[diagrams1=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==1&],"Graph",{}]]//Timing

Take[diagrams1,UpTo[10]]

graphs=#["Graph"]&/@diagrams;

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[#]
}&/@graphs;//AbsoluteTiming

MaxMemoryUsed[]/10^9.GB

Symmetric embeddings:

Length[SymmetricMinimalEmbeddingData=DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]
]//AbsoluteTiming

SymmetricMinimalEmbeddingData

SymmetricMinimalEmbeddingGraphs=SymmetricMinimalEmbeddingData[[All,1]]

GraphCrossingCount/@SymmetricMinimalEmbeddingGraphs

GraphCrossingDiagram/@SymmetricMinimalEmbeddingGraphs

MinimalCrossing construction Random 5k [XXX s]

(cn=CrossingNumber[GraphData[{"Coprime",20}],TimeConstraint->1])//AbsoluteTiming

Length[diagrams=DistinctMinimalCrossingDiagramData[
GraphData[{"Coprime",20}],
5000,
"CrossingNumber"->cn,
EdgeShapeFunction->"BezierEdge"
]]//AbsoluteTiming

No crossing points on the boundary:

Length[diagrams0=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==0&],"Graph",{}]]//Timing

Take[diagrams0,UpTo[10]]

One crossing point on the boundary:

Length[diagrams1=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==1&],"Graph",{}]]//Timing

Take[diagrams1,UpTo[10]]

graphs=#["Graph"]&/@diagrams;

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[#]
}&/@graphs;//AbsoluteTiming

MaxMemoryUsed[]/10^9.GB

Symmetric embeddings:

Length[SymmetricMinimalEmbeddingData=DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]
]//AbsoluteTiming

SymmetricMinimalEmbeddingData

SymmetricMinimalEmbeddingGraphs=SymmetricMinimalEmbeddingData[[All,1]]

GraphCrossingCount/@SymmetricMinimalEmbeddingGraphs

GraphCrossingDiagram/@SymmetricMinimalEmbeddingGraphs

MinimalCrossing construction Random 20k [XXX s]

(cn=CrossingNumber[GraphData[{"Coprime",20}],TimeConstraint->1])//AbsoluteTiming

Length[diagrams=DistinctMinimalCrossingDiagramData[
GraphData[{"Coprime",20}],
20*^3,
"CrossingNumber"->cn,
EdgeShapeFunction->"BezierEdge"
]]//AbsoluteTiming

No crossing points on the boundary:

Length[diagrams0=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==0&],"Graph",{}]]//Timing

Take[diagrams0,UpTo[10]]

One crossing point on the boundary:

Length[diagrams1=Lookup[Select[diagrams,MinimalCrossingOuterCrossingCount[#]==1&],"Graph",{}]]//Timing

Take[diagrams1,UpTo[10]]

graphs=#["Graph"]&/@diagrams;

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[#]
}&/@graphs;//AbsoluteTiming

MaxMemoryUsed[]/10^9.GB

Symmetric embeddings:

Length[SymmetricMinimalEmbeddingData=DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]
]//AbsoluteTiming

SymmetricMinimalEmbeddingData

SymmetricMinimalEmbeddingGraphs=SymmetricMinimalEmbeddingData[[All,1]]

GraphCrossingCount/@SymmetricMinimalEmbeddingGraphs

GraphCrossingDiagram/@SymmetricMinimalEmbeddingGraphs

MinimalCrossing construction Random 1k [old]

(cn=CrossingNumber[GraphData[{"Coprime",20}],TimeConstraint->1])//AbsoluteTiming

(RandomGraphs=Table[MinimalCrossingGraph[GraphData[{"Coprime",20}],"CrossingNumber"->cn,RandomSeed->n],{n,1000}]//Union);//Timing

RandomGraphsWithOuterCrossingPointCounts={
#,
Count[OuterFace[#],_?(GreaterThan[GraphData[{"Coprime",20},"V"]])]
}&/@RandomGraphs;

Small numbers of crossing points on the boundary:

Cases[RandomGraphsWithOuterCrossingPointCounts,{g_,0}:>g]

Cases[RandomGraphsWithOuterCrossingPointCounts,{g_,1}:>g]

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[
#,
AdditionalData->Join[Table[True,GraphData[{"Coprime",20},"V"]],Table[False,cn]],
SameTest->Equal
]
}&/@RandomGraphs;

MaxMemoryUsed[]/10^9.GB

DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]/.g_Graph:>BilateralGraph[CenterGraph@g,"ReturnNonbilateralGraph"->True]

MinimalCrossing construction Random 20k [old]

(cn=CrossingNumber[GraphData[{"Coprime",20}],TimeConstraint->1])//AbsoluteTiming

(RandomGraphs=Table[MinimalCrossingGraph[GraphData[{"Coprime",20}],"CrossingNumber"->cn,RandomSeed->n],{n,20000}]//Union);//Timing

RandomGraphsWithOuterCrossingPointCounts={
#,
Count[OuterFace[#],_?(GreaterThan[GraphData[{"Coprime",20},"V"]])]
}&/@RandomGraphs;

Small numbers of crossing points on the boundary:

Cases[RandomGraphsWithOuterCrossingPointCounts,{g_,0}:>g]

Cases[RandomGraphsWithOuterCrossingPointCounts,{g_,1}:>g]

Symmetric embeddings:

RandomGraphsWithSymmetryGroups={
#,
GraphSymmetryGroup[
#,
AdditionalData->Join[Table[True,GraphData[{"Coprime",20},"V"]],Table[False,cn]],
SameTest->Equal
]
}&/@RandomGraphs;

MaxMemoryUsed[]/10^9.GB

DeleteCases[
RandomGraphsWithSymmetryGroups,
{_,TransformationGroup[{}]}
]/.g_Graph:>BilateralGraph[CenterGraph@g,"ReturnNonbilateralGraph"->True]

MinimalLocalCrossing

GraphData[{"Coprime",20},{"LocalCrossingNumber","RectilinearLocalCrossingNumber"}]

GraphData[{"Coprime",20},"Graph","MinimalLocalCrossing"]//StyleGraphs

MinimalRectilinearLocalCrossing

GraphData[{"Coprime",20},{"LocalCrossingNumber","RectilinearLocalCrossingNumber"}]

GraphData[{"Coprime",20},"Graph","MinimalRectilinearLocalCrossing"]//StyleGraphs

MinimaRectilinearlLocalCrossing construction 1000

AdjacentCrossingsQ[g_Graph,cn_Integer]:=Module[{a=AdjacencyList[g],n=VertexCount[g]-cn},Max[Take[a,-cn]]>n]

(cn=CrossingNumber[GraphData[{"Coprime",20}],TimeConstraint->10])//AbsoluteTiming

(gs=Select[Table[MinimalCrossingGraph[GraphData[{"Coprime",20}],"CrossingNumber"->cn,RandomSeed->i],{i,1000}],!AdjacentCrossingsQ[#,cn]&]//Union)//Timing

MinimaRectilinearlLocalCrossing construction 20000

AdjacentCrossingsQ[g_Graph,cn_Integer]:=Module[{a=AdjacencyList[g],n=VertexCount[g]-cn},Max[Take[a,-cn]]>n]

(cn=CrossingNumber[GraphData[{"Coprime",20}],TimeConstraint->10])//AbsoluteTiming

(gs=Select[Table[MinimalCrossingGraph[GraphData[{"Coprime",20}],"CrossingNumber"->cn,RandomSeed->i],{i,20000}],!AdjacentCrossingsQ[#,cn]&]//Union)//Timing

Circulant

GraphData[{"Coprime",20},"Circulant"]

GraphData[{"Coprime",20},"Graph","Circulant"]//StyleGraphs

Circulant construction

GraphData[{"Coprime",20},"NotationRules","Circulant"]

(ci=CirculantIndices[GraphData[{"Coprime",20}]])//AbsoluteTiming

CirculantGraph1@@@ci

Cases[GraphData[{"Coprime",20},"StandardNames"],{"Circulant",i_}:>i]

CirculantGraph1@@@%

Complement graph

compl=GraphData[{"Coprime",20},"ComplementGraph","Name"]

Line graph

GraphData[{"Coprime",20},"Line"]

LineGraphQ[GraphData[{"Coprime",20}]]//Timing

RootGraph

roots=Select[GraphData[All],GraphData[#,"LineGraph","Name"]==={"Coprime",20}&]

RootGraph[GraphData[{"Coprime",20}]]

Halin

GraphData[{"Coprime",20},"Halin"]

GraphData[{"Coprime",20},"Graph","Halin"]//StyleGraphs

Rigid

GraphData[{"Coprime",20},"Rigid"]

GraphData[{"Coprime",20},"Graph","Rigid"]//StyleGraphs

Flexible

GraphData[{"Coprime",20},"Flexible"]

GraphData[{"Coprime",20},"Graph","Flexible"]//StyleGraphs

Voltage

GraphData[{"Coprime",20},"Graph","Voltage"]//StyleGraphs

Voltage construction

gs=VoltageGraph[GraphData[{"Coprime",20}],"MaxResults"->20,Debug->True]

Length[gs]

RecognizeGraph/@gs

VoltageGraphNotation/@gs//Column

EmbeddingClasses/@gs//Column

GraphSymmetryGroup/@gs//Column

LCF

GraphData[{"Coprime",20},"LCF"]

GraphData[{"Coprime",20},"HamiltonianCycleCount"]

GraphData[{"Coprime",20},"LCFSignature"]

GraphData[{"Coprime",20},"LCFNotations"]

GraphData[{"Coprime",20},"Graph","LCF"]//StyleGraphs

Tally[LCFNotation[#][[2]]&/@%]

UnitDistance

GraphData[{"Coprime",20},"UnitDistance"]

UnitDistanceGraphQ[GraphData[{"Coprime",20}],Debug->True]//Timing

GraphData[{"Coprime",20},"Graph","UnitDistance"]//StyleGraphs

UnitDistance by refinement of default embeddings

Graph[edge list]

(g=UnitDistanceEmbeddingRefine[Graph[GraphData[{"Coprime",20},"EdgeList"]],MaxIterations->500])//Timing

UnitDistanceGraphEmbeddingQ[g]

Graph[vertex list, edge list]

(g=UnitDistanceEmbeddingRefine[Graph[GraphData[{"Coprime",20},"VertexList"],GraphData[{"Coprime",20},"EdgeList"]],MaxIterations->500])//Timing

UnitDistanceGraphEmbeddingQ[g]

UnitDistance by refinement of existing embeddings

gs=UnitDistanceEmbeddingRefine[Graph[VertexList[#],EdgeList[#],VertexCoordinates->GraphEmbedding[#]],MaxIterations->500]&/@Complement@@(GraphData[{"Coprime",20},"Graph",#]&/@{"All","UnitDistance"})

TextGrid[
gdata=SortBy[
{#,DegenerateGraphEmbeddingQ[#],GraphSymmetryGroup[#],Max[Abs[EdgeLengths[#]-1]]}&/@gs,
Last
],
Dividers->All
]

Cases[gdata,{__,0.}]

Symmetric:

gs=Cases[
gdata,
{g_,_,sym:Except[TransformationGroup[{}]],diff_}:>{
HighlightGraph[g1=BilateralGraph[CenterGraph[g],"ReturnNonbilateralGraph"->True],Flatten[FindCoincidentVertices[g1]]],
sym,
diff
}]

UnitDistance by FindUnitDistanceEmbedding  (random embeddings returning on messages)

gs=FindUnitDistanceEmbedding[GraphData[{"Coprime",20}],50,"ReturnWithMessage"->True];//Quiet//Timing

gdata=SortBy[
{#,Max[Abs[EdgeLengths[#]-1]]}&/@gs,
Last
]

Cases[gdata,{g_?UnitDistanceGraphEmbeddingQ,_}:>g]

SymmetricEmebddings=Select[gdata,GraphSymmetryGroup[#[[1]]]=!=TransformationGroup[{}]&]

UnitDistance by FindUnitDistanceEmbedding  (random embedding waiting until UD is found)

FindUnitDistanceEmbedding[GraphData[{"Coprime",20}],"ReturnWithMessage"->False]//Quiet//Timing

Matchstick

GraphData[{"Coprime",20},"Matchstick"]

GraphData[{"Coprime",20},"Graph","Matchstick"]//StyleGraphs

3D default

Graph3D[GraphData[{"Coprime",20},"Edges"]]

3D construction

3D All

GraphData[{"Coprime",20},"Graph",{"3D","All"}]

3D UnitDistance construction Random

GraphData[{"Coprime",20},"Dimension"]

(g=UnitDistanceEmbeddingRefine[
Graph3D[
GraphData[{"Coprime",20},"VertexList"],
GraphData[{"Coprime",20},"EdgeList"]
],
WorkingPrecision->25])//Timing

EdgeLengths[g]

UnitDistanceGraphEmbeddingQ[g]

3D UnitDistance

GraphData[{"Coprime",20},"Graph",{"3D","UnitDistance"}]

3D Polyhedron

GraphData[{"Coprime",20},"Polyhedral"]

GraphData[{"Coprime",20},"Graph",{"3D","Polyhedron"}]

Properties

Hamiltonian

ChatGPT 5.5 Pro

Yes—under the standard finite “coprime graph of integers” convention (G_n) with vertex set ({1,2,\ldots,n}) and edge (ij) iff (\gcd(i,j)=1), the proof is immediate and constructive. House of Graphs states this same vertex-set/edge convention for the “Coprime Graph of Integers” family, and MathWorld uses the convention that (K_1) is Hamiltonian while (K_2=P_2) is nonhamiltonian. ([House of Graphs][1])

For (n\ge 3), consider the cyclic ordering

[
1,2,3,\ldots,n,1.
]

Every consecutive pair (i,i+1) is coprime, since

[
\gcd(i,i+1)=1
]

for all (1\le i<n). Also,

[
\gcd(n,1)=1.
]

Therefore each edge

[
1!-!2,;2!-!3,;\ldots,;(n-1)!-!n,;n!-!1
]

is present in (G_n). Since this closed walk visits every vertex exactly once before returning to the start, it is a Hamiltonian cycle. MathWorld defines a Hamiltonian cycle as a closed loop through a graph visiting each node exactly once. ([MathWorld][2])

The exceptional case is (n=2). Then (G_2) has vertices ({1,2}) and the single edge (1!-!2), so (G_2\cong K_2=P_2). A simple graph on two vertices has no cycle through its vertices, and MathWorld/GraphData explicitly use the convention that (K_2=P_2) is nonhamiltonian. ([MathWorld][3])

So:

[
G_n \text{ is Hamiltonian for } n=1 \text{ by convention and for all } n\ge 3,
]
[
G_2=P_2 \text{ is the unique exception.}
]

Executable Wolfram Language construction:

```wl
coprimeIntegerGraph[n_Integer?Positive] :=
  Graph[
    Range[n],
    UndirectedEdge @@@ Select[Subsets[Range[n], {2}], CoprimeQ @@ # &],
    VertexLabels -> "Name"
  ]

coprimeHamiltonianCycle[n_Integer?Positive] :=
  Which[
    n == 1, {},
    n == 2, Missing["NonHamiltonian", "G_2 is P_2"],
    True, UndirectedEdge @@@ Partition[Append[Range[n], 1], 2, 1]
  ]

Table[
  {n, coprimeHamiltonianCycle[n]},
  {n, 1, 8}
]
```

One caveat: this proves the claim for the initial-segment graphs on ({1,\ldots,n}). It is not true for arbitrary finite integer sets or arbitrary consecutive intervals ({k,k+1,\ldots,k+n-1}); those broader “(k)-coprime graphs” require extra hypotheses and have a separate Hamiltonicity characterization. ([arxiv.org][4])

[1]: https://houseofgraphs.org/graphs/28 "House of Graphs"
[2]: https://mathworld.wolfram.com/HamiltonianCycle.html "Hamiltonian Cycle -- from Wolfram MathWorld"
[3]: https://mathworld.wolfram.com/HamiltonianGraph.html "Hamiltonian Graph -- from Wolfram MathWorld"
[4]: https://arxiv.org/abs/2005.06308?utm_source=chatgpt.com "[2005.06308] Hamiltonicity of a coprime graph"

GraphData

GraphDataClassString

GraphDataClassString["Coprime"]

Renamings

rules=Rule@@@DeleteCases[
Table[{RecognizeGraph@CoprimeGraph[n],n},{n,100}],
{{},_}
]

Select[rules[[All,1]],!DataPaclets`GraphDataDump`MyGraphQ[#]&]

AddIndexedClass["Coprime",rules,"15.1","AddClass"->False]

RenameGraphFiles[]

GraphDataString

<<MathWorld`Graphs`

stream=OpenWrite["~/coprime.m"]

Do[
WriteString[
stream,
GraphDataString[
CoprimeGraph[n],
"StandardName"->{"Coprime",n},
"Name"->ToString[n]<>"\[Hyphen]coprime graph",
"NotationRules"->{"Coprime"->n},
"Information"->"CoprimeGraph"
]
],
{n,8,20}
]

Close[stream]