lcz

145 Reputation

6 Badges

1 years, 101 days

MaplePrimes Activity


These are questions asked by lcz

I'd like to find chromatic number of some graphs. But I find a strange thing of function ChromaticNumber. 

with(GraphTheory):
g1:=Graph(4):
DrawGraph(g1);
ChromaticNumber(g1)

It is Ok!

But when I use following codes, an error will be issued.

with(GraphTheory):
graphsof4 := [NonIsomorphicGraphs(4, output = graphs, outputform = graph)]:
DrawGraph(graphsof4[1]);
ChromaticNumber(graphsof4[1]);

 

 

 

 

 

As the title says, I'd like to  divide Non-isomorphism  graphs of order 7   into 6 parts according  diameter of graph.

I write following codes:

restart:
with(GraphTheory):
for i from 1 to 7 do
D||i:=[]:
od:

prc:=NonIsomorphicGraphs(7,output=iterator,outputform=graph,restrictto = connected ):
graphmark := prc():                      
while graphmark <> FAIL  do               
    if Diameter(graphmark) = 1 then  
         D1:=[op(D1),graphmark]; 
      elif Diameter(graphmark) = 2 then
         D2:=[op(D2),graphmark];
      elif Diameter(graphmark) = 3 then
         D3:=[op(D3),graphmark];
      elif Diameter(graphmark) = 4 then
         D4:=[op(D4),graphmark];
      elif Diameter(graphmark) = 5 then
         D5:=[op(D5),graphmark];
      elif Diameter(graphmark) = 6 then
         D6:=[op(D6),graphmark];
      fi:                                
     graphmark:=prc():                 
end do:

But I think  conditional statements  if.. elif are used to many  in  above maple  codes,  it is not concise.  

How to write better?

 

 

 I'd like to  make following function  composition 6 times,  the  notation @  is used  6 times.  How to write it easily?

f:=x->sqrt(1+x);
(f@f@f@f@f@f)(x)

This Anti-derivative of  arccos(x)*arcsin(x), Maple  2020 cannot do that? It seems not difficult.

int(arccos(x)*arcsin(x),x)

In Mathematica, we can easily to get output :

2 x - Sqrt[1 - x^2] ArcSin[x] +  ArcCos[x] (Sqrt[1 - x^2] + x ArcSin[x])

Today I Installed  Physics Updates" version "642 in Maple2020, why does it tell me  it has installed but is not active? How to active it?

Physics:-Version(latest)

`The "Physics Updates" version "642" is installed but is not active. The active version of Physics is within the library D:\\Program Files\\Maple 2020\\lib\\maple.mla, created 2020, March 5, 9:36 hours`

1 2 3 4 5 6 Page 1 of 6