MaplePrimes Questions

An interval graph is an undirected graph formed from a set of intervals on the real line, with a vertex for each interval and an edge between vertices whose intervals intersect. Recognizing interval graphs  is in linear time. 

Seven intervals on the real line and the corresponding seven-vertex interval graph.

 

 

IsIntervalGraph(G) (was introduced in Maple 2022) tests whether the graph G could be expressed as an interval graph for some collection of intervals. If a graph is an interval graph, then the intervals corresponding to its vertices should be given. However,  IsIntervalGraphdoes not provide such an option, which makes it impossible for me to verify the correctness of the results or see more information.

with(GraphTheory):
G:=Graph({{1,2},{1,3},{1,4}, {4,2},{4,3}});
IsIntervalGraph(G)

true

Therefore, an option like the "certificate" option in SageMath needs to be provided.

g = Graph({1: [2, 3, 4], 4: [2, 3]})
g.show()
g.is_interval()
g.is_interval(certificate=True)

(True, {1: (0, 5), 2: (4, 6), 3: (1, 3), 4: (2, 7)})

 

 

I have looked at the source code of IsIntervalGraphand it seems to be checking whether the complement graph is comparability. I am not sure if this transformation can still find the corresponding intervals.

print(IsIntervalGraph)
proc(G::GRAPHLN)::truefalse;
    local G2;
    G2 := GraphTheory:-GraphComplement(G);
    return GraphTheory:-IsComparabilityGraph(G2);
end proc

print(IsComparabilityGraph)
proc (G::GRAPHLN, { transitiveorientation::truefalse := false, 

   usecached::truefalseFAIL := FAIL }, ` $`)::truefalse; local 

   iscomparability, L, A, result, V; A := op(4, G); result := 

   FindTransitiveOrientation(A, transitiveorientation); if 

   result = NULL then false elif transitiveorientation then V 

   := op(3, G); true, GraphTheory:-Graph(V, result) else true 

   end if end proc

 

By the way, can the  "FindTransitiveOrientation "  in the function IsComparabilityGraph be used by the user?

Hello, 
I have an simple exmple of expresion : 

restart;
v1 := sin(c)*sin(a)(a - b);
                  v1 := sin(a)(-b + a) sin(c)

v2 := sin(c1)*sin(a1)(-a + b);
                 v2 := sin(a1)(-a + b) sin(c1)

sort(v1);
                      sin(c) sin(a)(a - b)

sort(v2);
                    sin(c1) sin(a1)(-a + b)


what i want  is :  sort(v2); --->     sin(c1) sin(a1)(b-a)

That mean i want the "+" sign comme alwase first

Merci

https://www.maplesoft.com/support/help/Maple/view.aspx?path=copyright lists some external packages used by Maple, but it appears that certain libraries are of outdated (albeit not obsolete) versions. For example, Maple 2023 uses FLINT 2.6.3 (released in 2020), but the newest stable version of FLINT is 2.9.0. Also, Maple 2023 uses Z3 4.5.0 (released in 2016), but the newest stable version of Z3 is 4.12.1. In addition, Maple 2023 uses GCC 10.2.0 (released in 2020), but the newest stable version of GCC is 13.1. Since they are distributed under free licenses, I can download the most recent (or even nightly) release's source code, but how can I replace the old components that Maple uses by the latest ones by myself?

Please, how do I fix this? I have

n := Vector[row]([cos(theta(x, y, t)), sin(theta(x, y, t))]);

and Tried :

sum(Multiply(n[i], n[i]), i = 1 .. 2)

But received: "Error, bad index into Vector".

I cannot. If I right click on the warning I get only a copy option

Double_Pendulum_warning.msim

Hello,

Can we impliment Artificial Neural Network for nonlinear coupled ODE equation with boundary conditions.? In maple

I wont seen any post regarding ANN in mapleprime.

Hello,

I am trying to evaluate this expression numerically or symbolically without success.

> sum(1/(4.0*n^2-4*n+4*100000000^2+1)/10^n,n=1..infinity);

Maple is having hard time to convert it to LerchPhi and even more to evalf(%);

PS : mathematica is doing it at any precision very fast or can translate this into hypegoemetric.

PS2 : I use maple 2020 on windows 10 64 bits.

I use PDsolve to solve sets of PDEs analytically.

I have had tremendous success with this but recently realized that for PDEs if you manually factor out common expressions , it makes it much easier for maple to solve it.

I was wondering if there were other "tricks" like these that I might be unaware of.

Also I found this link comparing how maple compares to mathematica in solving known PDES just in case the maple developers are interested.
Results (12000.org)

If there is a list of operations that do not work properly in 2D notation, please add the expression sequence operator `$` which does not work with strings as demonstrated in the attached worksheet . sequenceoperastionfailure.mw

It seems to work properly with numeric sequences. I only noticed this in maple 2023, but it likely applies to earlier versions as well

Hi Maple friends,

Im new to Maple and Im struggeling with a problem.

I have the numbers of a bode plot (abs and phase) and I want to fit it in an equivalent circuit.

