## 45 Reputation

3 years, 272 days

## Yes, thank you...

@Carl Love  Thanks for making it clear. Yes, I need all the possible P's.

## Yes that's correct...

@vv That's right, (if it exists) I'm interested in P. To do this, I need to check all possible P's.

## The Pi matrices are permutation matrices...

@Joe Riel  Thanks for the reply. The Pi matrices (from my example) are permutations of the entries of the vector, not permutations of the positions of the vectors in the list.  I'm not really interested in the order of the elements but the elements themselves. In my example you can check that

for i in L1 do Multiply(i, P1) end do;
>[0 0 0]
[2 1 2]
[1 2 1]

cause P1 is the identity matrix. And so P1 does not satisfy the condition that, when applied to all the elements of L1, will obtain all the elements of L2. But P3 does satisfy the condition since:

for i in L1 do Multiply(i, P3) end do;
>[0 0 0]
[2 2 1]
[1 1 2]

and L2:=[<1|1|2>,<2|2|1>,<0|0|0>]; . The order of the vectors does not matter as long as they are in L2.

I hope the problem is clearer now.

## How to?...

@acer Hi friend, I was wondering how can I correct Tomleslie's latest program using the CoefficientList function as you suggest? I appreciate your answer in advance. And sorry to bring this old topic again.

## Thank you...

@acer I'm not that interested in efficiency at the moment. For now I am just generating some vectors to do some operations. Thank you.

## expand...

@acer Thanks for the reply. Quick question, if I wanted to expand the product, how can I adjust the above command?

Edit: I already saw that I can use

map(expand@`*`@op,a1);

## mul...

@Kitonum Thank you for the replay. The 'mul' command isn't working for me, I get the error 'expects 2 arguments, but received 1'. Maybe you could help me.

a := {x+1,x+2,x^2+1,x^2+x+2};
a1 := combinat:-choose(a, 3);
map(mul, a1);
Error, invalid input: mul expects 2 arguments, but received 1

## Thanks for the answer!...

In both cases, do you know how can I change the scale on the x-axis to be from 0 to 256 and not from 0 to 1?

## Thank you!...

Thank you very much for your help!

## Thank you!...

Thank you very much for the answer!

## Thank you...

Thank you very much for the help!

## Thank you!...

Thank you very much for your help, the program works very well.

## Thank you...

@tomleslie

Thank you very much for the alternative answer.

## Thank you...

@acer That's a very elegant solution, thank's a lot for the help!

## I was planning to...

@acer Thank you for the answer!

I'm going to perform a Matrix multiplication, something like this:

I think it's an easy way to achieve it (or maybe not).

 Page 1 of 1
﻿