Database of labelled simple graphs on $n$-vertices?












2












$begingroup$


Recently for fun, I have been doing some computational experiments in maple with graphs and have suddenly desired a collection of labelled simple graphs on $n$-vertices. I am aware of Brenden Mckay's collection of unlabelled simple graphs and his program geng but have not found something similar for labelled graphs. I imagine it would only be tractable for smaller numbers of vertices but I am still interested.



In theory, it should be a much simpler problem to generate labelled graphs on $n$ vertices but for some reason, I can't think of how to effectively program it in maple. (Any hints in this direction would also be much appreciated.)










share|cite|improve this question











$endgroup$








  • 2




    $begingroup$
    Just generate the subsets of $E(K_n)$.
    $endgroup$
    – Chris Godsil
    Dec 31 '18 at 19:10










  • $begingroup$
    @ChrisGodsil Yep. No idea why I didn't think to do that. This question could probably be closed now.
    $endgroup$
    – 1730
    Dec 31 '18 at 19:14
















2












$begingroup$


Recently for fun, I have been doing some computational experiments in maple with graphs and have suddenly desired a collection of labelled simple graphs on $n$-vertices. I am aware of Brenden Mckay's collection of unlabelled simple graphs and his program geng but have not found something similar for labelled graphs. I imagine it would only be tractable for smaller numbers of vertices but I am still interested.



In theory, it should be a much simpler problem to generate labelled graphs on $n$ vertices but for some reason, I can't think of how to effectively program it in maple. (Any hints in this direction would also be much appreciated.)










share|cite|improve this question











$endgroup$








  • 2




    $begingroup$
    Just generate the subsets of $E(K_n)$.
    $endgroup$
    – Chris Godsil
    Dec 31 '18 at 19:10










  • $begingroup$
    @ChrisGodsil Yep. No idea why I didn't think to do that. This question could probably be closed now.
    $endgroup$
    – 1730
    Dec 31 '18 at 19:14














2












2








2





$begingroup$


Recently for fun, I have been doing some computational experiments in maple with graphs and have suddenly desired a collection of labelled simple graphs on $n$-vertices. I am aware of Brenden Mckay's collection of unlabelled simple graphs and his program geng but have not found something similar for labelled graphs. I imagine it would only be tractable for smaller numbers of vertices but I am still interested.



In theory, it should be a much simpler problem to generate labelled graphs on $n$ vertices but for some reason, I can't think of how to effectively program it in maple. (Any hints in this direction would also be much appreciated.)










share|cite|improve this question











$endgroup$




Recently for fun, I have been doing some computational experiments in maple with graphs and have suddenly desired a collection of labelled simple graphs on $n$-vertices. I am aware of Brenden Mckay's collection of unlabelled simple graphs and his program geng but have not found something similar for labelled graphs. I imagine it would only be tractable for smaller numbers of vertices but I am still interested.



In theory, it should be a much simpler problem to generate labelled graphs on $n$ vertices but for some reason, I can't think of how to effectively program it in maple. (Any hints in this direction would also be much appreciated.)







graph-theory






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Dec 31 '18 at 19:24









the_fox

2,90021537




2,90021537










asked Dec 31 '18 at 18:13









17301730

8911714




8911714








  • 2




    $begingroup$
    Just generate the subsets of $E(K_n)$.
    $endgroup$
    – Chris Godsil
    Dec 31 '18 at 19:10










  • $begingroup$
    @ChrisGodsil Yep. No idea why I didn't think to do that. This question could probably be closed now.
    $endgroup$
    – 1730
    Dec 31 '18 at 19:14














  • 2




    $begingroup$
    Just generate the subsets of $E(K_n)$.
    $endgroup$
    – Chris Godsil
    Dec 31 '18 at 19:10










  • $begingroup$
    @ChrisGodsil Yep. No idea why I didn't think to do that. This question could probably be closed now.
    $endgroup$
    – 1730
    Dec 31 '18 at 19:14








2




2




$begingroup$
Just generate the subsets of $E(K_n)$.
$endgroup$
– Chris Godsil
Dec 31 '18 at 19:10




$begingroup$
Just generate the subsets of $E(K_n)$.
$endgroup$
– Chris Godsil
Dec 31 '18 at 19:10












$begingroup$
@ChrisGodsil Yep. No idea why I didn't think to do that. This question could probably be closed now.
$endgroup$
– 1730
Dec 31 '18 at 19:14




$begingroup$
@ChrisGodsil Yep. No idea why I didn't think to do that. This question could probably be closed now.
$endgroup$
– 1730
Dec 31 '18 at 19:14










1 Answer
1






active

oldest

votes


















1












$begingroup$

For completeness, @MishaLavrov has a solution (below), which with slight modification gives the labeled graphs:



