ASKSAGE: Sage Q&A Forum - Individual question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 12 Jul 2020 16:06:12 -0500How do I implement plantri in sagemathhttps://ask.sagemath.org/question/35048/how-do-i-implement-plantri-in-sagemath/ 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?
Mon, 03 Oct 2016 15:27:12 -0500https://ask.sagemath.org/question/35048/how-do-i-implement-plantri-in-sagemath/Answer by tmonteil for <p>I am using sagemath -7.3 and I have recently added the package "plantri-4.5" to my packages.</p>
<p>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).</p>
<p>Then, I want all planar graphs on 4 vertices that is 3−connected.</p>
<p>Then, I want all planar graphs on 5 vertices that is 3−connected.</p>
<p>Than, I want all planar graphs on 6 vertices that is 3−connected.</p>
<p>I would like to ensure that I am actually obtaining ALL graphs that have the above criteria.</p>
<p>My goal is to obtain up to n=15,all planar graphs of connectivity, κ=3. I mean of course vertex connectivity as well.</p>
<p>I have been looking at Plantri as a way to do this, as they claim to have this ability.</p>
<p>Though I am having issues actually using this program within the sage terminal (Linux: Ubuntu base with cinnamon 16.0).</p>
<p>Does anyone have any suggestions on how to use plantri in the sage environment?</p>
https://ask.sagemath.org/question/35048/how-do-i-implement-plantri-in-sagemath/?answer=35050#post-id-35050`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
Mon, 03 Oct 2016 16:01:15 -0500https://ask.sagemath.org/question/35048/how-do-i-implement-plantri-in-sagemath/?answer=35050#post-id-35050Comment by slelievre for <p><code>plantri</code> is integrated to Sage via the <code>graphs.planar_graphs</code> generator, see the following for the documentation:</p>
<pre><code>sage: graphs.planar_graphs?
</code></pre>
<p>In your case, you can iterate like this:</p>
<pre><code>sage: for G in graphs.planar_graphs(6, minimum_connectivity=3):
....: plot(G)
</code></pre>
<p>You can check:</p>
<pre><code>sage: list(graphs.planar_graphs(4, minimum_connectivity=3))[0].is_isomorphic(graphs.CompleteGraph(4))
True
</code></pre>
https://ask.sagemath.org/question/35048/how-do-i-implement-plantri-in-sagemath/?comment=52445#post-id-52445@fieldofnodes - installing this package requires developer tools. To install:
- on Debian-based Linux:
$ sudo apt install binutils pixz gcc g++ gfortran make m4 perl tar python
- on Fedora-based Linux:
$ sudo yum install binutils xz gcc gcc-c++ gcc-gfortran make m4 perl tar python
- on macOS:
$ xcode-select --installSun, 12 Jul 2020 16:06:12 -0500https://ask.sagemath.org/question/35048/how-do-i-implement-plantri-in-sagemath/?comment=52445#post-id-52445Comment by brendansullivan07 for <p><code>plantri</code> is integrated to Sage via the <code>graphs.planar_graphs</code> generator, see the following for the documentation:</p>
<pre><code>sage: graphs.planar_graphs?
</code></pre>
<p>In your case, you can iterate like this:</p>
<pre><code>sage: for G in graphs.planar_graphs(6, minimum_connectivity=3):
....: plot(G)
</code></pre>
<p>You can check:</p>
<pre><code>sage: list(graphs.planar_graphs(4, minimum_connectivity=3))[0].is_isomorphic(graphs.CompleteGraph(4))
True
</code></pre>
https://ask.sagemath.org/question/35048/how-do-i-implement-plantri-in-sagemath/?comment=37606#post-id-37606@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.Tue, 16 May 2017 11:09:08 -0500https://ask.sagemath.org/question/35048/how-do-i-implement-plantri-in-sagemath/?comment=37606#post-id-37606Comment by brendansullivan07 for <p><code>plantri</code> is integrated to Sage via the <code>graphs.planar_graphs</code> generator, see the following for the documentation:</p>
<pre><code>sage: graphs.planar_graphs?
</code></pre>
<p>In your case, you can iterate like this:</p>
<pre><code>sage: for G in graphs.planar_graphs(6, minimum_connectivity=3):
....: plot(G)
</code></pre>
<p>You can check:</p>
<pre><code>sage: list(graphs.planar_graphs(4, minimum_connectivity=3))[0].is_isomorphic(graphs.CompleteGraph(4))
True
</code></pre>
https://ask.sagemath.org/question/35048/how-do-i-implement-plantri-in-sagemath/?comment=37595#post-id-37595@fieldofnodes I'm having the same issue now, as well!Mon, 15 May 2017 14:53:36 -0500https://ask.sagemath.org/question/35048/how-do-i-implement-plantri-in-sagemath/?comment=37595#post-id-37595Comment by fieldofnodes for <p><code>plantri</code> is integrated to Sage via the <code>graphs.planar_graphs</code> generator, see the following for the documentation:</p>
<pre><code>sage: graphs.planar_graphs?
</code></pre>
<p>In your case, you can iterate like this:</p>
<pre><code>sage: for G in graphs.planar_graphs(6, minimum_connectivity=3):
....: plot(G)
</code></pre>
<p>You can check:</p>
<pre><code>sage: list(graphs.planar_graphs(4, minimum_connectivity=3))[0].is_isomorphic(graphs.CompleteGraph(4))
True
</code></pre>
https://ask.sagemath.org/question/35048/how-do-i-implement-plantri-in-sagemath/?comment=37324#post-id-37324So 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?Tue, 18 Apr 2017 11:11:15 -0500https://ask.sagemath.org/question/35048/how-do-i-implement-plantri-in-sagemath/?comment=37324#post-id-37324Comment by tmonteil for <p><code>plantri</code> is integrated to Sage via the <code>graphs.planar_graphs</code> generator, see the following for the documentation:</p>
<pre><code>sage: graphs.planar_graphs?
</code></pre>
<p>In your case, you can iterate like this:</p>
<pre><code>sage: for G in graphs.planar_graphs(6, minimum_connectivity=3):
....: plot(G)
</code></pre>
<p>You can check:</p>
<pre><code>sage: list(graphs.planar_graphs(4, minimum_connectivity=3))[0].is_isomorphic(graphs.CompleteGraph(4))
True
</code></pre>
https://ask.sagemath.org/question/35048/how-do-i-implement-plantri-in-sagemath/?comment=35067#post-id-35067Great !Tue, 04 Oct 2016 14:10:13 -0500https://ask.sagemath.org/question/35048/how-do-i-implement-plantri-in-sagemath/?comment=35067#post-id-35067Comment by fieldofnodes for <p><code>plantri</code> is integrated to Sage via the <code>graphs.planar_graphs</code> generator, see the following for the documentation:</p>
<pre><code>sage: graphs.planar_graphs?
</code></pre>
<p>In your case, you can iterate like this:</p>
<pre><code>sage: for G in graphs.planar_graphs(6, minimum_connectivity=3):
....: plot(G)
</code></pre>
<p>You can check:</p>
<pre><code>sage: list(graphs.planar_graphs(4, minimum_connectivity=3))[0].is_isomorphic(graphs.CompleteGraph(4))
True
</code></pre>
https://ask.sagemath.org/question/35048/how-do-i-implement-plantri-in-sagemath/?comment=35066#post-id-35066EXCELLENT!!! I did what you said, works great.Tue, 04 Oct 2016 13:24:50 -0500https://ask.sagemath.org/question/35048/how-do-i-implement-plantri-in-sagemath/?comment=35066#post-id-35066