Ask Your Question

permutations with property

asked 2017-04-03 22:41:41 +0100

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

How can I get a list of permutations $\sigma \in \mathfrak{S}_n$ with the property that $\sigma(i) \geq i-1$ for all $i =1, dots, n.$

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2017-04-04 10:52:09 +0100

FrédéricC gravatar image

Like that

sage: n=4
sage: [sigma for sigma in Permutations(n) if all(sigma(i)>=i-1 for i in range(1,n+1))]
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2017-04-03 22:41:41 +0100

Seen: 650 times

Last updated: Apr 04 '17