lcz

994 Reputation

11 Badges

6 years, 131 days
changsha, China

MaplePrimes Activity


These are replies submitted by lcz

@Carl Love Thanks for your advice! Cartesian product is particularly effective!

@Kitonum Awesome! It does work. For the additional problem of too many for loops in my program, is there any good way, I am very grateful!

@vv I understand what you mean, I just got it wrong

@vv Do you mean this result sqrt(2)*Pi^(5/2)*Zeta(5)^(2/9)/20 is wrong? But I have observed that it contains Pi, and Pi is also a transcendent number, will it affect it? In other words, is the product of two transcendental numbers also transcendental numbers?

@tomleslie Thanks a lot! This function evalc is very good, but based on the situation that I know 2*cos((2*Pi)/7) is one root of this function. how to remove the Arctangent function.

@Carl Love  awesome! It’s great, and it’s worth learning the coding skills.

@tomleslie Thank you, in the sense of isomorphism, only two more have been discovered, but they are already very good.

[ListTools[Categorize]((x,y)->GraphTheory[IsIsomorphic](x,y),G)]:
nops(%)

3

 

@Carl Love Thanks,Indeed, there is a problem with the code I wrote. 

with(GraphTheory):
with(SpecialGraphs):
numberof2Neighborhood:=(u,G)->local j;
add( `if`( Distance(G, u, j)=2,1,0), j in Vertices(G)):
P := PetersenGraph():
numberof2Neighborhood(1,P)

In order to let people later understand the error you pointed out, I did not modify the original reply. And your newly provided code is more efficient.

By the way, I think this is very similar to breadth first search. But the breadth-first search algorithm function and depth-first algorithm function seem to be not provided by maple.  This is a very strange phenomenon.

 

 

 

 

 

@vs140580 Perhaps you should choose Mapleinput not Math2D.

@vs140580 
 

with(GraphTheory):
with(SpecialGraphs):
numberof2Neighborhood:=(u,G)->local j;
add( `if`( Distance(P, u, j)=2,1,0), j in Vertices(G)):
P := PetersenGraph():
numberof2Neighborhood(1,P)

6

If you like, you can change the number 2 (distance) to k.

Ps:In addition, if the answer given by others fits your question, it should be adopted in mapleprimes.

 

 

 

What is exciting is Maple2021 introduces a new function IsSubgraphIsomorphic.

IsSubgraphIsomorphic: test for isomorphism against subgraphs of a graph. IsSubgraphIsomorphic tests whether a given graph is isomorphic to a subgraph of another given graph.

C6 := CycleGraph(6);
K24 := CompleteGraph(2, 4);
K33 := CompleteGraph(3, 3);
IsSubgraphIsomorphic(C6, K33);

However, it is a pity that I did not point out the isomorphic subgraph corresponding to the mother graph, so that it is impossible to check whether there is an error.

 

 

@nm 

Thank you very much. Something is better than nothing.

@Carl Love Thank you!Now I get it.

@Kitonum Thank you!  I do not understand what the mechanism  of index in sum is.

@Kitonum  Thank you !

But When I use your second codes

restart;
P := plot(sin(x)-x+(x^3)/3!, x=-2*Pi..2*Pi) :
L := plots[textplot]( [ 3 , 17 , sin(x)-x+(x^3)/`3`!],  axes = none) :
plots[display](P ,L, axes = normal)

 I found there is a difference between font of 3 in the denominator of x^3/3! and other symbol's

 

First 9 10 11 12 13 14 15 Page 11 of 16