ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 29 Mar 2021 12:29:37 +0200Find 25-vertex 4-regular planar graphs using plantrihttps://ask.sagemath.org/question/56405/find-25-vertex-4-regular-planar-graphs-using-plantri/I am using SageMath 9.2 and I have recently wanted to add the optional package **plantri**.
I found a link to a similar question before:
[Ask Sage question 52358](https://ask.sagemath.org/question/52358)
where a comment suggests this command:
sage: !sage -i plantri
An error occurred during the installation process that prevented it from proceeding.
make[3345]: Entering directory '/opt/sagemath-9.2'
0 [main] make (45584) C:\Users\asus\AppData\Local\SageMath 9.2\runtime\bin
\make.exe: *** fatal error in forked process - ccalloc would have returned NULL
0 [main] make 15063 dofork: child -1 - forked process 45584 died unexpect
dly, retry 0, exit code 0xC0000142, errno 11
make[3345]: *** [Makefile:31: bootstrap] Error 127
My computer runs the Windows10 64-bit operating system.
I don't know how to solve this installation problem.
In fact, the graph theory problem I encountered is as follows.
I 'd like to generate all **25-vertex 4 regular planar graphs that size of maximum face is 4**.
Of course it may not exist.
With the help of plantri, I think there should be no problem,
because I saw [James Preen's page on the degree-diameter problem](http://faculty.capebretonu.ca/jpreen/degdiam.html),
which contains the following paragraph.
> Additionally, using plantri it has been established that there exist
> **no 4-regular planar graphs with 28** vertices and similarly
> there are no 3-regular planar graphs with diameter 4 with
> between 20 and 30 vertices.
If someone has successfully installed it, can you help me see if there is such a graph?
Thanks in advance！
sage: for G in graphs.planar_graphs(25, minimum_degree=4):
....: if G.num_edges==50:
sage: show(G)
sage: print("nofind")
The above codes may need improvement.Sat, 27 Mar 2021 03:55:43 +0100https://ask.sagemath.org/question/56405/find-25-vertex-4-regular-planar-graphs-using-plantri/Comment by slelievre for <p>I am using SageMath 9.2 and I have recently wanted to add the optional package <strong>plantri</strong>.
I found a link to a similar question before:
<a href="https://ask.sagemath.org/question/52358">Ask Sage question 52358</a>
where a comment suggests this command:</p>
<pre><code>sage: !sage -i plantri
</code></pre>
<p>An error occurred during the installation process that prevented it from proceeding.</p>
<pre><code> make[3345]: Entering directory '/opt/sagemath-9.2'
0 [main] make (45584) C:\Users\asus\AppData\Local\SageMath 9.2\runtime\bin
\make.exe: *** fatal error in forked process - ccalloc would have returned NULL
0 [main] make 15063 dofork: child -1 - forked process 45584 died unexpect
dly, retry 0, exit code 0xC0000142, errno 11
make[3345]: *** [Makefile:31: bootstrap] Error 127
</code></pre>
<p>My computer runs the Windows10 64-bit operating system.
I don't know how to solve this installation problem.</p>
<p>In fact, the graph theory problem I encountered is as follows.</p>
<p>I 'd like to generate all <strong>25-vertex 4 regular planar graphs that size of maximum face is 4</strong>.
Of course it may not exist. </p>
<p>With the help of plantri, I think there should be no problem,
because I saw <a href="http://faculty.capebretonu.ca/jpreen/degdiam.html">James Preen's page on the degree-diameter problem</a>,
which contains the following paragraph.</p>
<blockquote>
<p>Additionally, using plantri it has been established that there exist
<strong>no 4-regular planar graphs with 28</strong> vertices and similarly
there are no 3-regular planar graphs with diameter 4 with
between 20 and 30 vertices.</p>
</blockquote>
<p>If someone has successfully installed it, can you help me see if there is such a graph?</p>
<p>Thanks in advance！</p>
<pre><code>sage: for G in graphs.planar_graphs(25, minimum_degree=4):
....: if G.num_edges==50:
sage: show(G)
sage: print("nofind")
</code></pre>
<p>The above codes may need improvement.</p>
https://ask.sagemath.org/question/56405/find-25-vertex-4-regular-planar-graphs-using-plantri/?comment=56408#post-id-56408The limit on posting links is because of high levels of spam posting.
One workaround is to post the link in split form, for instance https:// example .com
and then some moderator can edit your post to put it back together.Sat, 27 Mar 2021 14:09:39 +0100https://ask.sagemath.org/question/56405/find-25-vertex-4-regular-planar-graphs-using-plantri/?comment=56408#post-id-56408Answer by David Coudert for <p>I am using SageMath 9.2 and I have recently wanted to add the optional package <strong>plantri</strong>.
I found a link to a similar question before:
<a href="https://ask.sagemath.org/question/52358">Ask Sage question 52358</a>
where a comment suggests this command:</p>
<pre><code>sage: !sage -i plantri
</code></pre>
<p>An error occurred during the installation process that prevented it from proceeding.</p>
<pre><code> make[3345]: Entering directory '/opt/sagemath-9.2'
0 [main] make (45584) C:\Users\asus\AppData\Local\SageMath 9.2\runtime\bin
\make.exe: *** fatal error in forked process - ccalloc would have returned NULL
0 [main] make 15063 dofork: child -1 - forked process 45584 died unexpect
dly, retry 0, exit code 0xC0000142, errno 11
make[3345]: *** [Makefile:31: bootstrap] Error 127
</code></pre>
<p>My computer runs the Windows10 64-bit operating system.
I don't know how to solve this installation problem.</p>
<p>In fact, the graph theory problem I encountered is as follows.</p>
<p>I 'd like to generate all <strong>25-vertex 4 regular planar graphs that size of maximum face is 4</strong>.
Of course it may not exist. </p>
<p>With the help of plantri, I think there should be no problem,
because I saw <a href="http://faculty.capebretonu.ca/jpreen/degdiam.html">James Preen's page on the degree-diameter problem</a>,
which contains the following paragraph.</p>
<blockquote>
<p>Additionally, using plantri it has been established that there exist
<strong>no 4-regular planar graphs with 28</strong> vertices and similarly
there are no 3-regular planar graphs with diameter 4 with
between 20 and 30 vertices.</p>
</blockquote>
<p>If someone has successfully installed it, can you help me see if there is such a graph?</p>
<p>Thanks in advance！</p>
<pre><code>sage: for G in graphs.planar_graphs(25, minimum_degree=4):
....: if G.num_edges==50:
sage: show(G)
sage: print("nofind")
</code></pre>
<p>The above codes may need improvement.</p>
https://ask.sagemath.org/question/56405/find-25-vertex-4-regular-planar-graphs-using-plantri/?answer=56409#post-id-56409The current interface of plantri is incomplete. Indeed, we cannot specify the number of edges or an upper bound on the size if a face. The following method should do what you want.
import subprocess
def foo(n):
"""
Iterator over planar graphs of order n, size 2n, minimum degree 4
and faces of size at most 4
"""
from sage.features.graph_generators import Plantri
Plantri().require()
if n < 6:
return
command = 'plantri -pm4c0e{}f4 {}'.format(2*n, n)
sp = subprocess.Popen(command, shell=True,
stdin=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.PIPE, close_fds=True,
encoding='latin-1')
sp.stdout.reconfigure(newline='')
for G in graphs._read_planar_code(sp.stdout):
if G.is_regular(4):
yield(G)
I'll let it run for `n=25` and let you know if it finds solutions (it might take a very long time).Sat, 27 Mar 2021 14:47:58 +0100https://ask.sagemath.org/question/56405/find-25-vertex-4-regular-planar-graphs-using-plantri/?answer=56409#post-id-56409Comment by David Coudert for <p>The current interface of plantri is incomplete. Indeed, we cannot specify the number of edges or an upper bound on the size if a face. The following method should do what you want.</p>
<pre><code>import subprocess
def foo(n):
"""
Iterator over planar graphs of order n, size 2n, minimum degree 4
and faces of size at most 4
"""
from sage.features.graph_generators import Plantri
Plantri().require()
if n < 6:
return
command = 'plantri -pm4c0e{}f4 {}'.format(2*n, n)
sp = subprocess.Popen(command, shell=True,
stdin=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.PIPE, close_fds=True,
encoding='latin-1')
sp.stdout.reconfigure(newline='')
for G in graphs._read_planar_code(sp.stdout):
if G.is_regular(4):
yield(G)
</code></pre>
<p>I'll let it run for <code>n=25</code> and let you know if it finds solutions (it might take a very long time).</p>
https://ask.sagemath.org/question/56405/find-25-vertex-4-regular-planar-graphs-using-plantri/?comment=56422#post-id-56422Yes, you should contact the authors.Mon, 29 Mar 2021 12:29:37 +0200https://ask.sagemath.org/question/56405/find-25-vertex-4-regular-planar-graphs-using-plantri/?comment=56422#post-id-56422Comment by licheng for <p>The current interface of plantri is incomplete. Indeed, we cannot specify the number of edges or an upper bound on the size if a face. The following method should do what you want.</p>
<pre><code>import subprocess
def foo(n):
"""
Iterator over planar graphs of order n, size 2n, minimum degree 4
and faces of size at most 4
"""
from sage.features.graph_generators import Plantri
Plantri().require()
if n < 6:
return
command = 'plantri -pm4c0e{}f4 {}'.format(2*n, n)
sp = subprocess.Popen(command, shell=True,
stdin=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.PIPE, close_fds=True,
encoding='latin-1')
sp.stdout.reconfigure(newline='')
for G in graphs._read_planar_code(sp.stdout):
if G.is_regular(4):
yield(G)
</code></pre>
<p>I'll let it run for <code>n=25</code> and let you know if it finds solutions (it might take a very long time).</p>
https://ask.sagemath.org/question/56405/find-25-vertex-4-regular-planar-graphs-using-plantri/?comment=56420#post-id-56420@David Coudert Haha, I found the corresponding data. There are 51 graphs that meet the requirements, but I don't know whether the graph data can be queried. see https://oeis.org/A111361. I quite hope to get the specific 51 graphs. I read that the authors of this article also used plantri.
G. Brinkmann, O. Heidemeier and T. Harmuth. The construction of cubic and quartic planar maps with prescribed face degrees. Discrete Applied Mathematics 128: 541-554, (2003).
Maybe I should write an email to the professors.Sun, 28 Mar 2021 15:53:01 +0200https://ask.sagemath.org/question/56405/find-25-vertex-4-regular-planar-graphs-using-plantri/?comment=56420#post-id-56420Comment by licheng for <p>The current interface of plantri is incomplete. Indeed, we cannot specify the number of edges or an upper bound on the size if a face. The following method should do what you want.</p>
<pre><code>import subprocess
def foo(n):
"""
Iterator over planar graphs of order n, size 2n, minimum degree 4
and faces of size at most 4
"""
from sage.features.graph_generators import Plantri
Plantri().require()
if n < 6:
return
command = 'plantri -pm4c0e{}f4 {}'.format(2*n, n)
sp = subprocess.Popen(command, shell=True,
stdin=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.PIPE, close_fds=True,
encoding='latin-1')
sp.stdout.reconfigure(newline='')
for G in graphs._read_planar_code(sp.stdout):
if G.is_regular(4):
yield(G)
</code></pre>
<p>I'll let it run for <code>n=25</code> and let you know if it finds solutions (it might take a very long time).</p>
https://ask.sagemath.org/question/56405/find-25-vertex-4-regular-planar-graphs-using-plantri/?comment=56417#post-id-56417Unfortunately, I do not know the upper bound for total numbers for the graphs with order 25 and minimum degree 4. I did not find the corresponding data, otherwise we can estimate the time.Sun, 28 Mar 2021 04:36:02 +0200https://ask.sagemath.org/question/56405/find-25-vertex-4-regular-planar-graphs-using-plantri/?comment=56417#post-id-56417Comment by slelievre for <p>The current interface of plantri is incomplete. Indeed, we cannot specify the number of edges or an upper bound on the size if a face. The following method should do what you want.</p>
<pre><code>import subprocess
def foo(n):
"""
Iterator over planar graphs of order n, size 2n, minimum degree 4
and faces of size at most 4
"""
from sage.features.graph_generators import Plantri
Plantri().require()
if n < 6:
return
command = 'plantri -pm4c0e{}f4 {}'.format(2*n, n)
sp = subprocess.Popen(command, shell=True,
stdin=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.PIPE, close_fds=True,
encoding='latin-1')
sp.stdout.reconfigure(newline='')
for G in graphs._read_planar_code(sp.stdout):
if G.is_regular(4):
yield(G)
</code></pre>
<p>I'll let it run for <code>n=25</code> and let you know if it finds solutions (it might take a very long time).</p>
https://ask.sagemath.org/question/56405/find-25-vertex-4-regular-planar-graphs-using-plantri/?comment=56413#post-id-56413Ticket:
- [Sage Trac ticket 31571: Improve interface to plantri](https://trac.sagemath.org/ticket/31571)Sat, 27 Mar 2021 17:15:13 +0100https://ask.sagemath.org/question/56405/find-25-vertex-4-regular-planar-graphs-using-plantri/?comment=56413#post-id-56413Comment by licheng for <p>The current interface of plantri is incomplete. Indeed, we cannot specify the number of edges or an upper bound on the size if a face. The following method should do what you want.</p>
<pre><code>import subprocess
def foo(n):
"""
Iterator over planar graphs of order n, size 2n, minimum degree 4
and faces of size at most 4
"""
from sage.features.graph_generators import Plantri
Plantri().require()
if n < 6:
return
command = 'plantri -pm4c0e{}f4 {}'.format(2*n, n)
sp = subprocess.Popen(command, shell=True,
stdin=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.PIPE, close_fds=True,
encoding='latin-1')
sp.stdout.reconfigure(newline='')
for G in graphs._read_planar_code(sp.stdout):
if G.is_regular(4):
yield(G)
</code></pre>
<p>I'll let it run for <code>n=25</code> and let you know if it finds solutions (it might take a very long time).</p>
https://ask.sagemath.org/question/56405/find-25-vertex-4-regular-planar-graphs-using-plantri/?comment=56412#post-id-56412@David Coudert Thank you very much for your helpSat, 27 Mar 2021 15:48:48 +0100https://ask.sagemath.org/question/56405/find-25-vertex-4-regular-planar-graphs-using-plantri/?comment=56412#post-id-56412Comment by tmonteil for <p>The current interface of plantri is incomplete. Indeed, we cannot specify the number of edges or an upper bound on the size if a face. The following method should do what you want.</p>
<pre><code>import subprocess
def foo(n):
"""
Iterator over planar graphs of order n, size 2n, minimum degree 4
and faces of size at most 4
"""
from sage.features.graph_generators import Plantri
Plantri().require()
if n < 6:
return
command = 'plantri -pm4c0e{}f4 {}'.format(2*n, n)
sp = subprocess.Popen(command, shell=True,
stdin=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.PIPE, close_fds=True,
encoding='latin-1')
sp.stdout.reconfigure(newline='')
for G in graphs._read_planar_code(sp.stdout):
if G.is_regular(4):
yield(G)
</code></pre>
<p>I'll let it run for <code>n=25</code> and let you know if it finds solutions (it might take a very long time).</p>
https://ask.sagemath.org/question/56405/find-25-vertex-4-regular-planar-graphs-using-plantri/?comment=56411#post-id-56411Ticket ?Sat, 27 Mar 2021 15:09:29 +0100https://ask.sagemath.org/question/56405/find-25-vertex-4-regular-planar-graphs-using-plantri/?comment=56411#post-id-56411