MDD

337 Reputation

7 Badges

9 years, 140 days

MaplePrimes Activity


These are replies submitted by MDD

@acer 

Thanks for this comparison. 

@acer a+b also is a parameter for me so the output is true.

Also, I have the list of variables and parameters at the beginning of computations. 

 

@mmcdara 

Dear MMcdara and dear Acer,

 

Thanks for your helpful answer. Which of them is more efficient?

 

With best regards

@Joe Riel  This is OK, Thank you so much.

@Carl Love Thanks for your attention. It has to returns FALSE.

In fact, I need a command or procedure which its input is a list of (parametric) polynomials and its output is true or false. If all f_i are linear (variables have degree 1) it returns true else returns false.

@Kitonum 

Thank you so much for your implementation. It seems that is OK for this example. I will run some example and I report you if there is any problem.

Thanks again.

Sincerely yours.

@tomleslie 

Thnak you for your answer, but I need as the following matrix M associated to the first element of the above list L i.e; 

[a*x^2+b*x*y-1, -(a*b-b)*x*y/a-z^2+(a-1)/a, -a*c*z^2/(b*(a-1))+(b+c)/b]

So, a procedure is needed that produce these matrices for any element of L, automatically.

@Joe Riel 

Thanks again. I think that I did this.

The explain of my question was: In the first of my implementation A:=[a*x^2+b*x*y-2, (a-1)*x^2-z^2, c*x*y+1] is a list of polynomials. I linearise it using A1 (instead of x^2), A2 (instead of x*y), A3 (instead of z^2) and A4 (instead of 1). So I have AA:=[A1*a+A2*b-2*A4, (a-1)*A1-A3, A2*c+A4]. In the middle of computation some linear polynomial add into AA. In the end of computation it is needed that A1 and A2 and A3 and A4 change to thier related monomials. By  your function "map(rhs=lhs, S)" I can change A1, A2, A3. Could you please help me how can I change A4 to 1 simultaneously and automatically (using nops(map(rhs=lhs, S)))?

@Joe Riel 

Thanks for your answer. In fact, in the first of my implementation A:=[a*x^2+b*x*y-2, (a-1)*x^2-z^2, c*x*y+1] is a list of polynomials and AA:=[A1*a+A2*b-2*A4, (a-1)*A1-A3, A2*c+A4] is its linear form. In the end of computation it is needed that A1 and A2 and A3 and A4 change to thier related monomials. By  your function "map(rhs=lhs, S)" I can change A1, A2, A3. Could you please help me how can I change A4 to 1 automatically (using nops(map(rhs=lhs, S))) and simultaneously?

Hi dear,

At the first could you please say what is your degree (gratuate or under gratuate)?

@acer 

Thanks for your comment.

@vv 

Hi dear,

Thanks again. Could you please state that what is {3, 4, 11} in the output?

With the bests

@vv 

Thanks again for your solution. I interested to Convex package, Could you please explain to me how can I use this package?

@vv 

Thank you for your direct solution. But, when I run it in Maple 18 the following error is appeared. What is problem. Also is your implementation general or is appropriate for this example, only?

I am looking forward hearing from you.

Sincerely yours.

``

FacetsOfPolyhedralCone := proc (L::list) local i, j, J, A, X, u; X := indets(L, name); A := LinearAlgebra:-GenerateMatrix(L, X)[1]; J := {seq(1 .. nops(L))}; for j in J do add(-A[i]*u[i]+A[j], i = `minus`(J, {j})); `~`[`=`](convert(%, list), 0); if simplex:-minimize(0, %, NONNEGATIVE) <> {} then J := `minus`(J, {j}) end if end do; J, L[[J[]]] end proc:

L := [y-z, 3*y-2*z, 2*y-2*z, x-2*y+z, x-y, 2*x-y, x-z, x+y-z, x, y, z]; FacetsOfPolyhedralCone(L)

Error, (in FacetsOfPolyhedralCone) `simplex` does not evaluate to a module

 

``

``


 

Download direct.mw

@vv 

Thank you so much for your comment. I saw the Cnvex package. But, how I use it in my Maple 15 or 18?

2 3 4 5 6 7 8 Page 4 of 11