lcz

215 Reputation

6 Badges

1 years, 139 days

MaplePrimes Activity


These are questions asked by lcz

 I want to find AutomorphismGroup  of star S4 (ie, K1,3).

with(GraphTheory):
with(GroupTheory):
with(SpecialGraphs):
S4:=CompleteGraph(1,3);
G1 := AutomorphismGroup(S4); # out is GroupTheory:-PermutationGroup({module() ... end module,module() ... end module},degree=4)

 

 

the S_4 has six automorphisms: (1, 2, 3), (1, 3, 2), (2, 1, 3), (2, 3, 1), (3, 1, 2,), (3, 2, 1):

GraphAutomorphismStar

For the output of maple ,I cannot understand.

Maybe I don’t understand the group enough. May somebody explain in detail,  Thanks!

 Today I read the  Problem 5.21 from book Maple and Mathematica, A Problem Solving Approach for Mathematics:

The book uses following codes:

with(LinearAlgebra): n:=9; v:=Vector(n); T:=v->add(v[i]*x^(i-1),i=1..n); P:=Vector(n,symbol=p); Q:=Vector(n,symbol=q); Z1:=T(a*P+b*Q); Z2:=a*T(P)+b*T(Q);
expand(T(a*P+b*Q)-(a*T(P)+b*T(Q)));
evalb(expand(Z1)=expand(Z2));

But I think  these codes just verify rather than prove(n is always specific number). This example is not difficult to prove by hand. but I'd like to know Maple how to prove it. It seems not easy.

 

 

 

 

 

 

 

 

 

 

 

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)
1 2 3 4 5 6 7 Page 2 of 8