13.17.1 Tensor Contraction Sequence Pair Order
Tensor Contraction Sequence Pair Order defines how indices pair in tensor operations, ensuring structured and meaningful algebraic computations.
Tensor Contraction Sequence Pair Order is the specific ordering in which the individual index pairs selected for contraction within a multi-step sequence procedure are arranged, determining, for sequences containing dependent steps, which contraction must be carried out first, second, and so on, so that each subsequent pair remains well defined at the moment it is applied.
Definition
For a contraction sequence consisting of pairs , the sequence pair order is the total order relation:
specifying that is applied before for every consecutive pair in the list.
When Order Matters
Dependent Pair Chains
If references an index that only becomes a contractible slot after has been carried out, such as an index freed up by an earlier contraction in a chained product of several tensors, then the sequence pair order is not arbitrary: reversing it makes undefined at the point it would be attempted.
Shared Node Chains
In a diagram where node participates in two contractions, one with node and one with node , the pair order determines which product is formed first, or , though the final fully-contracted result is identical regardless of that choice, since ordinary multiplication and summation are associative.
When Order Does Not Matter
Disjoint Pairs
If every pair in the sequence involves indices entirely disjoint from every other pair, the sequence pair order can be permuted freely without altering the final residual tensor:
for any permutation of the indices .
Practical Consequence
When pair order does not matter, the sequence may be described purely by the unordered set of pairs, and the notion of ordering becomes an implementation convenience rather than a mathematical necessity.
Illustration of Order-Dependence
Relation to Sequence Procedure Validity
Sequence pair order is a refinement of the general contraction sequence procedure: while the procedure guarantees that each step is well defined given the outcome of prior steps, the pair order specifies precisely which relative orderings are required for validity and which are free choices that do not affect the final result, distinguishing mandatory ordering constraints from mere bookkeeping convention.