Ask Your Question
1

constructing random connected graph

asked 2017-10-01 10:58:31 -0600

A gravatar image

How one can construct all possible simple connected graphs on a given number of vertices?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2017-10-01 12:12:43 -0600

tmonteil gravatar image

You can use graphs.nauty_geng, for example, if you want to iterate over all connected graphs of length 7, you can do:

  sage: gen = graphs.nauty_geng("7 -c")
  sage: for g in gen:
  ....:     do some stuff with g

See graphs.nauty_geng? for more details.

edit flag offensive delete link more

Comments

Thanks for reply

A gravatar imageA ( 2017-10-01 12:40:35 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2017-10-01 10:58:31 -0600

Seen: 67 times

Last updated: Oct 01