First time here? Check out the FAQ!

Ask Your Question
0

Error in drawing the complement of CompleteBipartite Graph

asked 6 years ago

Parvath gravatar image

updated 6 years ago

slelievre gravatar image

The following code generates the wrong Graph graphs.CompleteBipartiteGraph(5,6).complement() Can anyone help to correct it please

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
0

answered 6 years ago

slelievre gravatar image

The first comment of

explains that the complement graph looks wrong only because it is plotted with the same layout as the original graph, so its edges are all horizontal, drawn on top of each other, making the drawing misleading (it looks as though many edges are missing).

To see the structure of the complement better, change the layout:

sage: G = graphs.CompleteBipartiteGraph(5, 6)
sage: G.show()

sage: Gc = G.complement()
sage: Gc.show(layout='spring')
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: 6 years ago

Seen: 492 times

Last updated: Jan 10 '19