# How to change the bipartite into a normal form

If we have a bipartite,we can change its form into a normal form like this

g1 = GraphData[{8, 579}] Graph[g1, GraphLayout -> "BipartiteEmbedding", VertexLabels -> "Name"] But in this graph this method does not work

g = GraphData[{"CubicTransitive", 20}] Graph[g, GraphLayout -> "BipartiteEmbedding", VertexLabels -> "Name"] But we can see this two both is bipartite

BipartiteGraphQ /@ {g1, g}


{True, True}

And you can find a lot of graph cannot convert into "normal form" like this

{Graph[GraphData[#], GraphLayout -> "BipartiteEmbedding",
VertexLabels -> "Name"]} & /@ GraphData["Bipartite"][[;; ;; 100]]


Is a bug of Mathematica??

• Using EdgelList@g rather than g as the first argument, i.e., Graph[EdgeList@g, GraphLayout -> "BipartiteEmbedding", VertexLabels -> "Name"] gives what is expected.
– kglr
Apr 6 '16 at 18:15
• @kglr It seem I post a ridiculous post.If you don't mind,I'll delete this post.:). But why we can change the g1 like that?
– yode
Apr 6 '16 at 18:21
• it is indeed puzzling that Graph[g1, ...] works in version 10 (it doesn't in v9).
– kglr
Apr 6 '16 at 18:41

GraphData[{"CubicTransitive", 20}] sets VertexCoordinates and VertexCoordinates has higher priority than GraphLayout (options section in Graph documentation).

g = GraphData[{"CubicTransitive", 20}];
Options[g]


{VertexCoordinates -> {{1., 0.}, {0.5, 0.866}, {-0.5, 0.866}, {-1., 0.}, {-0.5, -0.866}, {0.5, -0.866}, {1.5, 0.}, {0.75, 1.299}, {-0.75, 1.299}, {-1.5, 0.}, {-0.75, -1.299}, {0.75, -1.299}, {2., 0.}, {1., 1.732}, {-1., 1.732}, {-2., 0.}, {-1., -1.732}, {1., -1.732}}}

g2 = Graph[g, GraphLayout -> "BipartiteEmbedding",
VertexLabels -> "Name"];

Options[g2]


{GraphLayout -> {"Dimension" -> 2, "VertexLayout" -> "BipartiteEmbedding"}, VertexCoordinates -> {{1., 0.}, {0.5, 0.866}, {-0.5, 0.866}, {-1., 0.}, {-0.5, -0.866}, {0.5, -0.866}, {1.5, 0.}, {0.75, 1.299}, {-0.75, 1.299}, {-1.5, 0.}, {-0.75, -1.299}, {0.75, -1.299}, {2., 0.}, {1., 1.732}, {-1., 1.732}, {-2., 0.}, {-1., -1.732}, {1., -1.732}}, VertexLabels -> {"Name"}}