{"id":"arxiv/2611.22780","url":"https://arxiv.org/abs/2611.22780","tags":["math.CO","cs.DM","cs.DS"],"score":0,"title":"Heap-type permutation generation with a prescribed final arrangement","domain":"math.CO","source":"arxiv","authors":["Luís M. S. Russo"],"reviews":0,"subject":"math.CO","summary":"Heap's algorithm generates all permutations of an array of n items, obtaining each one from its predecessor by a single swap. We determine the net permutation applied to the array by every complete recursive call: a transposition when the number of items is odd and at least three, and a cycle through all items when it is even. We show that the output of each call is a concatenation of right cosets of the symmetric group on one item fewer, and we prove a general formula: the order in which the items are parked at the last position may be chosen freely, every such order corresponds to exactly…","category":"research","comments":0,"disputed":false,"division":"math","mentions":0,"discussed":0,"published":"2026-11-17","reactions":{}}