Ask Your Question
1

How to create random cubic planar graphs?

asked 8 years ago

stefanutti gravatar image

Hi,

I need to create random cubic planar graphs.

Do you know how can I do that?

Or alternatively, do you know a can create the dual of a random planar triangulation?

I saw that I can create triangulation using:

G = graphs.RandomTriangulation(n)

Bye and thanks

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
2

answered 8 years ago

FrédéricC gravatar image

Use the flip graph of the random two sphere.

Something like:

simplicial_complexes.RandomTwoSphere(66).flip_graph()
Preview: (hide)
link

Comments

I haven't found the RandomTwoSphere into the simplicial_complexes. Is it something new?

AttributeError: 'module' object has no attribute 'RandomTwoSphere'

I tried with import but that does't work either.

stefanutti gravatar imagestefanutti ( 8 years ago )
FrédéricC gravatar imageFrédéricC ( 8 years ago )

G = simplicial_complexes.RandomTwoSphere(5).flip_graph() Using G.edges() it returns this: [((0, 1, 2), (0, 1, 'b'), None), ((0, 1, 2), (0, 2, 'a'), None), ((0, 1, 2), (1, 2, 'a'), None), ((0, 1, 'b'), (0, 'a', 'b'), None), ((0, 1, 'b'), (1, 'a', 'b'), None), ((0, 2, 'a'), (0, 'a', 'b'), None), ((0, 2, 'a'), (1, 2, 'a'), None), ((0, 'a', 'b'), (1, 'a', 'b'), None), ((1, 2, 'a'), (1, 'a', 'b'), None)]) But normally if I create the Graph manually (another Graph) it returns this: [(1, 2, '1-2'), (1, 5, '5-1'), (1, 6, '1-6'), (2, 3, '2-3'), (2, 10, '2-10'), (3, 4, '3-4'), (3, 12, '3-12'), (4, 5, '4-5'), (4, 11, '4-11'), (5, 7, '5-7'), (6, 7, '6-7'), (6, 8, '6-8'), (7, 9, '7-9'), (8, 9, '8-9'), (8, 10, '8-10'), (9, 11, '9-11'), (10, 12, '10-12'), (11, 12, '12-11')])

Do you know why it is diff?
stefanutti gravatar imagestefanutti ( 8 years ago )

I mean:

The first is: [ ( (),(), None), (),(), None), ...) ] The second is: [ (), (), ... ]

stefanutti gravatar imagestefanutti ( 8 years ago )

You can relabel the graph if you are not happy with the vertices being triangles.

FrédéricC gravatar imageFrédéricC ( 8 years ago )

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: 8 years ago

Seen: 732 times

Last updated: May 13 '16