| ||||||||||||||||||||||||||||||||||||||||||||||||||
|
Permutations, Signature, and TraceIn "Antisymmetrizing Functions," TMJ, 2 (1), 1992 p. 45, Permutations and Signature were used in the construction of totally antisymmetric functions, that is, functions that change sign under the interchange of any pair of arguments. Jorma Virtamo (jorma.virtamo@vtt.fi) suggested the following improved code. The Signature of a permutation is In "Calculus with Anticommuting Variables," TMJ, 8 (1), 2001 pp. 38-40, ordered determinants are computed using dynamic programming and Laplace expansion. For an interesting discussion of determinants of matrices with noncommutative entries, see [1]. Here is an alternative functional implementation, which is an extension of the code for Antisymmetrize. For example, the ordered determinant of a general is The code uses the observation that (ordered) terms in the determinant, say Tr[list, f] finds a generalized trace, combining terms with f instead of Plus. As an aside, Robert Knapp (rknapp@wolfram.com) writes: Here are two user-defined functions for computing the trace of a matrix. Note that Tr is much, much faster. The timings here are small, but if you have an application that requires repeatedly computing a trace, it makes a difference. Second, Tr generalizes to multiple dimensions. One can also use Tr to project out the list of diagonal elements. Here is a cute way to use it to speed up something very common. The thing to note here is that Tr[list of numbers] does the same thing as Apply[Plus, list of numbers], but is much faster for packed arrays. Copyright © 2002 Wolfram Media, Inc. All rights reserved. |