13.5.3 Tensor Multiple Contraction Pair Ordering
Tensor Multiple Contraction Pair Ordering defines the structured sequence of tensor contractions, ensuring precise mathematical operations in multi-index algebra.
Tensor Multiple Contraction Pair Ordering is the sequence in which the several slot pairs comprising a multiple index contraction operation are carried out, addressing whether that sequence affects the final result and what considerations, such as computational cost, may still depend on the chosen order.
The Question of Order Among Independent Pairs
Independence of Disjoint Pairs
When the slot pairs selected for a multiple index contraction operation are disjoint, involving no shared slots between them, each pair's summation index ranges over positions untouched by any other pair, meaning the pairs act independently of one another regardless of the sequence in which they are processed.
Invariance of the Final Result to Ordering
Because independent summations commute with one another, performing the summation over one pair before another, or in the reverse sequence, yields the identical final result, confirming that pair ordering does not affect the value produced by a multiple index contraction operation on disjoint pairs.
Ordering When Pairs Involve a Chain of Tensors
Sequential Contraction Along a Product Chain
When a multiple index contraction operation acts on a chain of tensors joined by the tensor product, with each pair linking adjacent factors in the chain, the several possible orderings in which the individual pairs may be contracted still produce the same final tensor, since the underlying summations remain independent regardless of grouping.
Grouping as an Associativity-Like Property
The equivalence of different pair orderings within a chain of contractions parallels the associativity property familiar from ordinary matrix multiplication, where the grouping of successive multiplications does not affect the final product, though the specific pairing of indices, rather than arbitrary grouping, is what determines this equivalence for tensors.
Ordering and Computational Cost
Cost Divergence Despite Result Invariance
Although differing pair orderings produce the same final result, the number of arithmetic operations required to reach that result, addressed within tensor contraction cost area, can vary substantially depending on which pair is contracted first, particularly within a chain of several tensors.
Choosing an Order to Minimize Intermediate Size
An ordering that contracts pairs likely to produce smaller intermediate tensors before those that would produce larger ones can reduce the overall computational cost of a multiple index contraction operation, even though every valid ordering remains mathematically equivalent in its final outcome.
Ordering Constraints When Pairs Are Not Fully Independent
Dependency Introduced by Shared Free Indices
While the slot pairs themselves must be disjoint to qualify as independent contractions, the free indices surviving from one contraction may be required as input to a subsequent operation applied afterward, in which case that later operation must wait for the completion of the earlier contraction supplying its input.
Distinguishing Required Sequencing from Optional Ordering
This form of dependency reflects a necessary sequencing between separate operations applied one after another, rather than a genuine ordering choice among the disjoint pairs of a single multiple index contraction operation, which remains free to be arranged in any order among themselves.
Relationship to Tensor Operation Notation
Multiple contraction pair ordering has no direct representation in tensor operation notation, since the notation itself, through its use of distinct repeated index symbols for each pair, specifies only which slots are linked and not the sequence in which the corresponding summations are to be carried out, leaving ordering as a matter external to the notated expression itself.