Values
=>
Cc0020;cc-rep
([],3)=>3
([(1,2)],3)=>2
([(0,2),(1,2)],3)=>1
([(0,1),(0,2),(1,2)],3)=>0
([],4)=>4
([(2,3)],4)=>3
([(1,3),(2,3)],4)=>2
([(0,3),(1,3),(2,3)],4)=>2
([(0,3),(1,2)],4)=>2
([(0,3),(1,2),(2,3)],4)=>1
([(1,2),(1,3),(2,3)],4)=>2
([(0,3),(1,2),(1,3),(2,3)],4)=>1
([(0,2),(0,3),(1,2),(1,3)],4)=>0
([(0,2),(0,3),(1,2),(1,3),(2,3)],4)=>0
([(0,1),(0,2),(0,3),(1,2),(1,3),(2,3)],4)=>0
([],5)=>5
([(3,4)],5)=>4
([(2,4),(3,4)],5)=>3
([(1,4),(2,4),(3,4)],5)=>3
([(0,4),(1,4),(2,4),(3,4)],5)=>3
([(1,4),(2,3)],5)=>3
([(1,4),(2,3),(3,4)],5)=>2
([(0,1),(2,4),(3,4)],5)=>2
([(2,3),(2,4),(3,4)],5)=>3
([(0,4),(1,4),(2,3),(3,4)],5)=>2
([(1,4),(2,3),(2,4),(3,4)],5)=>2
([(0,4),(1,4),(2,3),(2,4),(3,4)],5)=>2
([(1,3),(1,4),(2,3),(2,4)],5)=>2
([(0,4),(1,2),(1,3),(2,4),(3,4)],5)=>1
([(1,3),(1,4),(2,3),(2,4),(3,4)],5)=>2
([(0,4),(1,3),(2,3),(2,4),(3,4)],5)=>1
([(0,4),(1,3),(1,4),(2,3),(2,4),(3,4)],5)=>1
([(0,3),(0,4),(1,3),(1,4),(2,3),(2,4)],5)=>1
([(0,3),(0,4),(1,3),(1,4),(2,3),(2,4),(3,4)],5)=>1
([(0,4),(1,3),(2,3),(2,4)],5)=>1
([(0,1),(2,3),(2,4),(3,4)],5)=>2
([(0,3),(1,2),(1,4),(2,4),(3,4)],5)=>1
([(0,3),(0,4),(1,2),(1,4),(2,4),(3,4)],5)=>1
([(0,3),(0,4),(1,2),(1,4),(2,3)],5)=>0
([(0,1),(0,4),(1,3),(2,3),(2,4),(3,4)],5)=>0
([(0,3),(0,4),(1,2),(1,4),(2,3),(2,4),(3,4)],5)=>0
([(0,4),(1,2),(1,3),(2,3),(2,4),(3,4)],5)=>1
([(1,2),(1,3),(1,4),(2,3),(2,4),(3,4)],5)=>2
([(0,4),(1,2),(1,3),(1,4),(2,3),(2,4),(3,4)],5)=>1
([(0,3),(0,4),(1,2),(1,3),(1,4),(2,3),(2,4),(3,4)],5)=>0
([(0,3),(0,4),(1,2),(1,3),(1,4),(2,3),(2,4)],5)=>0
([(0,2),(0,3),(0,4),(1,2),(1,3),(1,4),(2,4),(3,4)],5)=>0
([(0,2),(0,3),(0,4),(1,2),(1,3),(1,4),(2,3),(2,4),(3,4)],5)=>0
([(0,1),(0,2),(0,3),(0,4),(1,2),(1,3),(1,4),(2,3),(2,4),(3,4)],5)=>0
([],6)=>6
([(4,5)],6)=>5
([(3,5),(4,5)],6)=>4
([(2,5),(3,5),(4,5)],6)=>4
([(1,5),(2,5),(3,5),(4,5)],6)=>4
([(0,5),(1,5),(2,5),(3,5),(4,5)],6)=>4
([(2,5),(3,4)],6)=>4
([(2,5),(3,4),(4,5)],6)=>3
([(1,2),(3,5),(4,5)],6)=>3
([(3,4),(3,5),(4,5)],6)=>4
([(1,5),(2,5),(3,4),(4,5)],6)=>3
([(0,1),(2,5),(3,5),(4,5)],6)=>3
([(2,5),(3,4),(3,5),(4,5)],6)=>3
([(0,5),(1,5),(2,5),(3,4),(4,5)],6)=>3
([(1,5),(2,5),(3,4),(3,5),(4,5)],6)=>3
([(0,5),(1,5),(2,5),(3,4),(3,5),(4,5)],6)=>3
([(2,4),(2,5),(3,4),(3,5)],6)=>3
([(0,5),(1,5),(2,4),(3,4)],6)=>2
([(1,5),(2,3),(2,4),(3,5),(4,5)],6)=>2
([(0,5),(1,5),(2,3),(3,4),(4,5)],6)=>2
([(2,4),(2,5),(3,4),(3,5),(4,5)],6)=>3
([(1,5),(2,4),(3,4),(3,5),(4,5)],6)=>2
([(0,5),(1,5),(2,4),(3,4),(4,5)],6)=>2
([(0,5),(1,5),(2,3),(2,4),(3,5),(4,5)],6)=>2
([(1,5),(2,4),(2,5),(3,4),(3,5),(4,5)],6)=>2
([(0,5),(1,5),(2,4),(3,4),(3,5),(4,5)],6)=>2
([(0,5),(1,5),(2,4),(2,5),(3,4),(3,5),(4,5)],6)=>2
([(1,4),(1,5),(2,4),(2,5),(3,4),(3,5)],6)=>2
([(0,5),(1,4),(2,4),(2,5),(3,4),(3,5)],6)=>2
([(0,5),(1,4),(1,5),(2,4),(2,5),(3,4),(3,5)],6)=>2
([(1,4),(1,5),(2,4),(2,5),(3,4),(3,5),(4,5)],6)=>2
([(0,5),(1,4),(2,4),(2,5),(3,4),(3,5),(4,5)],6)=>2
([(0,5),(1,4),(1,5),(2,4),(2,5),(3,4),(3,5),(4,5)],6)=>2
([(0,4),(0,5),(1,4),(1,5),(2,4),(2,5),(3,4),(3,5)],6)=>2
([(0,4),(0,5),(1,4),(1,5),(2,4),(2,5),(3,4),(3,5),(4,5)],6)=>2
([(0,5),(1,4),(2,3)],6)=>3
([(1,5),(2,4),(3,4),(3,5)],6)=>2
([(0,1),(2,5),(3,4),(4,5)],6)=>2
([(1,2),(3,4),(3,5),(4,5)],6)=>3
([(0,5),(1,4),(2,3),(3,5),(4,5)],6)=>2
([(1,4),(2,3),(2,5),(3,5),(4,5)],6)=>2
([(0,1),(2,5),(3,4),(3,5),(4,5)],6)=>2
([(0,4),(1,5),(2,3),(2,5),(3,5),(4,5)],6)=>2
([(1,4),(1,5),(2,3),(2,5),(3,5),(4,5)],6)=>2
([(0,5),(1,4),(1,5),(2,3),(2,5),(3,5),(4,5)],6)=>2
([(1,4),(1,5),(2,3),(2,5),(3,4)],6)=>2
([(0,5),(1,4),(2,3),(2,4),(3,5),(4,5)],6)=>1
([(1,2),(1,5),(2,4),(3,4),(3,5),(4,5)],6)=>2
([(0,5),(1,2),(1,4),(2,3),(3,5),(4,5)],6)=>1
([(1,5),(2,3),(2,4),(3,4),(3,5),(4,5)],6)=>2
([(0,5),(1,4),(2,3),(3,4),(3,5),(4,5)],6)=>2
([(0,5),(1,2),(1,5),(2,4),(3,4),(3,5),(4,5)],6)=>1
([(0,5),(1,3),(2,4),(2,5),(3,4),(3,5),(4,5)],6)=>1
([(1,4),(1,5),(2,3),(2,5),(3,4),(3,5),(4,5)],6)=>2
([(0,5),(1,4),(1,5),(2,3),(2,5),(3,4),(3,5),(4,5)],6)=>1
([(0,5),(1,4),(2,3),(2,4),(3,5)],6)=>1
([(0,1),(2,4),(2,5),(3,4),(3,5)],6)=>2
([(0,5),(1,5),(2,3),(2,4),(3,4)],6)=>2
([(0,4),(1,2),(1,3),(2,5),(3,5),(4,5)],6)=>1
([(0,4),(1,2),(1,5),(2,5),(3,4),(3,5)],6)=>1
([(0,4),(1,2),(2,5),(3,4),(3,5),(4,5)],6)=>1
([(0,1),(2,4),(2,5),(3,4),(3,5),(4,5)],6)=>2
([(0,4),(1,4),(2,3),(2,5),(3,5),(4,5)],6)=>2
([(0,3),(0,4),(1,2),(1,5),(2,5),(3,5),(4,5)],6)=>1
([(0,3),(1,4),(1,5),(2,4),(2,5),(3,5),(4,5)],6)=>1
([(0,4),(1,2),(1,5),(2,5),(3,4),(3,5),(4,5)],6)=>1
([(0,1),(0,5),(1,5),(2,4),(2,5),(3,4),(3,5),(4,5)],6)=>1
([(2,3),(2,4),(2,5),(3,4),(3,5),(4,5)],6)=>3
([(0,5),(1,5),(2,3),(2,4),(3,4),(3,5),(4,5)],6)=>2
([(1,5),(2,3),(2,4),(2,5),(3,4),(3,5),(4,5)],6)=>2
([(0,5),(1,5),(2,3),(2,4),(2,5),(3,4),(3,5),(4,5)],6)=>2
([(0,1),(0,5),(1,4),(2,4),(2,5),(3,4),(3,5)],6)=>1
([(0,3),(0,5),(1,3),(1,5),(2,4),(2,5),(3,4),(4,5)],6)=>1
([(0,3),(1,4),(1,5),(2,4),(2,5),(3,4),(3,5),(4,5)],6)=>1
([(0,5),(1,4),(1,5),(2,3),(2,4),(3,4),(3,5),(4,5)],6)=>1
([(0,1),(0,5),(1,4),(2,4),(2,5),(3,4),(3,5),(4,5)],6)=>1
([(0,4),(0,5),(1,4),(1,5),(2,3),(2,5),(3,4),(3,5),(4,5)],6)=>1
([(0,5),(1,4),(1,5),(2,3),(2,4),(2,5),(3,4),(3,5)],6)=>1
([(1,4),(1,5),(2,3),(2,4),(2,5),(3,4),(3,5),(4,5)],6)=>2
([(0,5),(1,4),(2,3),(2,4),(2,5),(3,4),(3,5),(4,5)],6)=>1
([(0,5),(1,4),(1,5),(2,3),(2,4),(2,5),(3,4),(3,5),(4,5)],6)=>1
([(0,4),(0,5),(1,4),(1,5),(2,3),(2,4),(2,5),(3,4),(3,5)],6)=>1
([(0,4),(0,5),(1,4),(1,5),(2,3),(2,4),(2,5),(3,4),(3,5),(4,5)],6)=>1
([(0,5),(1,3),(1,4),(2,3),(2,4),(3,5),(4,5)],6)=>1
([(1,4),(1,5),(2,3),(2,4),(2,5),(3,4),(3,5)],6)=>2
([(0,5),(1,3),(1,4),(2,3),(2,4),(2,5),(3,5),(4,5)],6)=>1
([(1,3),(1,4),(1,5),(2,3),(2,4),(2,5),(3,5),(4,5)],6)=>2
([(0,5),(1,3),(1,4),(1,5),(2,3),(2,4),(2,5),(3,5),(4,5)],6)=>1
([(0,4),(0,5),(1,2),(1,3),(2,5),(3,4)],6)=>0
([(0,3),(0,5),(1,2),(1,5),(2,4),(3,4),(4,5)],6)=>0
([(0,5),(1,2),(1,4),(2,3),(3,4),(3,5),(4,5)],6)=>1
([(0,1),(0,2),(1,5),(2,4),(3,4),(3,5),(4,5)],6)=>0
([(0,5),(1,4),(2,3),(2,4),(2,5),(3,4),(3,5)],6)=>1
([(0,5),(1,3),(1,4),(2,4),(2,5),(3,4),(3,5)],6)=>1
([(0,1),(0,5),(1,3),(2,4),(2,5),(3,4),(3,5),(4,5)],6)=>0
([(0,4),(1,3),(1,5),(2,3),(2,4),(2,5),(3,5),(4,5)],6)=>1
([(0,4),(0,5),(1,3),(1,5),(2,3),(2,4),(3,5),(4,5)],6)=>0
([(0,4),(0,5),(1,3),(1,5),(2,3),(2,4),(2,5),(3,5),(4,5)],6)=>0
([(0,4),(0,5),(1,2),(1,3),(2,4),(2,5),(3,4),(3,5)],6)=>0
([(0,5),(1,2),(1,3),(1,4),(2,3),(2,4),(3,5),(4,5)],6)=>1
([(0,4),(0,5),(1,2),(1,3),(1,5),(2,4),(2,5),(3,4),(3,5)],6)=>0
([(0,4),(0,5),(1,2),(1,3),(2,4),(2,5),(3,4),(3,5),(4,5)],6)=>0
([(0,4),(0,5),(1,2),(1,3),(1,5),(2,4),(2,5),(3,4),(3,5),(4,5)],6)=>0
([(0,5),(1,2),(1,3),(1,4),(2,4),(2,5),(3,4),(3,5),(4,5)],6)=>1
([(1,3),(1,4),(1,5),(2,3),(2,4),(2,5),(3,4),(3,5),(4,5)],6)=>2
([(0,5),(1,3),(1,4),(2,3),(2,4),(2,5),(3,4),(3,5),(4,5)],6)=>1
([(0,5),(1,3),(1,4),(1,5),(2,3),(2,4),(2,5),(3,4),(3,5),(4,5)],6)=>1
([(0,4),(0,5),(1,2),(1,4),(2,3),(2,5),(3,4),(3,5),(4,5)],6)=>0
([(0,4),(0,5),(1,3),(1,5),(2,3),(2,4),(3,4),(3,5),(4,5)],6)=>0
([(0,4),(0,5),(1,3),(1,5),(2,3),(2,4),(2,5),(3,4),(3,5),(4,5)],6)=>0
([(0,4),(0,5),(1,3),(1,4),(1,5),(2,3),(2,4),(2,5),(3,4),(3,5),(4,5)],6)=>0
([(0,3),(0,4),(0,5),(1,3),(1,4),(1,5),(2,3),(2,4),(2,5)],6)=>0
([(0,1),(0,2),(0,3),(1,4),(1,5),(2,4),(2,5),(3,4),(3,5),(4,5)],6)=>0
([(0,4),(0,5),(1,3),(1,4),(1,5),(2,3),(2,4),(2,5),(3,4),(3,5)],6)=>0
([(0,3),(0,4),(0,5),(1,3),(1,4),(1,5),(2,3),(2,4),(2,5),(3,5),(4,5)],6)=>0
([(0,3),(0,4),(0,5),(1,3),(1,4),(1,5),(2,3),(2,4),(2,5),(3,4),(3,5),(4,5)],6)=>0
([(0,4),(0,5),(1,2),(1,3),(2,3),(4,5)],6)=>2
([(0,2),(1,4),(1,5),(2,3),(3,4),(3,5),(4,5)],6)=>1
([(0,1),(0,5),(1,5),(2,3),(2,4),(3,4),(4,5)],6)=>1
([(0,1),(2,3),(2,4),(2,5),(3,4),(3,5),(4,5)],6)=>2
([(0,1),(0,5),(1,5),(2,3),(2,4),(3,4),(3,5),(4,5)],6)=>1
([(0,1),(1,5),(2,3),(2,4),(2,5),(3,4),(3,5),(4,5)],6)=>1
([(0,1),(0,5),(1,5),(2,3),(2,4),(2,5),(3,4),(3,5),(4,5)],6)=>1
([(0,4),(0,5),(1,2),(1,3),(2,3),(2,5),(3,4),(4,5)],6)=>0
([(0,4),(0,5),(1,2),(1,3),(1,4),(2,3),(2,5),(3,5),(4,5)],6)=>0
([(0,3),(1,2),(1,4),(1,5),(2,4),(2,5),(3,4),(3,5),(4,5)],6)=>1
([(0,3),(0,5),(1,2),(1,4),(2,4),(2,5),(3,4),(3,5),(4,5)],6)=>0
([(0,1),(0,5),(1,4),(2,3),(2,4),(2,5),(3,4),(3,5),(4,5)],6)=>0
([(0,3),(0,5),(1,2),(1,4),(1,5),(2,4),(2,5),(3,4),(3,5),(4,5)],6)=>0
([(0,3),(0,4),(0,5),(1,2),(1,4),(1,5),(2,4),(2,5),(3,4),(3,5)],6)=>0
([(0,3),(0,4),(0,5),(1,2),(1,4),(1,5),(2,4),(2,5),(3,4),(3,5),(4,5)],6)=>0
([(0,4),(0,5),(1,3),(1,5),(2,3),(2,4),(2,5),(3,4)],6)=>0
([(0,1),(0,5),(1,4),(2,3),(2,4),(2,5),(3,4),(3,5)],6)=>0
([(0,3),(0,4),(1,2),(1,4),(1,5),(2,3),(2,5),(3,5),(4,5)],6)=>0
([(0,3),(0,4),(0,5),(1,2),(1,4),(1,5),(2,3),(2,5),(3,5),(4,5)],6)=>0
([(0,3),(0,4),(0,5),(1,2),(1,4),(1,5),(2,3),(2,5),(3,4)],6)=>0
([(0,1),(0,3),(0,5),(1,2),(1,4),(2,4),(2,5),(3,4),(3,5),(4,5)],6)=>0
([(0,4),(0,5),(1,2),(1,3),(1,5),(2,3),(2,4),(3,4),(3,5),(4,5)],6)=>0
([(0,1),(0,4),(0,5),(1,3),(1,5),(2,3),(2,4),(2,5),(3,4),(3,5),(4,5)],6)=>0
([(0,3),(0,4),(0,5),(1,2),(1,4),(1,5),(2,3),(2,4),(2,5),(3,4),(3,5),(4,5)],6)=>0
([(0,2),(0,5),(1,3),(1,4),(1,5),(2,3),(2,4),(3,4),(3,5),(4,5)],6)=>0
([(0,4),(0,5),(1,2),(1,3),(2,3),(2,4),(2,5),(3,4),(3,5),(4,5)],6)=>0
([(0,4),(0,5),(1,2),(1,3),(1,5),(2,3),(2,4),(2,5),(3,4),(3,5),(4,5)],6)=>0
([(0,5),(1,2),(1,3),(1,4),(2,3),(2,4),(2,5),(3,4),(3,5),(4,5)],6)=>1
([(1,2),(1,3),(1,4),(1,5),(2,3),(2,4),(2,5),(3,4),(3,5),(4,5)],6)=>2
([(0,5),(1,2),(1,3),(1,4),(1,5),(2,3),(2,4),(2,5),(3,4),(3,5),(4,5)],6)=>1
([(0,4),(0,5),(1,2),(1,3),(1,4),(1,5),(2,3),(2,4),(2,5),(3,4),(3,5),(4,5)],6)=>0
([(0,3),(0,4),(0,5),(1,2),(1,3),(1,4),(1,5),(2,3),(2,4),(2,5),(3,4),(3,5),(4,5)],6)=>0
([(0,3),(0,4),(0,5),(1,2),(1,4),(1,5),(2,3),(2,4),(2,5),(3,4),(3,5)],6)=>0
([(0,4),(0,5),(1,2),(1,3),(1,4),(1,5),(2,3),(2,4),(2,5),(3,4),(3,5)],6)=>0
([(0,1),(0,4),(0,5),(1,2),(1,3),(2,3),(2,4),(2,5),(3,4),(3,5),(4,5)],6)=>0
([(0,3),(0,4),(0,5),(1,2),(1,3),(1,4),(1,5),(2,3),(2,4),(2,5),(3,5),(4,5)],6)=>0
([(0,2),(0,3),(0,4),(0,5),(1,2),(1,3),(1,4),(1,5),(2,4),(2,5),(3,4),(3,5)],6)=>0
([(0,2),(0,3),(0,4),(0,5),(1,2),(1,3),(1,4),(1,5),(2,4),(2,5),(3,4),(3,5),(4,5)],6)=>0
([(0,2),(0,3),(0,4),(0,5),(1,2),(1,3),(1,4),(1,5),(2,3),(2,4),(2,5),(3,4),(3,5),(4,5)],6)=>0
([(0,1),(0,2),(0,3),(0,4),(0,5),(1,2),(1,3),(1,4),(1,5),(2,3),(2,4),(2,5),(3,4),(3,5),(4,5)],6)=>0
search for individual values
searching the database for the individual values of this statistic
/
search for generating function
searching the database for statistics with the same generating function
Description
The minimal number of edges to add to make a graph Hamiltonian.
A graph is Hamiltonian if it contains a cycle as a subgraph, which contains all vertices.
A graph is Hamiltonian if it contains a cycle as a subgraph, which contains all vertices.
Code
@cached_function def graph_of_graphs(n): """ sage: H = graph_of_graphs(4) sage: H.relabel(lambda g: tuple(g.edges(labels=False))) sage: H.show() """ lg1 = [(i, g.canonical_label().copy(immutable=True)) for i, g in enumerate(graphs(n))] lg2 = {g: i for i, g in lg1} lg1 = dict(lg1) H = Graph(len(lg1)) for g in lg2: h = g.copy(immutable=False) for e in g.edges(labels=False): h.delete_edge(e) g2 = h.copy().canonical_label().copy(immutable=true) H.add_edge([lg2[g], lg2[g2]]) h.add_edge(e) H.relabel(lambda i: lg1[i]) return H def statistic(g): mn = g.num_verts() G = graph_of_graphs(g.num_verts()) g = g.canonical_label().copy(immutable=True) for h in G.vertices(sort=False): if h.copy(immutable=False).is_hamiltonian(): mn = min(mn, G.shortest_path_length(g, h)) if mn == 0: return mn return mn
Created
Jul 23, 2020 at 12:49 by Martin Rubey
Updated
Dec 23, 2020 at 11:53 by Martin Rubey
searching the database
Sorry, this statistic was not found in the database
or
add this statistic to the database – it's very simple and we need your support!