Skip to contents

graph_from_atlas() creates graphs from the book ‘An Atlas of Graphs’ by Roland C. Read and Robin J. Wilson. The atlas contains all undirected graphs with up to seven vertices, numbered from 0 up to 1252. The graphs are listed:

  1. in increasing order of number of nodes;

  2. for a fixed number of nodes, in increasing order of the number of edges;

  3. for fixed numbers of nodes and edges, in increasing order of the degree sequence, for example 111223 < 112222;

  4. for fixed degree sequence, in increasing number of automorphisms.

Usage

graph_from_atlas(n)

atlas(n)

Arguments

n

The ID of the graph to create.

Value

An igraph graph.

atlas()

Examples

## Some randomly picked graphs from the atlas
graph_from_atlas(sample(0:1252, 1))
#> ── <igraph> Graph from the Atlas #464 ─────────────────────────────── 19c4eee ──
#>  undirected
#>  7 vertices · 9 edges
#> 
#> ── Attributes ──────────────────────────────────────────────────────────────────
#> → graph:  name <chr>, n <dbl>
#> 
#> ── Edges ───────────────────────────────────────────────────────────────────────
#> [1] 2 ─ 4  2 ─ 3  1 ─ 3  1 ─ 6  5 ─ 6  4 ─ 5  3 ─ 4  1 ─ 4  1 ─ 5 
graph_from_atlas(sample(0:1252, 1))
#> ── <igraph> Graph from the Atlas #139 ─────────────────────────────── b55f492 ──
#>  undirected
#>  6 vertices · 8 edges
#> 
#> ── Attributes ──────────────────────────────────────────────────────────────────
#> → graph:  name <chr>, n <dbl>
#> 
#> ── Edges ───────────────────────────────────────────────────────────────────────
#> [1] 1 ─ 2  2 ─ 3  3 ─ 4  4 ─ 5  1 ─ 5  2 ─ 4  2 ─ 5  1 ─ 6