MaplePrimes Questions

For example from

sum(a[k]*(k+r)*(k+r-1)*x^(k+r-1), k = 0 .. infinity)

sum(a[k]*(k+r)*(k+r-1)*x^(k+r-1), k = 0 .. infinity)

(1)

by substituting k by k+1 to

sum(a[k+1]*(k+1+r)*(k+r)*x^(k+r), k = -1 .. infinity)

sum(a[k+1]*(k+1+r)*(k+r)*x^(k+r), k = -1 .. infinity)

(2)

Doing

subs(k = k+1, sum(a[k]*(k+r)*(k+r-1)*x^(k+r-1), k = 0 .. infinity))

sum(a[k+1]*(k+1+r)*(k+r)*x^(k+r), k+1 = 0 .. infinity)

(3)

leads to output that can't be processed further  

subsop(2 = 'k = -1 .. infinity', sum(a[k+1]*(k+1+r)*(k+r)*x^(k+r), k+1 = 0 .. infinity))

Error, (in sum) second argument must be a name, name=a..b, name=RootOf, or name=algebraic

 

NULL

Doing it programmatically this way

shift := k = k+1; rsd := (lhs-rhs)(shift); subs(shift, [op(sum(a[k]*(k+r)*(k+r-1)*x^(k+r-1), k = 0 .. infinity))]); lhs(%[2])+rsd = map(`+`, rhs(%[2]), rsd); sum(subsop(2 = %, `%%`)[])

sum(a[k+1]*(k+1+r)*(k+r)*x^(k+r), k = -1 .. infinity)

(4)

is not realy elegant and easy to understand.

Download shifting_index_in_sums.mw

Are there better ways?

Hi there,

i am working on an inverse z-transform in MAPLE. I would like to get the Impulse Response for a transferfunction with coefficients a, b, and c.

(z-1)^2/(a*z^2+b*z+c)

In maple, however I get the impulse response with sums over _alpha=RootOf(Z^2...). Through substitution of n = 0...end I get the right result, but for long impulse responses this takes quite a lot of time. With mathematica, however, the inverse z-transform is calculated to 1/(f(b,c)*(g(b,c,))^n+...), where f and g are functions of the coefficients. The function out of mathematica are quite faster to solve. How can I get Maple to solve this equation efficiently?

Greetings

Let A:=[1,2,1,6,6,2,1,1,1,4,5,2,4,5,6,7,1] say

Then I want find the

1) number of times each of the each of the element occurs
2) To multiple the number by the number of times it occurs

3) Then to multple the all these that is in the above

(3*(2)) *(3*(6))*(3*(2))*(2*(4))*(2*(5))*(1*(7))*(5*(1)) = need this value

Here we can observe 3 is the number of times 2 occurs 

3 is the number of times 6 occurs

similiary 5 is the number of times 1 occurs so on

Kind help

From https://maplesoft.zoom.us/webinar/register/WN_qidPG4qHRWGiTyO65vnGpw?timezone_id=Europe%2FParis

Is the recording of  Sneak Peek at Maple 2023 made on march 1,  available anywhere to see on Maple website or somewhere else? 

Update

Recording is at https://www.maplesoft.com/webinars/recorded/featured.aspx?id=2100  but need to first register/login if you are memeber of maplesoft.com

"The recording will start immediately after filling out the form."

In graph theory, the lexicographic product  or graph composition G ∙ H of graphs G and H is a graph such that

 - the vertex set of G ∙ H is the cartesian product V(G) × V(H); 
 - and any two vertices (u,v) and (x,y) are adjacent in G ∙ H if and only if either u is adjacent with x in G or u = x and v is adjacent with y in H.

 

Given two graphs, it is easy to obtain their lexicographic product. However the inverse process does not look so easy. 

Recognition problem: Given a graph G, can we guess whether there exist graphs G_1,...,G_k such that G=G_1 ∙ ⋯ ∙G_k ?

 

I read the book "Handbook of product graphs" and wiki, that say that the recognition complexity of lexicographic products is polynomially equivalent to the graph isomorphism problem

 

