The function Minors yields the minors of a matrix. Is there a function that yields the permanent minors of a matrix?
|
For matrices of numbers this is fairly efficient.
Example:
--- edit --- I should mention that I did not come up with this method of computing a permanent. I was fairly certain I had seen it before. Tracking through past email, it turns out that Stephen Wolfram had sent substantially the code same to a bunch of people here, soliciting comments on efficiency (might have been related to his NKS book, I'm not sure). For symbolic matrices the following may work better.
That was my one modest contribution to the thread. (This was in 1999; I now realize it was his 40th birthday. Also my brother's.) --- end edit --- |
|||||||||||||||||||||
|
|
Perhaps just:
|
|||
|
|
|
This seems like a case where memoizing could save a lot of speed.
I also loaded Daniel Lichtblau's solution. His testing run:
and mine
Check that the code works:
Replacing the dot product of two
But has basically no effect on speed
|
|||||||||
|
Minors[Array[Subscript[a,##]&,{n,n}],k]for anynandk<n, then replace all minus signs by plus signs =) – Jesko Hüttenhain Feb 28 at 16:07