Ask Your Question
3

How do I implement plantri in sagemath

asked 2016-10-03 22:27:12 +0100

fieldofnodes gravatar image

I am using sagemath -7.3 and I have recently added the package "plantri-4.5" to my packages.

I want to generate all planar graphs that have connectivity (κ=3). I want to have an initial graph G0 with 4 vertices, which we know is the complete graph on 4 vertices (K_4).

Then, I want all planar graphs on 4 vertices that is 3−connected.

Then, I want all planar graphs on 5 vertices that is 3−connected.

Than, I want all planar graphs on 6 vertices that is 3−connected.

I would like to ensure that I am actually obtaining ALL graphs that have the above criteria.

My goal is to obtain up to n=15,all planar graphs of connectivity, κ=3. I mean of course vertex connectivity as well.

I have been looking at Plantri as a way to do this, as they claim to have this ability.

Though I am having issues actually using this program within the sage terminal (Linux: Ubuntu base with cinnamon 16.0).

Does anyone have any suggestions on how to use plantri in the sage environment?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
2

answered 2016-10-03 23:01:15 +0100

tmonteil gravatar image

plantri is integrated to Sage via the graphs.planar_graphs generator, see the following for the documentation:

sage: graphs.planar_graphs?

In your case, you can iterate like this:

sage: for G in graphs.planar_graphs(6, minimum_connectivity=3):
....:     plot(G)

You can check:

sage: list(graphs.planar_graphs(4, minimum_connectivity=3))[0].is_isomorphic(graphs.CompleteGraph(4))
True
edit flag offensive delete link more

Comments

EXCELLENT!!! I did what you said, works great.

fieldofnodes gravatar imagefieldofnodes ( 2016-10-04 20:24:50 +0100 )edit

Great !

tmonteil gravatar imagetmonteil ( 2016-10-04 21:10:13 +0100 )edit

So I had this working, but had to change computers. Now I get this error:

TypeError: the optional plantri package is not installed

Then when I try sage -i plantri in

jonathan@Field-Phys-Math ~/SageMath $ sage -i plantri
make: *** No rule to make target 'all-toolchain'.  Stop.

My version is SageMath version 7.5.1, Release Date: 2017-01-15

What is the deal?

fieldofnodes gravatar imagefieldofnodes ( 2017-04-18 18:11:15 +0100 )edit

@fieldofnodes I'm having the same issue now, as well!

brendansullivan07 gravatar imagebrendansullivan07 ( 2017-05-15 21:53:36 +0100 )edit

@fieldofnodes I submitted a Support Request to SageMath Cloud about this and received a response today. Someone said that the plantri package was somehow not installed but it has been fixed. Now, this works for me.

brendansullivan07 gravatar imagebrendansullivan07 ( 2017-05-16 18:09:08 +0100 )edit

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: 2016-10-03 22:27:12 +0100

Seen: 807 times

Last updated: Oct 03 '16