Ask Your Question

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

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: Gc = G.complement()
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


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

Seen: 172 times

Last updated: Jan 10 '19