Group Abstract Group Abstract

Message Boards Message Boards

0
|
7.4K Views
|
4 Replies
|
0 Total Likes
View groups...
Share
Share this post:

How to Permute Column of a Matrix

Posted 9 years ago

Hi All, I have 5x4 matrix. I want to permute only element of columns such that each rows contains the same letter exactly once.

Here is my matrix

enter image description here

One possible matrix is m1 in the picture. I want to generate all matrix similar to m1. Exchange of column is not allowed.

Here is the code:

list = {a, b, c, d, e};

m = Table[Subscript[#, i], {i, 4}] & /@ list; MatrixForm@m

Any suggestions?

Thanks in advance..

POSTED BY: Okkes Dulgerci
4 Replies

Without access to Mathematica (desktop) I would suggest you look into Latin Rectangles, Circulants Matrix, or Toeplitz Matrices.

http://mathworld.wolfram.com/CirculantMatrix.html

and http://mathworld.wolfram.com/ToeplitzMatrix.html

POSTED BY: Hans Michel
Posted 9 years ago

Think how many permutations of the first column there can be, now many of the second, ... think how many matricies you will have when you "want to generate all matrix." Is that perhaps a problem?

Think why first doing Transpose, then doing some other things and finally doing another Transpose might be interesting.

Think what that "then doing some other things" might be.

Is this possibly related to a homework problem?

POSTED BY: Bill Simpson
Posted 9 years ago

Hi Bill, Thank you for your reply. No, it is not related to HW. I know there are

5! 4! 3! 2! 
=34560

possibilities.. I can't take the transpose, because it will change the my problem..

Thanks,

POSTED BY: Okkes Dulgerci
Posted 9 years ago

My suggestion to consider Transpose wasn't meant to change your problem, it was meant to put each column into a separate list, work on permuting those lists and then put the result back into the original form. Without considering your condition limiting the number in each row the number of matricies seems to be (5!)^4 and that is big.

Here is different idea. Suppose you leave the first column untouched. Can you think of a way to generate all the 120 different second columns and discard those columns which are not acceptable. Then repeat that process using first and second to eliminate from third...

When you are done with that then you could do the 5! permutations on every one of those solutions.

POSTED BY: Bill Simpson
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard