First time here? Check out the FAQ!

Ask Your Question
0

Generate multigraphs with given underlying graph

asked 1 year ago

licheng gravatar image

updated 1 year ago

Given an underlying graph G, to obtain all non-isomorphic directed graphs, I know that nauty has the directg function, and such function was been integrated in sagemath.

Read undirected loop-free graphs and replace their edges with multiple. Nauty's multigcan achieve this. (Isomorphic multigraphs derived from the same input are suppressed. If the input graphs are non-isomorphic then the output graphs are also.) ; see https://www.mankier.com/1/nauty-multi...

Does SageMath have similar functionality, or is such functionality integrated?

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
1

answered 1 year ago

Max Alekseyev gravatar image

Check the source code for function graphs.nauty_geng() by running

??graphs.nauty_geng

and write a similar function that calls Nauty's multig rather than geng.

Preview: (hide)
link

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

Asked: 1 year ago

Seen: 351 times

Last updated: Dec 16 '23