lcz

215 Reputation

6 Badges

1 years, 139 days

MaplePrimes Activity


These are questions asked by lcz

Any  idea is good for me !

 

According to Wikipedia  https://www.wikidata.org/wiki/Q3115604 ,

Outerplanar graph  is a graph that can be drawn without crossings in the plane (means it is planar graph) with all vertices on the outer face.  

For example 

 

Recently  in my project, I  need to judge whether a planar graph is a  outerplanar graph.

I tried to find some algorithms but failed. 

Maple  only considers how to test wheather a graph is  planar.

like following:

with(GraphTheory):
with(SpecialGraphs)
K4 := CompleteGraph(4)
IsPlanar(K4, 'F')

 Hello everyone!

 I want to find all solutions of  following equations :

I used Maple 2019: 

solutions:=solve([abs(1+1/3*lambda+1/18*lambda^2-1/324*lambda^3+1/1944*lambda^4)-1=0],[lambda]);
evalf(solutions)

The output is:

So we have two solutions. But when I use Matlab 2018, 
four solutions are returned.

syms lambda
eqn =abs(1+1/3*lambda+1/18*lambda^2-1/324*lambda^3+1/1944*lambda^4)-1==0;
solx1=solve(eqn, lambda) 
%%
solx1 =
 root (z1 ^ 4-6 * z1 ^ 3 + 108 * z1 ^ 2 + 648 * z1, z1, 1)
 root (z1 ^ 4-6 * z1 ^ 3 + 108 * z1 ^ 2 + 648 * z1, z1, 2)
 roots (z1 ^ 4-6 * z1 ^ 3 + 108 * z1 ^ 2 + 648 * z1, z1, 3)
 roots (z1 ^ 4-6 * z1 ^ 3 + 108 * z1 ^ 2 + 648 * z1, z1, 4)


 

solx3=solve(eqn, lambda,   'MaxDegree', 4)
double(solx3)
%%The solution is:
 -4.2681 + 0.0000i
 0.0000 + 0.0000i
 5.1340 -11.2012i
5.1340
+ 11.2012i

It is easy to check that  first two in Maple and Matlab are  same.

Who is right? Does Maple miss complex solutions?

 

 

 

 

 

 

 

 

 Recently I often drew some graphs in Graph Theory  by Maple. I tried to use DrawGraph, but  I found that evey edge only meets straight line  style in this package.

For example: 

restart:
with(GraphTheory):
with(SpecialGraphs):
a:=CycleGraph(8):
DrawGraph(a)

 

How do I draw some edges with curve syle in graph? like following:

 

 

 

Thanks!

 

 

 

   I need to integrate x with a<=x<=b and k , l are constants.

I input foolowing code , it did not work. Maybe you have some good ideas to solve this! thanks!

int(sqrt(1+((k*Pi)/l*cos((Pi*x)/l))^2), x = a.. b) assuming x>=a, x<=b

   I download one  file about  all 5 connected graphs with graph6  (total 21 graphs). format from http://users.cecs.anu.edu.au/~bdm/data/graphs.html,and I want to import it in Maple. Since platform restrictions , I can not attach the file .   Please download it by yourself,very thanks to you ! 

   I put the file  in the installation path of  Maple in my computer:D:\\ Program Files\Maple 2019. (my computer system is Window 10 )  And I import it like following: 

  But it  only imports the graph of  the first row in the file. How to import all graphs in a file of graph6 format one time?

 

2 3 4 5 6 7 8 Page 4 of 8