My problem is: I firstly want to calculate the real and imaginary part of the measured impedance of the bode plot (This works so far after a few hours of trying) and then I want wo calculate the values for each equivalent circuit component. For that I need the values of the impedance calculation to further process them.

The problem is: The impedance calculation returns the values as a list (I think). So Im wondering how can I get the values out of the list? My code so far is attached below.

Thanks in advance!

PS: Im sorry for the layout of the code. Im not sure how I can format the code right.

eq1 := diff(f(x), x, x, x)+(1/2)*cos(alpha)*x*(diff(f(x), x, x))+(1/2)*sin(alpha)*f(x)*(diff(f(x), x, x)) = 0;

eq2 := diff(g(x), x, x)+diff(g(x), x)+(diff(g(x), x))*(diff(h(x), x))+cos(alpha)*x*(diff(g(x), x))+sin(alpha)*f(x)*g(x) = 0;

eq3 := diff(g(x), x, x)+diff(h(x), x, x)+1/2*(cos(alpha)*x+sin(alpha)*f(x)) = 0

ics := f(0) = 0, (D(f))(0) = 1, ((D@@2)(f))(0) = a[1], g(0) = 1, (D(g))(0) = a[2], h(0) = 1, (D(h))(0) = a[3];

I am trying to give an input to an R program from an output the edge set of maple code 

Now how to Build a function which takes a list of edge sets as inputs and returns a list on the below format

Show I want for one edge set of the list

Now I have edge set of a Graph G say {{1,2},{2,3},{3,4},{4,5}}

Now want to pick the first values of each index make one set 

from<-c(1,2,3,4)

Similiarly first values of each index make one more set 

to<-c(2,3,4,5)

Then I want to form a list [from<-c(1,2,3,4),to<-c(2,3,4,5),ft <- cbind(from, to),Graph1<-ftM2graphNEL(ft)]

Now it will take second graph in the Edge list say {{1, 2}, {1, 7}, {2, 3}, {3, 4}, {4, 5}, {5, 6}, {6, 7}}

It will append to the previous list like

[from<-c(1,2,3,4),to<-c(2,3,4,5),ft <- cbind(from, to),Graph1<-ftM2graphNEL(ft),from<-c(1,1,2,3,4,5,6),to<-c(2,7,3,4,5,6,7),ft <- cbind(from, to),Graph2<-ftM2graphNEL(ft)]

This time Graph1 is changed to Graph2 to be observed.

Like that it will need  increase graph number based on the number of edge sets in the list of edges.

To be done all edge sets in list

As then I can copy the entire contents in the list and paste in R so that i can run 

As I can have 100 or more graphs done in maple doing for each of them manually typing may be difficult.

Kind help please

Your help will be surely Acknowledged 

Kind help

A toy code i simply tried for graph attached

But I have errors some come with double quotes can something be done if possible please guide

Kind help

As with 100 of lines it will easy to copy paste 

If the contents of the list can be written to txt file it would be helful 

please help

toy_try.mw

I have tried something to my knoewledge please help

Someone added "Duplicate question" tag on this question.

How is this duplicate question? Where is the duplicate question? 

Is this a bug?

Accoding to this help page 

A derived class must not redeclare (via a local or export declaration) any members inherited from the base class

this example does not do this. But derived class gets an error when using ::static on a method declared in base class and this only shows up when using kernelopts('assertlevel'=2):

So it is either kernelopts('assertlevel'=2): is wrong or help is wrong.  Here is example

972100

restart;

972100

interface(version);

`Standard Worksheet Interface, Maple 2023.0, Windows 10, March 6 2023 Build ID 1689885`

interface(warnlevel=4);
kernelopts('assertlevel'=2):

3

module bank_account()
  option object;
  local account_id::integer:=0;
  
  export ModuleCopy::static:=proc(_self, proto::bank_account, account_id::integer,$)
         if nargs=2 then
            _self:-account_id := proto:-account_id;
         else
            _self:-account_id := account_id;
         fi;
  end proc;
end module;

module bank_account () local account_id::integer; option object; end module

module saving_account()
  option object(bank_account);

  ModuleCopy::static := proc(_self, proto::saving_account, account_id::integer,$)
         if nargs=2 then
            _self:-account_id := proto:-account_id;
         else
            _self:-account_id := account_id;
         fi;
  end proc;
end module;

Error, (in saving_account) type `static` does not exist

 


Download static_error.mw

Removing the line kernelopts('assertlevel'=2): the error goes away. Also keeping kernelopts('assertlevel'=2): but removing the ::static from the derived class the error goes way.

What is going on?

Maple 2023 on windows 10.

Does anyone know how to remove this boring notation? I would like to know why Maple does not give me "± 2x". Thanks in advance.

 

I am trying to define a Tensor expression in the physics package but it seems to be taking eons to do so, it has been running for quite some time but still no result to the point where I halt the computation. 

Does anyone have any ideas on how I could accelerate the process? 

I have attached the file I am working with. 

Define.mw

First 85 86 87 88 89 90 91 Last Page 87 of 2308