In this generalized sense, the Steinhaus–Johnson–Trotter algorithm generates a Gray code for the permutations themselves.
U ovom generalizovanom slučaju Steinhaus-Johnson-Trotter algoritam generiše Grejov kod za same permutacije.