lcz

330 Reputation

6 Badges

2 years, 118 days

MaplePrimes Activity


These are questions asked by lcz

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@_TlNcZXYMBZLHRknAk^oGnIBtBuLPk
\}rNEmSeLXUMifkiPyJ_rQlLipIfSrIkh[bF^BE?Q^vCstUDc{\@zRUcnEw`qJHxEu`c{
\}rNEmo`k\uQmBe\TkQhhYK\iRIwkjbSTJLX\iD?FtnAjXiJJO{EbmLCg}fovBKuHtIps
\}rNMqobdRqYdhhZVEQXFST\ctYVSrcppycE\Q`OF{mdBtuFBs\DmQwcw\Qgz`HrIp[Yk
\}rNUio`{rt`hkehUGycyYJd`pywdylE`jGd\XAOXjN_ZvNBYrWLBkwbW\QpMigfMm?m[
\}rNUmBhKpUMkijErbb_NXN@WyJT`ijQthL[Tcn?Frf`szIBXlhLSpofPdWhMTPvEtPNW
\}rNUmBiKhULkkjFRbR_NXN@WyJJ`qtQliK{TSv?Frf`szIBXlhMTPoepTWhMUHvEtINW
\}rNUmBiKhULkkjFRbR_NYN@SyJLQir`tdS{Uav?Frf`susBXuTLSpofPdWhMTPvEtPNW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JPEbyb[yUqhbUJ^KE@`fj`ivEAxZTM`oma~?YXiRRXJal`[
\}zVUmobCoqV_zjKsnB`RQUtEsyKmjA\t[iK]L?wZFFc]TeLTQTLashdpclWupcyExVAk
\}~EMmPhCXtNkchirURHdUItQ]JhQjFgxiDeRUMGF\laixeBh]XK[W|BrCwXUUQrNPcbk
\}~VEMQbDBtQeZdlSnA@}\@lX`rLQqYwliosSueHINx@[twDlI\MEZd@yWVheYIuNI_yk
\~rEM]WhLTS^d[ecv`ITqRD\hqRciYxSTpMX\gL?L\]crYMD\MKIPzNAX]tOvIEmJUHpk
\~rE~YWdKKsJaZjLUTR_ZRK\gjQdkIIt|i[MTXe`KNT`\fEL]@LFatEfITLXNBM[EtSp[
\~rE~YceKSsL`jlMRIqpLTD\EqiRqjA{\kJX[jD_iVddPleJ[HNMkcWaz`JW^IsJKoxrS
\~rF]ySiCXqTglhUrMb`bQ]dE[yJMqSNls[E]IaXQZFai[mFiSTJkKieXj`PNDWzEtahw
\~rU^QccSTqiblgzVFA@}Y`lL`qrcjJWpqXYTeLPoNwaslsBVJXG{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.

Today I got some useful  graph datas  in the form of adjacency list like following:

1: 2 3 4 5
2: 1 5 6 7
3: 1 7 8 9
4: 1 9 10 11
5: 1 11 12 2
6: 2 12 13 7
7: 2 6 8 3
8: 3 7 13 14
9: 3 14 10 4
10: 4 9 15 16
11: 4 16 17 5
12: 5 17 18 6
13: 6 18 19 8
14: 8 19 15 9
15: 10 14 20 21
16: 10 21 22 11
17: 11 22 23 12
18: 12 23 24 13
19: 13 24 20 14
20: 15 19 25 21
21: 15 20 22 16
22: 16 21 25 17
23: 17 25 24 18
24: 18 23 25 19
25: 20 24 23 22

I originally planned to enter them in maple one by one manually,

with(GraphTheory):
G:=Graph({{1,2},{1,3},{1,4},{1,5},{2,5},{2,6},{2,7},{3,7},{3,8},{3,9},{4,9},{4,10},{4,11},{5,11},{5,12},{6,7},{6,12},{6,13},{7,8},{8, 7}, {8,13},{8,14},{9,14},{9,10},{10,15},{10,16},{11,16},{11,17},{12,17},{12,18},{13,18},{13,19},{14,19},{14,15},{15,20},{15,21},{16,21},{16,22},{17,22},{17,23},{10,9},{10,15},{10,16},{11,16},{11,17},{12,17},{12,18},{13,18},{13,19},{14,19},{14,15},{15,20},{15,20},{15,21},{16,21},{16,22},{17,22},{17,23},{18,23},{18,24},{19,20},{19,24},{20,21},{20,25},{21,22},
{22,25},{23,24},{23,25},{24,25}})

 

but I will consider a lot of graph datas, I don’t know if there is a program that can help, Thanks advance!

 

1 2 3 4 5 6 7 Last Page 1 of 13