I'm developing a c++ program which calculate and draw all possible connected planar graphs with given E number edge. Like this :
My first thought was to find all possible solutions for the N edge by adding one edge to after finding the answer to (n-1) by doing recursion.
As you can see in the picture, the solution of the problem n = 4 is basically an improved version of the solution n = 3 with one edge more.
But it did not feel like a very effective solution. I could not find this problem in a particular algorithm.
is there any other way of finding and drawing all possible connected planar graphs with E edge?