Combinatorics
USAMO
2015
A $\textit{permutation}$ of a finite set is a one-to-one function from the set onto itself. A $\textit{cycle}$ in a permutation $P$ is a nonempty sequence of distinct items $x_1, \cdots, x_n$ such that $P(x_1)=x_2$, $P(x_2)=x_3$, $\cdots$, $P(x_n)=x_1$. Note that we allow the 1-cycle $x_1$ where $P(x_1)=x_1$ and the 2-cycle $x_1, x_2$ where $P(x_1)=x_2$ and $P(x_2)=x_1$. Every permutation of a finite site splits the set into a finite number of disjoint cycles. If this number equal to 2, then the permutation is called $\textit{bi-cyclic}$. Computer the number of bi-cyclic permutation of the 7-element set formed by letters "PROBLEMS".