Transposition

Constructs a transposition.

Syntax

transposition(Integer, Integer)

Description

Given two integers a and b, returns the permutation that maps aLaTeXa to bLaTeXb, bLaTeXb to aLaTeXa, and all the other elements remain unchanged. The length of the permutation is given by the maximum of aLaTeXa and bLaTeXb.

arithmetic.transposition.calc.png