## 847 Reputation

11 years, 275 days
East Grinstead, United Kingdom

## Good too...

@Kitonum Thanks, easy to follow the logic.

## That works...

@John Fredsted Thank you

## Answers it fine...

@acer That's whats causing it. Thank for all you explaninations on this.

## It was your worksheet...

@acer  I should have said I downloaded your wokksheet.and ran it as it is. That is what I meant. Wondering if it is to do with a Maple setting. I'm using Maple 18. Am well aware how to upload worksheets as I usually do an example one, when I have a question, Admittately in 2D format.

## Such a good detailed explination...

Very explanitory. I am a bit confused on one point.

after you assign a:=5   M; dispalys as 5 , 10 ,15 20. On my machine M still displays as  a, 2a,  3a, a^2. rtable_eval works fine.

I can't get copy past to work from my screen to show you.

 a:=5;

 > # You see the 5, not 'a', but this is just an artefact of evaluation during printing.M;

## That works....

Ok. That solved my issue. Took a bit of rearranging in the worksheet. I had to use simplify(M) to make it evaluate.

Thank You.

## That Works...

Thank you, That works nicely especially if I keep thing simple.

## Usually Yes...

I agree in principle, that is the sort of thing I normally do. The Sigmas are also being problematic.

Another evariant of this  I have had a problem with recently

A1:= 2b+c

maple returns                                  A1:=2b+c

Trere could be 10 of these A1..A10

Sometimes I need to list the equations later and it would be very usefuel to see, expecially when the equations are long

For i to 10 do

Display Ai ;

end do

A1  2b+c

A2   3c-4d

A3   ...... etc

## Works!...

Wow. Thank you very much. That totally solved the problem.

## Useful to Know...

Thank you. That is useful to know.

## @roman_pearce Can't figure out the ...

Can't figure out the mapping. I removed 2 elements from f and made f1 and a new list C1. I neet to compare list C1 to C and insert 2 0's at the appropiate points.

 (1)

 (2)

 (3)

 (4)

 (5)

 (6)

## A more detailed version of the question...

Hi thanks for reply. I'll explain in more detail why I am sorting as a list. For example.

V1 = [x,yx,xyz,xy^2, x^2yz,xz^2] is a list of variables. This has and associated list of coefficients

C1=[1+a,a^2-3,a^3-a^2,15,2+a,-12]     Both these lists have 6 elements

V2= [x,yx,xyz, x^2yz,xz^2]

C2=[a,2,1-3a,a^2-5,7a,a^2]  5 elements in V2 & C2. V2 is missing "xy^2", i.e. the 4th element in V1

I have 19 lists of variables and coefficients. Max list length is 19 some lists only 16 or 17 elements. The coefficients lists form the rows of 19x 19 matrix. The determinant is used to get a univariate polynomial in "a".

The missing elements in the variable lists cause elements of the coefficient lists to be placed in wrong columns.

I see 2 possible sorting stratagies

a) add a 0 to C2  in 4th position increasing its length by 1.

b) sort C1,V1 based on the sequence of variables in V2 and placing the "xy^2" at the end of the list

New  V1 = [x,yx,xyz, x^2yz,xz^2,xy^2] and C1=[1+a,a^2-3,a^3-a^2,2+a,-12,15]

I do not know how the impliment either of the approaches.

I posted this last night when trying to sort the problem. The above describes the core of the problem

http://www.mapleprimes.com/questions/211562--Groebner--Produces-Inconsistent-Result

## Problem lies in variable length lists...

I think I have figured out the source of the problem. The sorting produces a list of variables ss_n and a list of coefficients sm_n. The max length of the useful variable list is 19 with a corresponding list of 19 coefficients. Some lists are shorter say  have 16 or 17 elements in them.

for example ss_29 is missing u2^3u0,u2^3u1 & u2^4

u2^3u0 & u2^3u1 are 6th 7th elements in a full list. This caused the remainder of the elements to be placed in the wrong columns. As u2^2 is at the end of the list that doesn't cause a problem.

Possible solution

Add 0's where needed in the short coefficient lists to compensate. How would I do that?

How to chech that all lists are following the same sequence?  Different runs produce different sequence of elements in the lists.

Is there a better way of sorting the equations to produce the desired result?

 (1)

 (2)

ss_29 is missing

## A step forward....

@Torre Thank You. Have Experimented with your Suggestion. Closeset I got was with Q diagonal matrix [1,1,0]. Produdes correct number of zeroes but row and columns e4 and e5 would need to be reversed. Looks like I need a 4x4 matrix as shown at end. Could not make a table with the "Structure Equations. Would appreciate any further suggestions.

 (1)

 (2)

 (3)

 (4)

 (5)

 (6)

 (7)

 (8)

 (9)

 (10)

 (11)

 (12)

 (13)