Processing math: 100%
Ask Your Question
1

permutations with property

asked 8 years ago

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 σSn with the property that σ(i)i1 for all i=1,dots,n.

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
1

answered 8 years ago

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))]
Preview: (hide)
link

Your Answer

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

Add Answer

Question Tools

Stats

Asked: 8 years ago

Seen: 1,110 times

Last updated: Apr 04 '17