MY question is to get general formula for repeated permutation: For any $n$ numbers,
$n=1,2,3, \ldots$
Derangement formula: $$D_n=!n=(n−1)(!(n−1)+!(n−2))$$ Here the numbers are distinct from one another (no repetition of any number in permutation) https://en.wikipedia.org/wiki/Derangement
Partial derangement: Instead of $n$ derangement we have $k$ derangements, for $n \geq 0$ and $0 \leq k \leq n$, the rencontres number $D_{n, k}$ Partial derangement or rencontre number: https://en.wikipedia.org/wiki/Rencontres_numbers
Is there any general formula for partial derangement of permutation with repeated number (repeated numbers exist in permutation). For example:
$n=1,1,2,2,3,3,4,5$
Any general formula for Derangement of $k$ numbers??
Rewriting your above example: suppose A is blue and B,C are red; we have the permutations: \begin{matrix} ABC\rightarrow ABC \\ ABC\rightarrow ACB\\ ABC\rightarrow BAC \\ ABC\rightarrow BCA \\ ABC\rightarrow CAB \\ ABC\rightarrow CBA \\ \end{matrix} For example, we have $N=3$,$M=2$ ($1<M<N$) Trying to calculate Probability : Example -1: $P(\overline{A \ or \ B} ) $ , Results: $\frac{3}{6}$
Similarly Example -2: $P(\overline{A \ or \ C}) $
$P$: Probability, $\overline{A \ or \ B}$ :not hit A or B and so on. Any generalized form of formula to calculate above probability?? I tried with inclusion and exclusion principle but not sure.
Another bigger scenario: suppose A is blue, B is red, C,D are green; We get final polynomial: $2x^4+10x^2+8x+4$ We have the permutations: \begin{matrix} ABCD\rightarrow ABCD (hit-4) \\ ABCD\rightarrow ABDC (hit-4)\\ ABCD\rightarrow ACBD (hit-2) \\ ABCD\rightarrow ACDB (hit-2) \\ ABCD\rightarrow ADBC (hit-2) \\ ABCD\rightarrow ADCB (hit-2) \\ ABCD\rightarrow BACD (hit-2) \\ ABCD\rightarrow BADC (hit-2) \\ ABCD\rightarrow BCAD (hit-1) \\ ABCD\rightarrow BCDA (hit-1) \\ ABCD\rightarrow BCAD (hit-1) \\ ABCD\rightarrow BCDA (hit-1) \\ ABCD\rightarrow CABD (hit-1) \\ ABCD\rightarrow CADB (hit-1) \\ ABCD\rightarrow CBAD (hit-2) \\ ABCD\rightarrow CBDA (hit-2) \\ ABCD\rightarrow CDAB (hit-0) \\ ABCD\rightarrow CDBA (hit-0) \\ ABCD\rightarrow DABC (hit-1) \\ ABCD\rightarrow DACB (hit-1) \\ ABCD\rightarrow DBAC (hit-2) \\ ABCD\rightarrow DBCA (hit-2) \\ ABCD\rightarrow DCAB (hit-0) \\ ABCD\rightarrow DCBA (hit-0) \\ \end{matrix}
For example, we have $N=4$,$M=3$ (any number less than $N$). Trying to calculate Probability : Example -1: $P(\overline{A \ or \ B \ or \ C}) $ , Results $\frac{something}{24}=?/24$
Similarly Example -2: we have $N=4$,$M=2$ ($1<M<N$). Trying to calculate Probability : $P(\overline{A \ or \ C}) $.
Inclusion exclusion principle: $P(A \ or \ B \ or C) $ =$P(A)+ P(B) + P(C) -P(A \cap B) - P(A \cap C) -P(B \cap C) + P(A\cup B \cup C) $. Just trying to get formula to calculate the probability of any number of $N$ and $M$ which will become complex for large number of $N$ and $M$!!!! Any generalized form of formula to calculate above probability from the rook polynomial theory??
I think I can rewrite the problem according to your statement: Given a set $S$ of $n_1+n_2+⋯+n_k$ distinguishable, colored objects, with $n_i$ of them colored with the ith color, how many permutations are there of $S$ so that either any of $r$ elements ($r<=k$) map to their own color (or does not map their own color)?
Given a set of colors $C$, a subset $S \subset C$, and a collection of $n = n_1 + n_2 + \cdots + n_k$ objects, with $n_i$ colored with the $i$th color, how many permutations are there of the objects so that no object colored with a color in $S$ maps to itself?
e.g., if $1,2$ are red and $3$ is blue, how many permutations are there of ${1,2,3}$ so that no red element maps to itself?
– Jair Taylor Oct 05 '19 at 17:09OR (ex.2) no blue or red or green element maps to itself etc. – Tahid Oct 05 '19 at 23:58