1

So this question particularly deals with permutations and combinations and it goes like:

  • Let A = {1,2,3,4,5} and B = {0,1,2,3,4,5} then the number of one-one function f : A → B that can be defined so that f(i) ≠ i ∀ i = 2,3,4,5 and f(1) ≠ 0 or 1 is -

My try: The answer to this problem was given as D₆.(4/5) + D₅. I tried using derangement to solve this problem. I added an element, suppose 0, to set A and the did the derangement of 6 things. But we get those cases in which 1 is mapped with 0 and the mappings of 0 to some element of B. How do I remove these cases? Better explanations are appreciated.

N. F. Taussig
  • 79,074
PXsmath
  • 107
  • 7
  • 1
    The term $D_5$ counts the number of functions $f: A \to B$ in which $f(i) \neq i$ for $1 \leq i \leq 5$ and $0$ does not appear in the range. Therefore, the author is claiming that $\frac{4}{5}D_6$ is the number of functions $f: A \to B$ in which $0$ is in the range, $f(i) \neq i$ for $1 \leq i \leq 5$ and $f(1) \neq 0$. – N. F. Taussig Oct 16 '24 at 09:53
  • Good thought. The real question is how could one justify the term D₆.(4/5). How does one conclude that it is denotes the number of such functions as you said? – PXsmath Oct 17 '24 at 01:57

1 Answers1

1

Personally, I prefer Inclusion-Exclusion here. See this article for an introduction to Inclusion-Exclusion. Then, see this answer for an explanation of and justification for the Inclusion-Exclusion formula.

Let $~S~$ denote the set of all 1-1 permutations, ignoring the constraints on $~f(1), \cdots, f(5).~$

For $~k \in \{1,2,\cdots,5\},~$ let $~S_k~$ denote the subset of $~S~$ where the constraint on $~f(k)~$ is violated.

Then, the desired computation is

$$| ~S ~| - | ~S_1 \cup S_2 \cup \cdots \cup S_5 ~|. \tag1 $$

Let $~T_0~$ denote $~| ~S ~|.~$

For $~r \in \{1,2,\cdots,5\},~$
let $~T_r~$ denote $~\displaystyle \sum_{1 \leq i_1 < i_2 < \cdots < i_r \leq 5} | ~S_{i_1} \cap S_{i_1} \cap S_{i_2} \cap \cdots \cap S_{i_r} ~|.$

That is, $~T_r~$ denotes the sum of $~\displaystyle \binom{5}{r}~$ terms.

Then, by Inclusion-Exclusion theory, the computation in (1) above is equivalent to

$$\sum_{r=0}^5 (-1)^r T_r.$$

Therefore, the problem reduces to computing $~T_r ~: r \in \{0,1,2,\cdots,5\}.$


$\underline{\text{Computation of} ~T_0}$

There are $~6~$ choices for $~f(1),~$ then $~5~$ choices for $~f(2),~$ and so forth.

So,

$$T_0 = 6!.$$


$\underline{\text{Computation of} ~T_1}$

To compute $~| ~S_1~|,~$ consider that there are $~2~$ choices for $~f(1),~$ and then $~5!~$ choices for the remaining domain elements.

To compute $~| ~S_k ~| ~: k > 1,~$ consider that there is $~1~$ choice for $~f(k),~$ and then $~5!~$ choices for the remaining domain elements.

Therefore,

$$T_1 = (2 + 4) \times 5! = 6!.$$


$\underline{\text{Computation of} ~T_r ~: ~r \geq 2}$

Clearly, $~T_5 = 2,~$ since $~f(1)~$ has $~2~$ choices. The remainder of this section assumes that $~2 \leq r \leq 4.$

I will use the variables:

  • $T_{ra}~$ to denote that one of the subsets in violation is $~S_1.~$

  • $T_{rb}~$ to denote that $~S_1~$ is not one of the subsets that is forced to be in violation.

$T_{ra}~$ may be represented by

$$| ~S_1 \cap S_2 \cap \cdots \cap S_r ~|. $$

There will be $~\displaystyle \binom{4}{r-1}~$ such terms, and each term will equal

$$2 \times (6-r)!.$$

Therefore,

$$T_{ra} = \binom{4}{r-1} \times 2 \times (6-r)!.$$

$T_{rb}~$ may be represented by

$$| ~S_2 \cap S_2 \cap S_{r+1} ~|. \tag1 $$

There will be $~\displaystyle \binom{4}{r}~$ such terms, and each term will equal

$$(6-r)!.$$

Therefore,

$$T_{rb} = \binom{4}{r} \times (6-r)!.$$

So,

$$T_r = T_{ra} + T_{rb}$$

$$= (6-r)! \times \left\{ ~\binom{4}{r} + \left[ ~2 \times \binom{4}{r-1} ~\right] ~\right\}.$$


$\underline{\text{Final Computation}}$

The computation is

$$\sum_{r=0}^5 (-1)^r T_r$$

where

  • $\displaystyle T_0 = 6!$

  • $\displaystyle T_1 = 6!$

  • $\displaystyle T_5 = 2.$

  • For $~2 \leq r \leq 4,$
    $\displaystyle T_r = (6-r)! \times \left\{ ~\binom{4}{r} + \left[ ~2 \times \binom{4}{r-1} ~\right] ~\right\}.$

user2661923
  • 42,303
  • 3
  • 21
  • 46