aaa333

20 Reputation

4 Badges

11 years, 260 days

MaplePrimes Activity


These are questions asked by aaa333

I have a function d(x,y,z) that returns the appropriate standard basis vector in 8 dimensions, e.g. d(0,0,0) is the column vector <1,0,0,0,0,0,0,0> and d(0,1,0) is <0,0,1,0,0,0,0,0>. Now, to make a sum over all possible elements, I have tried a sum like this:
sum(sum(sum(a_(i,j,k)*d(i, j, k), k = 0 .. 1), j = 0 .. 1), i = 0 .. 1)

with a_(i,j,k) simply being some coefficient that I want to place in the appropriate position. Basically, I would like to get a column vector: <a_000, a_001, a_010, a_011, a_100, a_101, a_110, a_111>, but the result of the sum above is: <0, 0, 0, 0, 0, 0, 0, a_000 + a_001 + a_010 + a_011 + a_100 + a_101 + a_110 + a_111> instead.

This completely baffles me - it looks like the 'a' coefficients are given the correct indices, but d() is always called with d(1,1,1). Can anyone help? Thank you.

I have a variable with some assumptions: assume(0<=W<=1).

Now, when I make a list and sort it, everything goes fine:

k := [W, (1/3)*W, (1/3)*W, (1/3)*W]:
sort(k, (a,b)->is(a>b))

I get [(1/3)W, (1/3)W, (1/3)W, W] as expected.

Now I try this:

k:= Vector[column]([W, (1/3)*W, (1/3)*W, (1/3)*W]) 
sort(k, (a,b)->is(a>b))

And Maple gets stuck on this computation. I have tried on both Windows and Linux, on several different computers.

Hello,

I'm trying to sort a list of symbols respecting some assumptions I have made about them. For example, I'd like to assume that 0<x<1, and I would like [x, x^2, x^3] to be sorted into [x^3, x^2, x]. How would I accomplish that? Making an assumption with assume() does not affect anything, as the sort() function does not seem to be actually comparing the values of symbols (only numeric values). Any help will be appreciated.

Thank you. 

Page 1 of 1