Processing math: 100%

Problem #212

Functional Permutations

Given a permutation p of length n, we define the following functions

S(p) = { i : p(i) > p(i+1), 1 \le i \le n-1 }

f(p) = Sum of elements of S(p).

Let F(n,k) = number of permutations p of length n with f(p) = k.

find F(123,321) modulo 10^9 +7

Contributed by Aman Dubey

Solved by 9 users

Log in to submit answers.

Is something wrong?

Maintaining a collection of high quality questions is our top priority. If, however, you do find an error, report the problem and we'll make sure it is reviewed soon.