I have started reading the Art of Computer Programming Volume 1 by Knuth. The first half of the book is basic concepts in maths. On page 45 there is an algorithm to obtain the next (amount of) permutations of 231.
From
2 3 1 1/2 2 3 1 3/2 2 3 1 5/2 2 3 1 7/2
he goes to
3 4 2 1 3 4 1 2 2 4 1 3 2 3 1 4
by "renaming" as can be seen here:

I have no idea how he accomplishes this and there is no further explanation. Can someone explain more about this?