lcz

994 Reputation

11 Badges

6 years, 128 days
changsha, China

MaplePrimes Activity


These are questions asked by lcz

In general, the Graph6 format is a graph format supported by major math software, so I used it as a transitional format.

with(GraphTheory):
g:=Graph(Matrix(42, 42, [[0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 1, 0, 1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 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0], [0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]])):
s:=ConvertGraph(g,'graph6')

 


 

When I try to read this graph6 string with Mathematica or Sagemath, unfortunately there are unrecognized problems.  Later, I found that when copying, there would be missing the backslash . 

"ihChWC@?gE_@?@?A_@g?@??C??j?@l??E??Ao?? (miss \ when copy)???m??@I??DF??E`O??GM??@?g??S@o?@g@O??G?w??C?I??D?@o?@g?D???_?M??@??I??D??FK?E_?@Q??G??N??@???CPCOaGa????"

I'm trying to figure out this problem of copying strings.

 

 

 

 

I 'd like to extract all items that contain "a" in an expression except "ab". What I can think of is to use the two functions select and remove to do it, but I feel a little less automated. Is there a better way?

f := a*b+a*c+a+b+c
s:=remove(has,select(has,[op(f)],a),a*b)                    

 s := [a c, a]

I got some planar graphs and I 'd like show their planar drawing. But the graph layout displayed by maple may not so balanced.

In the example below, we can see that the area of ​​the triangle 678 is too small, vertices 9, 10, 11 are crowded inside. I need to reduce the vertex size to better show it. Three vertices, say 9,10,11, in following planar drawing are not the right size.

with(GraphTheory):
d:=ConvertGraph("J|tZHkD@gF_"):
DrawPlanar (d, stylesheet=[ ],font=["Courier",10])

 

 

 

 

 

 

Vertexpadding doesn’t seem to help with vertex size reduction.

Ps:The algorithm used is Tutte's spring (or rubber) method. 

 

Maybe there is a better solution.

If we don’t adjust the vertex size, I don’t know if there is any other solution to improve the overall layout. It is best not to appear crowded.

 

It is said that the LaTeX export of maple2021 has been improved , but unfortunately I still encounter the following problems.

When I execute the following related graph theory code,

restart;
with(GraphTheory):
s1:=[NonIsomorphicGraphs(4,restrictto = connected,output=graphs,outputform=graph)]:
DrawGraph(s1,width=4,stylesheet = [vertexcolor = "Blue",vertexpadding=20])

 

It is strange that all graphs(.eps) are not produced in  corresponding folder  when I exported it as latex file . So it leads to the lack of graphs in the running results of latex.

If it is a single graph, there seems to be no problem.

restart;
with(GraphTheory):
s1:=[NonIsomorphicGraphs(4,restrictto = connected,output=graphs,outputform=graph)]:
DrawGraph(
s1[1],width=4,stylesheet = [vertexcolor = "Blue",vertexpadding=20])

 

 

 

 

 

graph1.mw

 

 

 

 

Some special graphs are temporarily difficult to be generated by maple's function NonIsomorphicGraphsSo I want to read some such data from the following URL.

http://users.cecs.anu.edu.au/~bdm/data/graphs.html


But recently I found out that the data on this website has been changed. Different graphs are not on a single line, so I can’t read them by maple effectively. The previous method fails.

https://www.mapleprimes.com/questions/228819-How-To-Import-All-Graphs-In-A-Graph6-File

restart: with(GraphTheory):
L:=ImportGraph("yourpath/graph5c.g6", graph6, output=list):
 DrawGraph(L);

 

For example: all 41 Strongly regular graphs(19,14,6,7).The g6 file is converted into text format, as shown below

\}rE^yceKLtLlGeduRQhMYLLKZZapjTSLUKw[kQXIyLbHtkCzStI`{y@}FOWzcBzHozFg
\}rEnYSbLSTVeek[ulB`YUiH[QrWqzLKhbRHU\EGRVzCfT]@vLMKdZgfGsigmUclBxQq[
\}rFMqidTgvDbYbdu]BHsULThIykJzwW@jPPTwaP`frcg{zEaxyB\Kx@vDiXEyXhCzcks
\}rFMyoiLcqseVblTlBG{TI\YsBoMqUqxiam\[D?JlzDKmYFEZcCyq\@puexMeDuKrHrc
\}rFUihddgvDbYbdu]BPsTLTeIyqJzwW@f`HUscP`frcg{zEaxyBlJT@nE[XEydhCzbKs
\}rMNeceLDqtedmQtmAbwYIt[pRTKZcpLsExRuE@Qldb`lMC{itHep]?{^cWUZmXLXPfo
\}rMNeockxsqayjHvIbHwSdtiaywbRRadXMX\i@_TlNcZXYMBZLHR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WpqXYTeLPoNwaslsBVJXG{itCyWfWuYEyNI_yk
\~veMUSiCFpqejk\SnA@}[`lLarWwjFQtXWwTkTHINxBKlwBlI\KejdAxgVhUeIuNI_yk
\~zE]mcdKcpHa^lJTUaW]WilDsrBMYcr|w[EVKeG[jFa\deLP]FJiTHFIUgWvEEzHuaiw
\~zUUMPhCTuKilbVQvA@}R`lwPrIwqxQpbguS{dOkNxDKlkB[jdKfItCyWNguYKuNI_yk

 

 

I don’t know how to select some graphs from them , so helpless.

First 11 12 13 14 15 16 17 Last Page 13 of 25