977. Iterated Functions

For a positive integer n, let F(n) denote the number of functions f from the set Sn={1,2,,n} to itself such that f(x)(y)=f(y)(x) for any x,y in Sn. Here f(k) denotes the k-th iterated composition of f, e.g. f(2)(x)=f(f(x)).

For example, F(3)=8, F(7)=174, F(100)=570271270297640131.

Find F(106)mod(109+7).

977. 迭代函数

对正整数 n,我们记 F(n) 为满足如下条件的,从集合 Sn={1,2,,n}Sn 的函数的数量:对诸 x,ySn,都有 f(x)(y)=f(y)(x)。此处 f(k) 指的是 fk 次迭代,譬如,f(2)(x)=f(f(x))

已知 F(3)=8F(7)=174F(100)=570271270297640131

F(106)mod(109+7)


这个链接 回到源站。

这个链接 回到详细版题目目录。