Unanswered Questions

This page lists MaplePrimes questions that have not yet received an answer

That is to say, a generalized map
E.g., here is a nested list: 

nl := [[[[s, t]], [u, [v, w]]], [[x, [y, z]]]]:

We can use map to apply the mapped function F to "each operand" (i.e., the first‐level parts) of : 

:-map(F, nl);
 = 
         [F([[[s, t]], [u, [v, w]]]), F([[x, [y, z]]])]

But in Mathematica, we can make further explorations: 

In[1]:= nl = {{{{s, t}}, {u, {v, w}}}, {{x, {y, z}}}}; 

In[2]:= Map[F, nl, {1}] (*Maple's result*)

Out[2]= {F[{{{s, t}}, {u, {v, w}}}], F[{{x, {y, z}}}]}

In[3]:= Map[F, nl, {2, -2}]

Out[3]= {{F[{F[{s, t}]}], F[{u, F[{v, w}]}]}, {F[{x, F[{y, z}]}]}}

In[4]:= Map[F, nl, {-3, 3}]

Out[4]= {{F[{F[{s, t}]}], F[{F[u], F[{v, w}]}]}, {F[{F[x], F[{y, z}]}]}}

In[5]:= Map[F, nl, {0, \[Infinity]}, Heads -> \[Not] True]

Out[5]= F[{F[{F[{F[{F[s], F[t]}]}], F[{F[u], F[{F[v], F[w]}]}]}], F[{F[{F[x], F[{F[y], F[z]}]}]}]}]

Note that the last case has been implemented in Maple as MmaTranslator[Mma][MapAll]:  

MmaTranslator:-Mma:-MapAll(F,nl);
 = 
   F([F([F([F([F(s), F(t)])]), F([F(u), F([F(v), F(w)])])]), 

     F([F([F(x), F([F(y), F(z)])])])])

Naturally, how to reproduce the other two results in Maple programmatically? (The output may not be easy to read or understand; I have added an addendum below.)

Addendum. It is also possible to display in "tree" structure (like dismantle) manually: 

`[]`
(
    `[]`
    (
        `[]`
        (
            `[]`
            (
                s
            ,
                t
            )
        )
    ,
        `[]`
        (
            u
        ,
            `[]`
            (
                v
            ,
                w
            )
        )
    )
,
    `[]`
    (
        `[]`
        (
            x
        ,
            `[]`
            (
                y
            ,
                z
            )
        )
    )
)

As you can see, the "depth" of  is five (0, 1, 2, 3, and 4), while the classical map just maps at the first "level". (Moreover, such descriptions may lead to a confusion.)

Supplement. Unfortunately, there remains a bug in the MmaTranslator[Mma][Level]. Compare: 

MmaTranslator:-Mma:-Level(nl, [4]); (*Maple*)
                             [v, w]

MmaTranslator:-Mma:-Level(nl, [-1]); (*Maple*)
          [s, t, u, v, w, x, y, z, -1, x, c, r, y, 2]

In[6]:= Level[nl, {4}] (*Mathematica*)

Out[6]= {s, t, v, w, y, z}

In[7]:= Level[nl, {-1}] (*Mathematica*)

Out[7]= {s, t, u, v, w, x, y, z}

Hello there, 

Is there any chance to ask this one question?

The attached (following) worksheet shows the result of LieDerivative operation, which is not correct. 

The correct answer is given in the image in the middle of the worksheet. Is there any particular reason regarding Maple's way of conducting the operation in that way?

restart;

with(LinearAlgebra):

with(DifferentialGeometry):

with(LieAlgebras):

DGsetup([x1, x2], M, verbose);

`The following coordinates have been protected:`

 

[x1, x2]

 

`The following vector fields have been defined and protected:`

 

[_DG([["vector", M, []], [[[1], 1]]]), _DG([["vector", M, []], [[[2], 1]]])]

 

`The following differential 1-forms have been defined and protected:`

 

[_DG([["form", M, 1], [[[1], 1]]]), _DG([["form", M, 1], [[[2], 1]]])]

 

`frame name: M`

(1)

 

M > 

f := evalDG((x2)*D_x1 + (c1 * (1 - x1^2) * x2 - c2 * x1)*D_x2);

_DG([["vector", M, []], [[[1], x2], [[2], -c1*x1^2*x2+c1*x2-c2*x1]]])

(2)
M > 

h := evalDG((x1)*D_x1 + (0)*D_x2);

_DG([["vector", M, []], [[[1], x1]]])

(3)
M > 

###### answer

M > 

M > 

LieDerivative(f, h);

_DG([["vector", M, []], [[[1], x2], [[2], x1*(2*c1*x1*x2+c2)]]])

(4)
M > 

 

Download Q20230307.mw

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.

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.

I've been using Maple Flow for awhile and generally pleased with its performance...until today.

Going through my normal workflow, the sheet stopped evaluating and a little troubleshooting later it seems that the issue is that once I use a keyboard shortcut to include units, the sheet will not evaluate anything going forward. 

Once

Let a, b be arbitrary real parameters. I intend to compute something like: (with exact piecewise output) 

Optimization:-Maximize(8*x + 7*y, {5*y <= 6 - 9*b, -6*x - 4*y <= 8 - 5*a - 7*b, -4*x + 7*y <= -1 - 2*a - 7*b, -x + y <= 6 + 4*a - 5*b, 7*x + 5*y <= a + 4*b}, variables = {x, y}): # Error
Optimization:-Minimize((x - 1)^2 + (2*y - 1)^2, {x - 2*y <= 2*a - b + 1, x + 2*y <= a + b, 2*x - y <= a - b + 1}, variables = {x, y}): # Error

Unfortunately, these Maple codes are virtually invalid, and the relevant commands minimize, maximize, extrema, and Student[MultivariateCalculus][LagrangeMultipliers] do not support general inequality constraints. Is it possible to tackle these small-scale constrained parametric problems in Maple?

Quite often, Maple freezes, and the file cannot be saved, and Maple cannot be closed.

Did you get the problem ?

Can someone give me an example for using

linear regressor function from deep learning package

By passing one dependent variable say Y

And a set of independent variables say X

As a matrix say 

Can we be able to split data into train and test and use this linear regressor command on train and do validation

As I am not able to see some examples on the implementations using command kind help 

Hi,

Can i use Maple to do satellite image classification . by implement the satellite image so the software will do the math processing ?

Hope the resolution of the images which come via Plot3d and plot commands are atleast 300 dpi

If not how to make them

After a long hiatus I have come back to the issue of null tetrads in the physics package in light of the updates to  Maple in 2021. I have uploaded a document file to illustrate. See below. My first question concerns the labelling of elements of a null tetrad. After calling the metric 27,37 from Stephani et al, and using Setup to specify a null tetrad, Maple's choice is such that the elements labelled m and bar m are not complex. Rather, both these elements are in fact real, while the elements lablled l and n are complex, with one being the negative complex conjugate of the other. While these are just labels, they don't agree with the usual conventions for the Newman-Penrose formalism, which is disorienting. What convention is Maple using to label the elments of a null tetrad?

Next, I try to specify the null tetrad used by Stephani et al., first by converting it into covariant form (which I did by hand rather than in Maple). In Maple's default null tetrad, the order in which Maple listed the elements of the null tetrad is n, m, bar m, l (as rows in the matrix display for e_[ ]), so I followed that convention (in the conventions of Stephani et al., the first and fourh element should have scalar product -1, the second and third scalar product 1, and all other scalar products zero, which is the case). After entering the matrix and using Setup to specify the null tetrad by the matrix, I get an error message saying that the components of the metric with respect to my tetrad are not just 0, 1, and -1. Yet,  executing eta_[ ]  does not confirm this warning; nor does a computation by hand.

Finally, IsTetrad asserts the tetrad is not null, contrary to the fact that it is a null tetrad.

Since I have followed the conventions implicit in Maple's default null tetrad for this metric, I am puzzled as to what has gone wrong.SKMHH27_37_2021_New.mw

On the other hand, taking into account how Maple 2019 orders the coordinates in Stephani et al 27.37 and labels the null vectors in a null ttetrad, if I translate accordingly what I have in the 2021 Maple file, Maple 2019 confirms Stephani et al.'s null tetrad is indeed a null tetrad, as one would expect. See the following file.SKMHH27_37_2019_Var.mw.

Hello everybody.

My goal is to solve the following integro-functional equation:

(int(p^2/(f(p)-f(p+q)+omega), p = a .. b))/omega^2 = ln(omega^2+q^2)

(int(p^2/(f(p)-f(p+q)+omega), p = a .. b))/omega^2 = ln(omega^2+q^2)

 

where where is the unknown function and a, b are some numerical values as well as ω and q are real positive variables.

I would be grateful for any ideas.

Hello I cant sign in on my other MapleCloud account to view all my other Maple Documents. 

It says "Oops an error stopped us, from verifying your account. Please sign in again or continue using public MapleCloud features maple" Any suggestions on how to fix it? 

@nm I can see that working for a signal that has a starting point other than 0 and no other shifts involved, but I am wondering about signals built from shifted steps / ramps / etc.  If the forcing function is something like r(t) - u(t-1) - r(t-1) with u(t)=Heaviside(t) and r(t) = t Heaviside(t).  I won't have time to see if I can break Maple with that until this weekend, but I plan to try!

Streamlines, isotherms and microrotations for Re = 1, Pr = 7.2, Gr = 105 and (a) Ha = 0 (b) Ha = 30 (c) Ha = 60 (d) Ha = 100.

 

Fig. 2

for Ra = 105Ha = 50, Pr = 0.025 and θ = 1 − Y

 

 

eqat := {M . (D(theta))(0)+2.*Pr . f(0) = 0, diff(phi(eta), eta, eta)+2.*Sc . f(eta) . (diff(phi(eta), eta))-(1/2)*S . Sc . eta . (diff(phi(eta), eta))+N[t]/N[b] . (diff(theta(eta), eta, eta)) = 0, diff(g(eta), eta, eta)-2.*(diff(f(eta), eta)) . g(eta)+2.*f(eta) . (diff(g(eta), eta))-S . (g(eta)+(1/2)*eta . (diff(g(eta), eta)))-1/(sigma . Re[r]) . ((1+d^%H . exp(-eta))/(1+d . exp(-eta))) . g(eta)-beta^%H . ((1+d^%H . exp(-eta))^2/sqrt(1+d . exp(-eta))) . g(eta) . sqrt((diff(f(eta), eta))^2+g(eta)^2) = 0, diff(theta(eta), eta, eta)+2.*Pr . f(eta) . (diff(theta(eta), eta))-(1/2)*S . Pr . eta . (diff(theta(eta), eta))+N[b] . Pr . ((diff(theta(eta), eta)) . (diff(phi(eta), eta)))+N[t] . Pr . ((diff(theta(eta), eta))^2)+4/3 . N . (diff((C[T]+theta(eta))^3 . (diff(theta(eta), eta)), eta)) = 0, diff(f(eta), eta, eta, eta)-(diff(f(eta), eta))^2+2.*f(eta) . (diff(f(eta), eta))+g(eta)^2-S . (diff(f(eta), eta)+(1/2)*eta . (diff(f(eta), eta, eta)))-1/(sigma . Re[r]) . ((1+d^%H . exp(-eta))/(1+d . exp(-eta))) . (diff(f(eta), eta))-beta^%H . ((1+d^%H . exp(-eta))^2/sqrt(1+d . exp(-eta))) . (diff(f(eta), eta)) . sqrt((diff(f(eta), eta))^2+g(eta)^2) = 0, g(0) = 1, g(6) = 0, phi(0) = 1, phi(6) = 0, theta(0) = 1, theta(6) = 0, (D(f))(0) = 1, (D(f))(6) = 0};
sys1 := eval(eqat, {M = 0, N = 2, Pr = .8, S = -2.5, Sc = .5, d = 2, sigma = .2, C[T] = .5, N[b] = .4, N[t] = .4, Re[r] = 1.1, beta^%H = .2, d^%H = 1.5});
sys2 := eval(eqat, {M = 0, N = 2, Pr = .8, S = -2.5, Sc = .5, d = 2, sigma = .2, C[T] = .5, N[b] = .4, N[t] = .4, Re[r] = 1.1, beta^%H = .4, d^%H = 1.5});
sys3 := eval(eqat, {M = 0, N = 2, Pr = .8, S = -2.5, Sc = .5, d = 2, sigma = .2, C[T] = .5, N[b] = .4, N[t] = .4, Re[r] = 1.1, beta^%H = .6, d^%H = 1.5});
sys4 := eval(eqat, {M = 0, N = 2, Pr = .8, S = -2.5, Sc = .5, d = 2, sigma = .2, C[T] = .5, N[b] = .4, N[t] = .4, Re[r] = 1.1, beta^%H = .8, d^%H = 1.5});
sys5 := eval(eqat, {M = .5, N = 2, Pr = .8, S = -2.5, Sc = .5, d = 2, sigma = .2, C[T] = .5, N[b] = .4, N[t] = .4, Re[r] = 1.1, beta^%H = .2, d^%H = 1.5});
sys6 := eval(eqat, {M = .5, N = 2, Pr = .8, S = -2.5, Sc = .5, d = 2, sigma = .2, C[T] = .5, N[b] = .4, N[t] = .4, Re[r] = 1.1, beta^%H = .4, d^%H = 1.5});
sys7 := eval(eqat, {M = .5, N = 2, Pr = .8, S = -2.5, Sc = .5, d = 2, sigma = .2, C[T] = .5, N[b] = .4, N[t] = .4, Re[r] = 1.1, beta^%H = .6, d^%H = 1.5});
sys8 := eval(eqat, {M = .5, N = 2, Pr = .8, S = -2.5, Sc = .5, d = 2, sigma = .2, C[T] = .5, N[b] = .4, N[t] = .4, Re[r] = 1.1, beta^%H = .8, d^%H = 1.5});
sys9 := eval(eqat, {M = 1, N = 2, Pr = .8, S = -2.5, Sc = .5, d = 2, sigma = .2, C[T] = .5, N[b] = .4, N[t] = .4, Re[r] = 1.1, beta^%H = .2, d^%H = 1.5});
sys10 := eval(eqat, {M = 1, N = 2, Pr = .8, S = -2.5, Sc = .5, d = 2, sigma = .2, C[T] = .5, N[b] = .4, N[t] = .4, Re[r] = 1.1, beta^%H = .4, d^%H = 1.5});
sys11 := eval(eqat, {M = 1, N = 2, Pr = .8, S = -2.5, Sc = .5, d = 2, sigma = .2, C[T] = .5, N[b] = .4, N[t] = .4, Re[r] = 1.1, beta^%H = .6, d^%H = 1.5});
sys12 := eval(eqat, {M = 1, N = 2, Pr = .8, S = -2.5, Sc = .5, d = 2, sigma = .2, C[T] = .5, N[b] = .4, N[t] = .4, Re[r] = 1.1, beta^%H = .8, d^%H = 1.5});
sys13 := eval(eqat, {M = 1.5, N = 2, Pr = .8, S = -2.5, Sc = .5, d = 2, sigma = .2, C[T] = .5, N[b] = .4, N[t] = .4, Re[r] = 1.1, beta^%H = .2, d^%H = 1.5});
sys14 := eval(eqat, {M = 1.5, N = 2, Pr = .8, S = -2.5, Sc = .5, d = 2, sigma = .2, C[T] = .5, N[b] = .4, N[t] = .4, Re[r] = 1.1, beta^%H = .4, d^%H = 1.5});
sys15 := eval(eqat, {M = 1.5, N = 2, Pr = .8, S = -2.5, Sc = .5, d = 2, sigma = .2, C[T] = .5, N[b] = .4, N[t] = .4, Re[r] = 1.1, beta^%H = .6, d^%H = 1.5});
sys16 := eval(eqat, {M = 1.5, N = 2, Pr = .8, S = -2.5, Sc = .5, d = 2, sigma = .2, C[T] = .5, N[b] = .4, N[t] = .4, Re[r] = 1.1, beta^%H = .8, d^%H = 1.5});
 

First 23 24 25 26 27 28 29 Last Page 25 of 334