Having time to talk about politics, Why not solve an interesting counting problem?

Revision en2, by Yubai, 2022-02-25 10:23:38

Given are Permutations of $$$(1,2,...N):p(p_1, p_2,...,p_N),q(q_1, q_2, ..., q_N)$$$

When you choose a number in the first permutation, the same position in the second permutation and the same value in the second permutation are both banned.

For example: $$$p:(1,3,2,4), q:(1,2,3,4)$$$

When you choose $$$p[2]=3$$$, you can't choose $$$q[2]$$$ with the same position and also can't choose $$$q[3]=3$$$ with the same val.

Find the ways of choose $$$i$$$ elements in the first permutation and left $$$j$$$ elements in the second permutation not banned, for erevy $$$i, j \leq N$$$

$$$N \leq 3000$$$.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English Yubai 2022-02-25 11:01:22 85
en2 English Yubai 2022-02-25 10:23:38 19
en1 English Yubai 2022-02-25 10:09:04 642 Initial revision (published)