I need help with Wriring a program (in any programming language) that gets as
input a positive integer and generates all possible connected sub-graphs of size .
For example: 3 node graphs can have 13 possible combinations which are: https://i.stack.imgur.com/8DVpj.png
The output should be a textual file of the following form:
for example:
n=2
count=2
"#"1:
1 2
"#"2:
1 2
2 1
The first two lines output n and the total number (count) of different sub-graphs of size n.
Then the sub-graphs themselves are given each starting with a line labelled #k for sub-graph number followed by all edges, each line i j means an edge from source i to target j.