For the lexicographic product, I know that there is some algorithm without codes to implement the decomposition of the lexicographic products of a graph.

  • Feigenbaum, J.; Schäffer, A. A. (1986), "Recognizing composite graphs is equivalent to testing graph isomorphism", SIAM Journal on Computing, 15 (2): 619–627, doi:10.1137/0215045 (https://www.cs.yale.edu/homes/jf/FS-SICOMP86.pdf)

However, I did not understand the algorithm process mentioned in the article, nor did I see the program implementation of this algorithm. About 5 months ago, I asked similar questions on multiple platforms, but did not receive any feedback.

The potential algorithm can help us discover some theorems, so I am very interested in the implementation of the algorithm in the above article.

 

PS:We also know that there are already polynomial algorithms for the decomposition of the cartesian product of a graph. A polynomial time algorithm for finding the prime factors of Cartesian-product graphs", Discrete Applied Mathematics, 12 (2): 123–138, doi:10.1016/0166-218X(85)90066-6, MR 0808453 and we can find the java codes for implementation of finding the prime factors of Cartesian-product graphs.

Given a Graph G kind help to write a function F to compute values Based on Neighboorhood

Another_type_using_neighborhood.pdf

Your help will be greatly acknowleged greatly

looking for a simple code kind help

Looking to write a function f which takes a weighted graph g and returns values with are distance based

Kind help please your help will be acknowleged

Try_code_based_with_distance.pdf

Please kind help

Looking for simple code

 I am looking to program to create a function which can take a weighted Graph G and output me a array of computed values as an list 

I have around 15 values to be found 

say a function

Compute(graph::g)

I am mainly look for a simple way to code all these in fewer number of lines kind help in that

I attach a PDF file on what i require     Trying_to_code_1.pdf

Kind help

The main ideas i need are

1) How to do sum over edges of a graph G in a simple line of code

2) How to Product sum  over edges of a graph G in a simple line of code

Each one of your help will be greatly apprieciated Please kind help and it will be acknowleged too

What is the reason Maple likes to do this

arccos(sin(x));

         Pi/2 - arcsin(sin(x))

Both are correct, but the first has leaf count of only 3 and the second expression has leaf count of 11.

Surely the first is simpler to look at and read so the second form is not simpler.

What is the logic behind this automatic transformation? And did Maple always do this?

Convert undirected graph unweighted graph to a weighted graph even though all the weights are 1

as i want to check how my function works on weighted graph as I know it works unweighted

Yesterday (?) there was a nice question which was answered by VV using Jensen's inequality.

Where is it now?

I teach high school math where we use Maple. Some times some students who use Maple 2022 on Mac computers both older and new version of the OS, experience that the document won't react to simple things like plot, solve of loading packages with the "with" command. 

Any idea could be causing this? Because the error goes away if we load a new document within Maple or restart the program.

Found integration problem which causes server.exe to crash each time. I hope this can be used to help find why server.exe keeps crashing much more than before in Maple 2022.

 

This happens each time. The above is a typical example of what I have been saying all the time above server.exe crashing. It should not do that. If it can not solve the problem, it should simply return.

I hope these problems will be fixed in Maple 2023.

Any one can figure why it crashes?

Attached worksheet.


 

interface(version);

`Standard Worksheet Interface, Maple 2022.2, Windows 10, October 23 2022 Build ID 1657361`

restart;

integrand:=(2*x^2022+1)/(x^2023+x);
int(integrand,x);

(2*x^2022+1)/(x^2023+x)


 

Download crash_feb_3_2023.mw

 

This question stems from a previous question that has been perfectly resolved by acer and Carl Love, but as Carl Love mentioned the foldl function, today I attempted to experience its functionality (In order to understand the foldl or foldr function). But I encountered a small issue. 

s:="[ (0, 1), (1, 2), (1, 10), (2, 3), (3, 4), (4, 5),
(4, 9), (5, 6), (6, 7), (7, 8),(8, 9), (10, 11), (11, 12),
(11, 16), (12, 13), (13, 14), (14, 15), (15, 16)]";
with(StringTools):
L1:= "()[]": L2:= "{}{}":
X:=foldl(SubstituteAll,s,op([L1[1],L2[1]]),op([L1[2],L2[2]]),op([L1[3],L2[3]]),op([L1[4],L2[4]]));

Error, (in StringTools:-SubstituteAll) expecting 3 arguments, but got 2

I find it strange that foldl doesn't recognize SubstituteAll with three arguments. 

Isn't s and op([L1[i], L2[i]]) providing three arguments? Of course, s is constantly changing.

 

The goal is to replace the above string with:

{ {0, 1}, {1, 2}, {1, 10}, {2, 3}, {3, 4}, {4, 5},

    {4, 9}, {5, 6}, {6, 7}, {7, 8},{8, 9}, {10, 11}, {11, 12},

    {11, 16}, {12, 13}, {13, 14}, {14, 15}, {15, 16}}

 

Hey
My notes from my math course is corrupt and i really need them. When i open the document it just say "worksheet may be incomplete" Can anyone help recovering them? I tried the recover function but it didn't work. Here is the original document: Mat_1_-_Noter.mw

I also have this .bak from the day before where i know it worked:   _Users_jonathanlarsen_Desktop_Mat_1_-_Noter70_MAS.bak.zip
How can i prevent this in the future? It's the second time it has happenend.

Sincerely a frustrated student :(

First 105 106 107 108 109 110 111 Last Page 107 of 2308