Ask Your Question

Revision history [back]

Testing planarity on embedding gives wrong result

Hi, i've got planar embedding of K_4 which is not planar, but when I test it with is_planar(on_embeding=emb), it says that it is planar. Code:

g = graphs.CompleteGraph(4)
g.is_planar(set_embedding=True)
True
emb = {0 : [2,3,1], 1: [2,3,0], 2: [1,3,0], 3:[0,1,2]}
g.is_planar(on_embedding=emb)
True

So, what am I doing wrong?

Testing planarity on embedding gives wrong result

Hi, i've got planar embedding of K_4 which is not planar, but when I test it with is_planar(on_embeding=emb), it says that it is planar. Code:

g = graphs.CompleteGraph(4)
g.is_planar(set_embedding=True)
True
emb = {0 : [2,3,1], 1: [2,3,0], 2: [1,3,0], 3:[0,1,2]}
g.is_planar(on_embedding=emb)
True

So, what am I doing wrong?