Graph[Range[n], #, VertexLabels->Automatic] & /@ Subsets[UndirectedEdge @@@ Subsets[Range[n], {2}]]


So if n=3 we get



enter image description here



Moreover, Mathematica has a curated database of graphs (GraphData), with excellent tools for creating and classifying them:



enter image description here



Here's just a list of the graph classes:



{"Acyclic", "AlmostHamiltonian", "AlternatingGroup", "Andrasfai",
"Antelope", "Antiprism", "Apex", "Apollonian", "Archimedean",
"ArchimedeanDual", "ArcTransitive", "Arrangement", "Asymmetric",
"BananaTree", "Barbell", "Beineke", "Bicolorable", "Biconnected",
"Bicubic", "Bipartite", "BipartiteKneser", "Bishop", "BlackBishop",
"Book", "Bouwer", "Bridged", "Bridgeless", "Cactus", "Cage",
"Caterpillar", "Caveman", "Cayley", "Centipede", "Chang", "Chordal",
"Chordless", "ChromaticallyNonunique", "ChromaticallyUnique",
"Circulant", "Class1", "Class2", "ClawFree", "CocktailParty",
"Complete", "CompleteBipartite", "CompletelyRegular", "CompleteTree",
"CompleteTripartite", "Cone", "Conference", "Connected",
"CriticalNonplanar", "CrossedPrism", "Crown", "CubeConnectedCycle",
"Cubic", "Cycle", "Cyclic", "Cyclotomic", "DeterminedByResistance",
"DeterminedBySpectrum", "Disconnected", "DistanceRegular",
"DistanceTransitive", "Doob", "DutchWindmill", "EdgeTransitive",
"Empty", "Eulerian", "Fan", "FibonacciCube", "Firecracker",
"Fiveleaper", "FoldedCube", "Forest", "Fullerene", "Fusene", "Gear",
"GeneralizedPetersen", "GeneralizedPolygon", "Grid", "Haar",
"Hadamard", "Halin", "HalvedCube", "HamiltonConnected",
"HamiltonDecomposable", "Hamiltonian", "HamiltonLaceable", "Hamming",
"Hanoi", "Harary", "Helm", "HoneycombToroidal", "HStarConnected",
"Hypercube", "Hypohamiltonian", "Hypotraceable", "Identity",
"IGraph", "Imperfect", "Incidence", "Integral", "Johnson", "Keller",
"KempeCounterexample", "King", "Kneser", "Knight", "Kuratowski",
"Ladder", "LadderRung", "LCF", "Line", "Lobster", "Local",
"LocallyPetersen", "Lollipop", "Matchstick",
"MaximallyNonhamiltonian", "Median", "MengerSponge", "Metelsky",
"MoebiusLadder", "MongolianTent", "Moore", "Mycielski", "Noncayley",
"Nonempty", "Noneulerian", "Nonhamiltonian", "Nonplanar",
"Nonsimple", "NoPerfectMatching", "NotDeterminedByResistance",
"NotDeterminedBySpectrum", "Nuciferous", "Octic", "Odd", "Ore",
"Paley", "Pan", "Pancyclic", "Path", "Paulus", "Perfect",
"PerfectMatching", "PermutationStar", "Planar", "Platonic",
"Polyhedral", "Polyiamond", "Polyomino", "Prism", "Pseudoforest",
"Pseudotree", "Quartic", "Queen", "Quintic", "Regular",
"RegularPolychoron", "Rook", "RookComplement", "SelfComplementary",
"SelfDual", "Semisymmetric", "Septic", "Sextic", "SierpinskiCarpet",
"SierpinskiSieve", "SierpinskiTetrahedron", "Simple", "Snark",
"Spider", "SquareFree", "StackedBook", "StackedPrism", "Star",
"StronglyPerfect", "StronglyRegular", "Sun", "Sunlet", "Symmetric",
"Tadpole", "Taylor", "Tetrahedral", "Toroidal", "TorusGrid",
"Traceable", "Transposition", "Tree", "TriangleFree", "Triangular",
"TriangularGrid", "TriangularHoneycombAcuteKnight",
"TriangularHoneycombBishop", "TriangularHoneycombKing",
"TriangularHoneycombObtuseKnight", "TriangularHoneycombQueen",
"TriangularHoneycombRook", "Triangulated", "Tripod", "Turan",
"TwoRegular", "Unicyclic", "UnitDistance", "Untraceable",
"VertexTransitive", "WeaklyPerfect", "WeaklyRegular", "Web",
"WellCovered", "Wheel", "WhiteBishop", "Windmill", "Wreath",
"ZeroSymmetric", "ZeroTwo"}



And here's the labelling TriangularHoneycombAcuteKnight graph with 10 vertices (to take one of millions of examples).



enter image description here



And on and on and on and on....






share|cite|improve this answer











$endgroup$













  • $begingroup$
    This is neither complete (for any interesting $n$) nor in any real sense a database of labeled graphs. (Or else it is a database of labeled graphs, but a far more incomplete one; e.g., it contains only one cycle graph on $n$ vertices out of all $frac{(n-1)!}{2}$ possibilities.)
    $endgroup$
    – Misha Lavrov
    Dec 31 '18 at 19:18












  • $begingroup$
    The figure was, of course, a subset of the graphs. Of course. And labelling is trivial. (I'll update the answer in a moment.)
    $endgroup$
    – David G. Stork
    Dec 31 '18 at 19:22










  • $begingroup$
    I am not speaking about the figure; the actual GraphData database is incomplete - intentially so, since it only focuses on "interesting" graphs.
    $endgroup$
    – Misha Lavrov
    Dec 31 '18 at 19:49












  • $begingroup$
    You can generate any graph with $n$ vertexes.
    $endgroup$
    – David G. Stork
    Dec 31 '18 at 19:52










  • $begingroup$
    Yes, so the correct answer is Graph[Range[n], #] & /@ Subsets[UndirectedEdge @@@ Subsets[Range[n], {2}]]. The mention of GraphData is a red herring.
    $endgroup$
    – Misha Lavrov
    Dec 31 '18 at 19:53













Your Answer





StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3057923%2fdatabase-of-labelled-simple-graphs-on-n-vertices%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1












$begingroup$

For completeness, @MishaLavrov has a solution (below), which with slight modification gives the labeled graphs:



Graph[Range[n], #, VertexLabels->Automatic] & /@ Subsets[UndirectedEdge @@@ Subsets[Range[n], {2}]]


So if n=3 we get



enter image description here



Moreover, Mathematica has a curated database of graphs (GraphData), with excellent tools for creating and classifying them:



enter image description here



Here's just a list of the graph classes:



{"Acyclic", "AlmostHamiltonian", "AlternatingGroup", "Andrasfai",
"Antelope", "Antiprism", "Apex", "Apollonian", "Archimedean",
"ArchimedeanDual", "ArcTransitive", "Arrangement", "Asymmetric",
"BananaTree", "Barbell", "Beineke", "Bicolorable", "Biconnected",
"Bicubic", "Bipartite", "BipartiteKneser", "Bishop", "BlackBishop",
"Book", "Bouwer", "Bridged", "Bridgeless", "Cactus", "Cage",
"Caterpillar", "Caveman", "Cayley", "Centipede", "Chang", "Chordal",
"Chordless", "ChromaticallyNonunique", "ChromaticallyUnique",
"Circulant", "Class1", "Class2", "ClawFree", "CocktailParty",
"Complete", "CompleteBipartite", "CompletelyRegular", "CompleteTree",
"CompleteTripartite", "Cone", "Conference", "Connected",
"CriticalNonplanar", "CrossedPrism", "Crown", "CubeConnectedCycle",
"Cubic", "Cycle", "Cyclic", "Cyclotomic", "DeterminedByResistance",
"DeterminedBySpectrum", "Disconnected", "DistanceRegular",
"DistanceTransitive", "Doob", "DutchWindmill", "EdgeTransitive",
"Empty", "Eulerian", "Fan", "FibonacciCube", "Firecracker",
"Fiveleaper", "FoldedCube", "Forest", "Fullerene", "Fusene", "Gear",
"GeneralizedPetersen", "GeneralizedPolygon", "Grid", "Haar",
"Hadamard", "Halin", "HalvedCube", "HamiltonConnected",
"HamiltonDecomposable", "Hamiltonian", "HamiltonLaceable", "Hamming",
"Hanoi", "Harary", "Helm", "HoneycombToroidal", "HStarConnected",
"Hypercube", "Hypohamiltonian", "Hypotraceable", "Identity",
"IGraph", "Imperfect", "Incidence", "Integral", "Johnson", "Keller",
"KempeCounterexample", "King", "Kneser", "Knight", "Kuratowski",
"Ladder", "LadderRung", "LCF", "Line", "Lobster", "Local",
"LocallyPetersen", "Lollipop", "Matchstick",
"MaximallyNonhamiltonian", "Median", "MengerSponge", "Metelsky",
"MoebiusLadder", "MongolianTent", "Moore", "Mycielski", "Noncayley",
"Nonempty", "Noneulerian", "Nonhamiltonian", "Nonplanar",
"Nonsimple", "NoPerfectMatching", "NotDeterminedByResistance",
"NotDeterminedBySpectrum", "Nuciferous", "Octic", "Odd", "Ore",
"Paley", "Pan", "Pancyclic", "Path", "Paulus", "Perfect",
"PerfectMatching", "PermutationStar", "Planar", "Platonic",
"Polyhedral", "Polyiamond", "Polyomino", "Prism", "Pseudoforest",
"Pseudotree", "Quartic", "Queen", "Quintic", "Regular",
"RegularPolychoron", "Rook", "RookComplement", "SelfComplementary",
"SelfDual", "Semisymmetric", "Septic", "Sextic", "SierpinskiCarpet",
"SierpinskiSieve", "SierpinskiTetrahedron", "Simple", "Snark",
"Spider", "SquareFree", "StackedBook", "StackedPrism", "Star",
"StronglyPerfect", "StronglyRegular", "Sun", "Sunlet", "Symmetric",
"Tadpole", "Taylor", "Tetrahedral", "Toroidal", "TorusGrid",
"Traceable", "Transposition", "Tree", "TriangleFree", "Triangular",
"TriangularGrid", "TriangularHoneycombAcuteKnight",
"TriangularHoneycombBishop", "TriangularHoneycombKing",
"TriangularHoneycombObtuseKnight", "TriangularHoneycombQueen",
"TriangularHoneycombRook", "Triangulated", "Tripod", "Turan",
"TwoRegular", "Unicyclic", "UnitDistance", "Untraceable",
"VertexTransitive", "WeaklyPerfect", "WeaklyRegular", "Web",
"WellCovered", "Wheel", "WhiteBishop", "Windmill", "Wreath",
"ZeroSymmetric", "ZeroTwo"}



And here's the labelling TriangularHoneycombAcuteKnight graph with 10 vertices (to take one of millions of examples).



enter image description here



And on and on and on and on....






share|cite|improve this answer











$endgroup$













  • $begingroup$
    This is neither complete (for any interesting $n$) nor in any real sense a database of labeled graphs. (Or else it is a database of labeled graphs, but a far more incomplete one; e.g., it contains only one cycle graph on $n$ vertices out of all $frac{(n-1)!}{2}$ possibilities.)
    $endgroup$
    – Misha Lavrov
    Dec 31 '18 at 19:18












  • $begingroup$
    The figure was, of course, a subset of the graphs. Of course. And labelling is trivial. (I'll update the answer in a moment.)
    $endgroup$
    – David G. Stork
    Dec 31 '18 at 19:22










  • $begingroup$
    I am not speaking about the figure; the actual GraphData database is incomplete - intentially so, since it only focuses on "interesting" graphs.
    $endgroup$
    – Misha Lavrov
    Dec 31 '18 at 19:49












  • $begingroup$
    You can generate any graph with $n$ vertexes.
    $endgroup$
    – David G. Stork
    Dec 31 '18 at 19:52










  • $begingroup$
    Yes, so the correct answer is Graph[Range[n], #] & /@ Subsets[UndirectedEdge @@@ Subsets[Range[n], {2}]]. The mention of GraphData is a red herring.
    $endgroup$
    – Misha Lavrov
    Dec 31 '18 at 19:53


















1












$begingroup$

For completeness, @MishaLavrov has a solution (below), which with slight modification gives the labeled graphs:



Graph[Range[n], #, VertexLabels->Automatic] & /@ Subsets[UndirectedEdge @@@ Subsets[Range[n], {2}]]


So if n=3 we get



enter image description here



Moreover, Mathematica has a curated database of graphs (GraphData), with excellent tools for creating and classifying them:



enter image description here



Here's just a list of the graph classes:



{"Acyclic", "AlmostHamiltonian", "AlternatingGroup", "Andrasfai",
"Antelope", "Antiprism", "Apex", "Apollonian", "Archimedean",
"ArchimedeanDual", "ArcTransitive", "Arrangement", "Asymmetric",
"BananaTree", "Barbell", "Beineke", "Bicolorable", "Biconnected",
"Bicubic", "Bipartite", "BipartiteKneser", "Bishop", "BlackBishop",
"Book", "Bouwer", "Bridged", "Bridgeless", "Cactus", "Cage",
"Caterpillar", "Caveman", "Cayley", "Centipede", "Chang", "Chordal",
"Chordless", "ChromaticallyNonunique", "ChromaticallyUnique",
"Circulant", "Class1", "Class2", "ClawFree", "CocktailParty",
"Complete", "CompleteBipartite", "CompletelyRegular", "CompleteTree",
"CompleteTripartite", "Cone", "Conference", "Connected",
"CriticalNonplanar", "CrossedPrism", "Crown", "CubeConnectedCycle",
"Cubic", "Cycle", "Cyclic", "Cyclotomic", "DeterminedByResistance",
"DeterminedBySpectrum", "Disconnected", "DistanceRegular",
"DistanceTransitive", "Doob", "DutchWindmill", "EdgeTransitive",
"Empty", "Eulerian", "Fan", "FibonacciCube", "Firecracker",
"Fiveleaper", "FoldedCube", "Forest", "Fullerene", "Fusene", "Gear",
"GeneralizedPetersen", "GeneralizedPolygon", "Grid", "Haar",
"Hadamard", "Halin", "HalvedCube", "HamiltonConnected",
"HamiltonDecomposable", "Hamiltonian", "HamiltonLaceable", "Hamming",
"Hanoi", "Harary", "Helm", "HoneycombToroidal", "HStarConnected",
"Hypercube", "Hypohamiltonian", "Hypotraceable", "Identity",
"IGraph", "Imperfect", "Incidence", "Integral", "Johnson", "Keller",
"KempeCounterexample", "King", "Kneser", "Knight", "Kuratowski",
"Ladder", "LadderRung", "LCF", "Line", "Lobster", "Local",
"LocallyPetersen", "Lollipop", "Matchstick",
"MaximallyNonhamiltonian", "Median", "MengerSponge", "Metelsky",
"MoebiusLadder", "MongolianTent", "Moore", "Mycielski", "Noncayley",
"Nonempty", "Noneulerian", "Nonhamiltonian", "Nonplanar",
"Nonsimple", "NoPerfectMatching", "NotDeterminedByResistance",
"NotDeterminedBySpectrum", "Nuciferous", "Octic", "Odd", "Ore",
"Paley", "Pan", "Pancyclic", "Path", "Paulus", "Perfect",
"PerfectMatching", "PermutationStar", "Planar", "Platonic",
"Polyhedral", "Polyiamond", "Polyomino", "Prism", "Pseudoforest",
"Pseudotree", "Quartic", "Queen", "Quintic", "Regular",
"RegularPolychoron", "Rook", "RookComplement", "SelfComplementary",
"SelfDual", "Semisymmetric", "Septic", "Sextic", "SierpinskiCarpet",
"SierpinskiSieve", "SierpinskiTetrahedron", "Simple", "Snark",
"Spider", "SquareFree", "StackedBook", "StackedPrism", "Star",
"StronglyPerfect", "StronglyRegular", "Sun", "Sunlet", "Symmetric",
"Tadpole", "Taylor", "Tetrahedral", "Toroidal", "TorusGrid",
"Traceable", "Transposition", "Tree", "TriangleFree", "Triangular",
"TriangularGrid", "TriangularHoneycombAcuteKnight",
"TriangularHoneycombBishop", "TriangularHoneycombKing",
"TriangularHoneycombObtuseKnight", "TriangularHoneycombQueen",
"TriangularHoneycombRook", "Triangulated", "Tripod", "Turan",
"TwoRegular", "Unicyclic", "UnitDistance", "Untraceable",
"VertexTransitive", "WeaklyPerfect", "WeaklyRegular", "Web",
"WellCovered", "Wheel", "WhiteBishop", "Windmill", "Wreath",
"ZeroSymmetric", "ZeroTwo"}



And here's the labelling TriangularHoneycombAcuteKnight graph with 10 vertices (to take one of millions of examples).



enter image description here



And on and on and on and on....






share|cite|improve this answer











$endgroup$













  • $begingroup$
    This is neither complete (for any interesting $n$) nor in any real sense a database of labeled graphs. (Or else it is a database of labeled graphs, but a far more incomplete one; e.g., it contains only one cycle graph on $n$ vertices out of all $frac{(n-1)!}{2}$ possibilities.)
    $endgroup$
    – Misha Lavrov
    Dec 31 '18 at 19:18












  • $begingroup$
    The figure was, of course, a subset of the graphs. Of course. And labelling is trivial. (I'll update the answer in a moment.)
    $endgroup$
    – David G. Stork
    Dec 31 '18 at 19:22










  • $begingroup$
    I am not speaking about the figure; the actual GraphData database is incomplete - intentially so, since it only focuses on "interesting" graphs.
    $endgroup$
    – Misha Lavrov
    Dec 31 '18 at 19:49












  • $begingroup$
    You can generate any graph with $n$ vertexes.
    $endgroup$
    – David G. Stork
    Dec 31 '18 at 19:52










  • $begingroup$
    Yes, so the correct answer is Graph[Range[n], #] & /@ Subsets[UndirectedEdge @@@ Subsets[Range[n], {2}]]. The mention of GraphData is a red herring.
    $endgroup$
    – Misha Lavrov
    Dec 31 '18 at 19:53
















1












1








1





$begingroup$

For completeness, @MishaLavrov has a solution (below), which with slight modification gives the labeled graphs:



Graph[Range[n], #, VertexLabels->Automatic] & /@ Subsets[UndirectedEdge @@@ Subsets[Range[n], {2}]]


So if n=3 we get



enter image description here



Moreover, Mathematica has a curated database of graphs (GraphData), with excellent tools for creating and classifying them:



enter image description here



Here's just a list of the graph classes:



{"Acyclic", "AlmostHamiltonian", "AlternatingGroup", "Andrasfai",
"Antelope", "Antiprism", "Apex", "Apollonian", "Archimedean",
"ArchimedeanDual", "ArcTransitive", "Arrangement", "Asymmetric",
"BananaTree", "Barbell", "Beineke", "Bicolorable", "Biconnected",
"Bicubic", "Bipartite", "BipartiteKneser", "Bishop", "BlackBishop",
"Book", "Bouwer", "Bridged", "Bridgeless", "Cactus", "Cage",
"Caterpillar", "Caveman", "Cayley", "Centipede", "Chang", "Chordal",
"Chordless", "ChromaticallyNonunique", "ChromaticallyUnique",
"Circulant", "Class1", "Class2", "ClawFree", "CocktailParty",
"Complete", "CompleteBipartite", "CompletelyRegular", "CompleteTree",
"CompleteTripartite", "Cone", "Conference", "Connected",
"CriticalNonplanar", "CrossedPrism", "Crown", "CubeConnectedCycle",
"Cubic", "Cycle", "Cyclic", "Cyclotomic", "DeterminedByResistance",
"DeterminedBySpectrum", "Disconnected", "DistanceRegular",
"DistanceTransitive", "Doob", "DutchWindmill", "EdgeTransitive",
"Empty", "Eulerian", "Fan", "FibonacciCube", "Firecracker",
"Fiveleaper", "FoldedCube", "Forest", "Fullerene", "Fusene", "Gear",
"GeneralizedPetersen", "GeneralizedPolygon", "Grid", "Haar",
"Hadamard", "Halin", "HalvedCube", "HamiltonConnected",
"HamiltonDecomposable", "Hamiltonian", "HamiltonLaceable", "Hamming",
"Hanoi", "Harary", "Helm", "HoneycombToroidal", "HStarConnected",
"Hypercube", "Hypohamiltonian", "Hypotraceable", "Identity",
"IGraph", "Imperfect", "Incidence", "Integral", "Johnson", "Keller",
"KempeCounterexample", "King", "Kneser", "Knight", "Kuratowski",
"Ladder", "LadderRung", "LCF", "Line", "Lobster", "Local",
"LocallyPetersen", "Lollipop", "Matchstick",
"MaximallyNonhamiltonian", "Median", "MengerSponge", "Metelsky",
"MoebiusLadder", "MongolianTent", "Moore", "Mycielski", "Noncayley",
"Nonempty", "Noneulerian", "Nonhamiltonian", "Nonplanar",
"Nonsimple", "NoPerfectMatching", "NotDeterminedByResistance",
"NotDeterminedBySpectrum", "Nuciferous", "Octic", "Odd", "Ore",
"Paley", "Pan", "Pancyclic", "Path", "Paulus", "Perfect",
"PerfectMatching", "PermutationStar", "Planar", "Platonic",
"Polyhedral", "Polyiamond", "Polyomino", "Prism", "Pseudoforest",
"Pseudotree", "Quartic", "Queen", "Quintic", "Regular",
"RegularPolychoron", "Rook", "RookComplement", "SelfComplementary",
"SelfDual", "Semisymmetric", "Septic", "Sextic", "SierpinskiCarpet",
"SierpinskiSieve", "SierpinskiTetrahedron", "Simple", "Snark",
"Spider", "SquareFree", "StackedBook", "StackedPrism", "Star",
"StronglyPerfect", "StronglyRegular", "Sun", "Sunlet", "Symmetric",
"Tadpole", "Taylor", "Tetrahedral", "Toroidal", "TorusGrid",
"Traceable", "Transposition", "Tree", "TriangleFree", "Triangular",
"TriangularGrid", "TriangularHoneycombAcuteKnight",
"TriangularHoneycombBishop", "TriangularHoneycombKing",
"TriangularHoneycombObtuseKnight", "TriangularHoneycombQueen",
"TriangularHoneycombRook", "Triangulated", "Tripod", "Turan",
"TwoRegular", "Unicyclic", "UnitDistance", "Untraceable",
"VertexTransitive", "WeaklyPerfect", "WeaklyRegular", "Web",
"WellCovered", "Wheel", "WhiteBishop", "Windmill", "Wreath",
"ZeroSymmetric", "ZeroTwo"}



And here's the labelling TriangularHoneycombAcuteKnight graph with 10 vertices (to take one of millions of examples).



enter image description here



And on and on and on and on....






share|cite|improve this answer











$endgroup$



For completeness, @MishaLavrov has a solution (below), which with slight modification gives the labeled graphs:



Graph[Range[n], #, VertexLabels->Automatic] & /@ Subsets[UndirectedEdge @@@ Subsets[Range[n], {2}]]


So if n=3 we get



enter image description here



Moreover, Mathematica has a curated database of graphs (GraphData), with excellent tools for creating and classifying them:



enter image description here



Here's just a list of the graph classes:



{"Acyclic", "AlmostHamiltonian", "AlternatingGroup", "Andrasfai",
"Antelope", "Antiprism", "Apex", "Apollonian", "Archimedean",
"ArchimedeanDual", "ArcTransitive", "Arrangement", "Asymmetric",
"BananaTree", "Barbell", "Beineke", "Bicolorable", "Biconnected",
"Bicubic", "Bipartite", "BipartiteKneser", "Bishop", "BlackBishop",
"Book", "Bouwer", "Bridged", "Bridgeless", "Cactus", "Cage",
"Caterpillar", "Caveman", "Cayley", "Centipede", "Chang", "Chordal",
"Chordless", "ChromaticallyNonunique", "ChromaticallyUnique",
"Circulant", "Class1", "Class2", "ClawFree", "CocktailParty",
"Complete", "CompleteBipartite", "CompletelyRegular", "CompleteTree",
"CompleteTripartite", "Cone", "Conference", "Connected",
"CriticalNonplanar", "CrossedPrism", "Crown", "CubeConnectedCycle",
"Cubic", "Cycle", "Cyclic", "Cyclotomic", "DeterminedByResistance",
"DeterminedBySpectrum", "Disconnected", "DistanceRegular",
"DistanceTransitive", "Doob", "DutchWindmill", "EdgeTransitive",
"Empty", "Eulerian", "Fan", "FibonacciCube", "Firecracker",
"Fiveleaper", "FoldedCube", "Forest", "Fullerene", "Fusene", "Gear",
"GeneralizedPetersen", "GeneralizedPolygon", "Grid", "Haar",
"Hadamard", "Halin", "HalvedCube", "HamiltonConnected",
"HamiltonDecomposable", "Hamiltonian", "HamiltonLaceable", "Hamming",
"Hanoi", "Harary", "Helm", "HoneycombToroidal", "HStarConnected",
"Hypercube", "Hypohamiltonian", "Hypotraceable", "Identity",
"IGraph", "Imperfect", "Incidence", "Integral", "Johnson", "Keller",
"KempeCounterexample", "King", "Kneser", "Knight", "Kuratowski",
"Ladder", "LadderRung", "LCF", "Line", "Lobster", "Local",
"LocallyPetersen", "Lollipop", "Matchstick",
"MaximallyNonhamiltonian", "Median", "MengerSponge", "Metelsky",
"MoebiusLadder", "MongolianTent", "Moore", "Mycielski", "Noncayley",
"Nonempty", "Noneulerian", "Nonhamiltonian", "Nonplanar",
"Nonsimple", "NoPerfectMatching", "NotDeterminedByResistance",
"NotDeterminedBySpectrum", "Nuciferous", "Octic", "Odd", "Ore",
"Paley", "Pan", "Pancyclic", "Path", "Paulus", "Perfect",
"PerfectMatching", "PermutationStar", "Planar", "Platonic",
"Polyhedral", "Polyiamond", "Polyomino", "Prism", "Pseudoforest",
"Pseudotree", "Quartic", "Queen", "Quintic", "Regular",
"RegularPolychoron", "Rook", "RookComplement", "SelfComplementary",
"SelfDual", "Semisymmetric", "Septic", "Sextic", "SierpinskiCarpet",
"SierpinskiSieve", "SierpinskiTetrahedron", "Simple", "Snark",
"Spider", "SquareFree", "StackedBook", "StackedPrism", "Star",
"StronglyPerfect", "StronglyRegular", "Sun", "Sunlet", "Symmetric",
"Tadpole", "Taylor", "Tetrahedral", "Toroidal", "TorusGrid",
"Traceable", "Transposition", "Tree", "TriangleFree", "Triangular",
"TriangularGrid", "TriangularHoneycombAcuteKnight",
"TriangularHoneycombBishop", "TriangularHoneycombKing",
"TriangularHoneycombObtuseKnight", "TriangularHoneycombQueen",
"TriangularHoneycombRook", "Triangulated", "Tripod", "Turan",
"TwoRegular", "Unicyclic", "UnitDistance", "Untraceable",
"VertexTransitive", "WeaklyPerfect", "WeaklyRegular", "Web",
"WellCovered", "Wheel", "WhiteBishop", "Windmill", "Wreath",
"ZeroSymmetric", "ZeroTwo"}



And here's the labelling TriangularHoneycombAcuteKnight graph with 10 vertices (to take one of millions of examples).



enter image description here



And on and on and on and on....







share|cite|improve this answer














share|cite|improve this answer



share|cite|improve this answer








edited Dec 31 '18 at 20:12

























answered Dec 31 '18 at 18:46









David G. StorkDavid G. Stork

11k41432




11k41432












  • $begingroup$
    This is neither complete (for any interesting $n$) nor in any real sense a database of labeled graphs. (Or else it is a database of labeled graphs, but a far more incomplete one; e.g., it contains only one cycle graph on $n$ vertices out of all $frac{(n-1)!}{2}$ possibilities.)
    $endgroup$
    – Misha Lavrov
    Dec 31 '18 at 19:18












  • $begingroup$
    The figure was, of course, a subset of the graphs. Of course. And labelling is trivial. (I'll update the answer in a moment.)
    $endgroup$
    – David G. Stork
    Dec 31 '18 at 19:22










  • $begingroup$
    I am not speaking about the figure; the actual GraphData database is incomplete - intentially so, since it only focuses on "interesting" graphs.
    $endgroup$
    – Misha Lavrov
    Dec 31 '18 at 19:49












  • $begingroup$
    You can generate any graph with $n$ vertexes.
    $endgroup$
    – David G. Stork
    Dec 31 '18 at 19:52










  • $begingroup$
    Yes, so the correct answer is Graph[Range[n], #] & /@ Subsets[UndirectedEdge @@@ Subsets[Range[n], {2}]]. The mention of GraphData is a red herring.
    $endgroup$
    – Misha Lavrov
    Dec 31 '18 at 19:53




















  • $begingroup$
    This is neither complete (for any interesting $n$) nor in any real sense a database of labeled graphs. (Or else it is a database of labeled graphs, but a far more incomplete one; e.g., it contains only one cycle graph on $n$ vertices out of all $frac{(n-1)!}{2}$ possibilities.)
    $endgroup$
    – Misha Lavrov
    Dec 31 '18 at 19:18












  • $begingroup$
    The figure was, of course, a subset of the graphs. Of course. And labelling is trivial. (I'll update the answer in a moment.)
    $endgroup$
    – David G. Stork
    Dec 31 '18 at 19:22










  • $begingroup$
    I am not speaking about the figure; the actual GraphData database is incomplete - intentially so, since it only focuses on "interesting" graphs.
    $endgroup$
    – Misha Lavrov
    Dec 31 '18 at 19:49












  • $begingroup$
    You can generate any graph with $n$ vertexes.
    $endgroup$
    – David G. Stork
    Dec 31 '18 at 19:52










  • $begingroup$
    Yes, so the correct answer is Graph[Range[n], #] & /@ Subsets[UndirectedEdge @@@ Subsets[Range[n], {2}]]. The mention of GraphData is a red herring.
    $endgroup$
    – Misha Lavrov
    Dec 31 '18 at 19:53


















$begingroup$
This is neither complete (for any interesting $n$) nor in any real sense a database of labeled graphs. (Or else it is a database of labeled graphs, but a far more incomplete one; e.g., it contains only one cycle graph on $n$ vertices out of all $frac{(n-1)!}{2}$ possibilities.)
$endgroup$
– Misha Lavrov
Dec 31 '18 at 19:18






$begingroup$
This is neither complete (for any interesting $n$) nor in any real sense a database of labeled graphs. (Or else it is a database of labeled graphs, but a far more incomplete one; e.g., it contains only one cycle graph on $n$ vertices out of all $frac{(n-1)!}{2}$ possibilities.)
$endgroup$
– Misha Lavrov
Dec 31 '18 at 19:18














$begingroup$
The figure was, of course, a subset of the graphs. Of course. And labelling is trivial. (I'll update the answer in a moment.)
$endgroup$
– David G. Stork
Dec 31 '18 at 19:22




$begingroup$
The figure was, of course, a subset of the graphs. Of course. And labelling is trivial. (I'll update the answer in a moment.)
$endgroup$
– David G. Stork
Dec 31 '18 at 19:22












$begingroup$
I am not speaking about the figure; the actual GraphData database is incomplete - intentially so, since it only focuses on "interesting" graphs.
$endgroup$
– Misha Lavrov
Dec 31 '18 at 19:49






$begingroup$
I am not speaking about the figure; the actual GraphData database is incomplete - intentially so, since it only focuses on "interesting" graphs.
$endgroup$
– Misha Lavrov
Dec 31 '18 at 19:49














$begingroup$
You can generate any graph with $n$ vertexes.
$endgroup$
– David G. Stork
Dec 31 '18 at 19:52




$begingroup$
You can generate any graph with $n$ vertexes.
$endgroup$
– David G. Stork
Dec 31 '18 at 19:52












$begingroup$
Yes, so the correct answer is Graph[Range[n], #] & /@ Subsets[UndirectedEdge @@@ Subsets[Range[n], {2}]]. The mention of GraphData is a red herring.
$endgroup$
– Misha Lavrov
Dec 31 '18 at 19:53






$begingroup$
Yes, so the correct answer is Graph[Range[n], #] & /@ Subsets[UndirectedEdge @@@ Subsets[Range[n], {2}]]. The mention of GraphData is a red herring.
$endgroup$
– Misha Lavrov
Dec 31 '18 at 19:53




















draft saved

draft discarded




















































Thanks for contributing an answer to Mathematics Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


Use MathJax to format equations. MathJax reference.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3057923%2fdatabase-of-labelled-simple-graphs-on-n-vertices%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Ellipse (mathématiques)

Quarter-circle Tiles

Mont Emei