Mathematica
Published in Leslie Hogben, Richard Brualdi, Anne Greenbaum, Roy Mathias, Handbook of Linear Algebra, 2006
Heikki Ruskeepää
(Permanent) (See Chapter 31 for the definition and more information about permanents.) A permanent of a square matrix M with n rows can be computed as the coefficient of the product x1x2···xn in the product of the components of the vector Mv, where ν = (x1, …, xn). So, a permanent can be calculated with the following program:
permanent[m_] ≔ With[{v = Array[x, Length[m]]},Coefficient[Apply[Times, m.v], Apply[Times, v]]]m = {{6, 2, 3}, {2, 7, 5}, {4, 2, 5}};permanent[m] 426