Constrained Permutations
Let denote the permutation of the set that maps . Define the length of the permutation to be ; note that the empty permutation has length zero.
Define an occurrence of a permutation in a permutation to be a sequence such that if and only if for all .
For example, occurs twice in the permutation : once as the 1st, 3rd, 4th and 6th elements , and once as the 2nd, 3rd, 4th and 6th elements .
Let be the number of permutations of length at most such that there is no occurrence of the permutation in and there are at most occurrences of the permutation in .
For example, , with the permutations , , but not .
You are also given that and .
Find modulo .
带约束的排列
用表示将集合 按照映射的排列。记这样的排列的长度为;注意空排列的长度视为0。
考虑排列和较短的排列,如果存在序列 ,使得对任意, 当且仅当,则称在中出现了一次。
例如,排列在排列中出现了两次:第一次由第1、3、4、6个元素组成,即 ;第二次由第2、3、4、6个元素组成,即。
考虑所有长度不超过的排列,其中,没有排列出现,且排列出现至多次的排列总数记为。
例如,,这三种排列分别是,和,而不满足要求。
已知,以及。
求并对取余。
Gitalking ...