OFFSET
0,3
COMMENTS
This is the simplest possible Catalan automorphism after the identity bijection (A001477). It effects the following transformation on the unlabeled rooted plane binary trees (letters A and B refer to arbitrary subtrees located on those vectices):
A B B A
\ / --> \ /
x x
(a . b) -----> (b . a)
Applying this permutation recursively to the right hand side branch of the binary trees produces permutations A069767 and A069768 (that occur at the same index 1 in tables A122203 and A122204), and applying this recursively to the both branches of binary trees (as in pre- or postorder traversal) produces A057163 (which occurs at the same index 1 in tables A122201 and A122202) that reflects the whole binary tree.
LINKS
FORMULA
EXAMPLE
To obtain the signature permutation, we apply these transformations to the binary trees as encoded and ordered by A014486 and for each n, a(n) will be the position of the tree to which the n-th tree is transformed to, as follows:
.
one tree of one internal
empty tree (non-leaf) node
x \/
n= 0 1
a(n)= 0 1 (both are always fixed)
.
.
\/ \/ \/ \/
\/ \/ \/ \/ \/ \/ \/ \/
\/ \/ \/ \/ \_/ \/ \/
n= 2 3 4 5 6 7 8
.
and the new shapes after swapping their left and right hand subtrees are:
.
\/ \/ \/ \/
\/ \/ \/ \/ \/ \/ \/ \/
\/ \/ \/ \/ \_/ \/ \/
a(n)= 3 2 7 8 6 4 5
thus we obtain the first nine terms of this sequence: 0, 1, 3, 2, 7, 8, 6, 4, 5.
PROG
(Scheme implementations of this automorphism. These act on S-expressions, i.e. list-structures:)
(CONSTRUCTIVE VERSION:) (define (*A069770 s) (if (pair? s) (cons (cdr s) (car s)) s))
(DESTRUCTIVE VERSION:) (define (*A069770! s) (if (pair? s) (let ((ex-car (car s))) (set-car! s (cdr s)) (set-cdr! s ex-car))) s)
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Apr 16 2002.
EXTENSIONS
Entry revised by Antti Karttunen, Oct 11 2006 and Mar 30 2024
STATUS
approved