Ask Your Question
0

Error in drawing the complement of CompleteBipartite Graph

asked 2019-01-09 16:02:43 +0200

updated 2019-01-10 19:50:13 +0200

slelievre gravatar image

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

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-01-10 19:49:53 +0200

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')
edit flag offensive delete link more

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: 2019-01-09 16:02:43 +0200

Seen: 197 times

Last updated: Jan 10 '19