Faster tensor canonicalization
Abstract
The Butler-Portugal algorithm for obtaining the canonical form of a tensor expression, by permuting its n index labels with respect to slot symmetries and dummy-index renaming, suffers, in certain cases with a high degree of symmetry, from O(n !) explosion in both computation time and memory. We present a modified algorithm which alleviates this problem in the most common cases - tensor expressions with subsets of indices which are totally symmetric or totally antisymmetric - in polynomial time. We also present an implementation of the label-renaming mechanism which improves upon that of the original Butler-Portugal algorithm, thus providing a significant speed increase for the average case as well as the highly-symmetric special case. The worst-case behavior remains O(n !) , although it occurs in more limited situations less likely to appear in actual computations. We comment on possible strategies to take if the nature of a computation should make these situations more likely.
- Publication:
-
Computer Physics Communications
- Pub Date:
- July 2018
- DOI:
- 10.1016/j.cpc.2018.02.014
- arXiv:
- arXiv:1702.08114
- Bibcode:
- 2018CoPhC.228..123N
- Keywords:
-
- 02.70.Wz;
- Tensor canonicalization;
- Symbolic computation;
- Computer Science - Symbolic Computation;
- High Energy Physics - Theory
- E-Print:
- 45 pages + appendices and references, 9 figures, version 3 (fixed some references, grant acknowledgement, added link to source code)