How can I generate all labelled connected simple graphs on
In the image below, I drew examples with number of vertices
n = 3 and
n = 4.
n = 3, there are only 4 graphs that connect all vertices.
n = 4, I only drew some as there are many more so did not draw all here.
I would like to create a function that if I input the number of vertices then it generates all graphs like the image below.
Any idea to do this?
The layout of graphs is not important but I want to label vertices's names with number or letters. Self-loop is not possible and there is only one edge between two vertices.