Post Reply 
Construct Matrix with given Permanent
01-05-2024, 09:19 PM
Post: #5
RE: Construct Matrix with given Permanent
(01-04-2024 01:01 PM)J-F Garnier Wrote:  If you look closely at my solution, you will see that I sorted the array rows by the number of 1 in each row, not by the value of the binary representation:

20 DATA 0,0,1,0,0,0,0,0,0,1,0,0
21 DATA 0,0,1,0,0,0,0,0,0,1,0,1
22 DATA 0,0,1,1,0,0,0,0,0,1,0,1
23 DATA 0,0,1,1,0,0,0,0,0,1,1,1
24 DATA 1,0,1,1,0,0,0,0,0,1,1,1
25 DATA 1,0,1,1,0,0,0,1,0,1,1,1
26 DATA 1,0,1,1,1,0,0,1,0,1,1,1
27 DATA 0,1,0,1,1,1,1,1,1,1,0,1
28 DATA 1,0,1,1,1,0,1,1,0,1,1,1
29 DATA 1,0,1,1,1,0,1,1,1,1,1,1
30 DATA 1,0,1,1,1,1,1,1,1,1,1,1
31 DATA 1,1,1,1,1,1,1,1,1,1,1,1

This was the most important part of my 'optimization'
...
I did notice the structure of the sorted array and the exception of row 8 (of the sorted array),
but without paying too much attention to it.

If we sort columns the same way, then move red row to top, we have "standard form"

But, we don't need actual sorting.
Columns zeros count can be used to locate where red cells are, if sorted.

> r := [0,1,0,1,1,1,1,1,1,1,0,1];   /* red row */
> z := [4,10,0,2,6,9,7,5,8,0,3,1]; /* column zeroes count, without red row */
> r * 2^z                                    /* permanent(m), note: * is dot product */

2023
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Construct Matrix with given Permanent - Albert Chan - 01-05-2024 09:19 PM



User(s) browsing this thread: 3 Guest(s)