6
$\begingroup$

Suppose $2$ sets with cardinality $X=5$ and $Y=7$.

How many one to one function from $X$ to $Y$ such that $k$th element of $X$ should not align with the $k$ th element of $Y$ ?


I think one to one possible are $6\times 5\times 4\times 3\times 2$, but not sure though.

  • 1
    I doubt your answer. The first element maps to one of six for sure, But the second element can also map to one of six when the first maps to the second.2017-01-15
  • 0
    How about inclusion-exclusion principle?2017-01-15
  • 0
    @TomCollinge You are right. I missed some possibilities .2017-01-15
  • 1
    Reminds me of [the hat-check problem](https://en.wikipedia.org/wiki/Derangement#Counting_derangements).2017-01-15
  • 0
    @JeppeStigNielsen Yes, indeed it's a derangement .2017-01-15

1 Answers 1

1

Total no. of one-to-one functions from $X$ to $Y$ = $^7P_5=2520$.

Now if any of the $k$th elements of $X$ and $Y$ align (call this property $A$) , we have the following cases:

  1. $X_1 \to Y_1$ and the rest unrestricted
  2. $X_2 \to Y_2$ and the rest unrestricted
  3. $X_3 \to Y_3$ and the rest unrestricted
  4. $X_4 \to Y_4$ and the rest unrestricted
  5. $X_5 \to Y_5$ and the rest unrestricted

Each of them create $^6P_4=360$ functions implying $1800$ functions in total.

But then there are repetitions as $(1)$ and $(2)$ contain parts of each other and so on for the others as well. Hence there are overcalculations.

So we deduct $\binom{5}{2}\times \,^5P_3= ?_1 $ functions.

But again we have overdeducted those where $3$ cases have their intersection.

So we add $\binom{5}{3}\times \,^4P_2= ?_2 $ functions.

Again, there is a overcalculation of those functions where $4$ cases have their intersection.

So we deduct $\binom{5}{4}\times \,^3P_1= ?_3 $ functions.

But again we have overdeducted those where $5$ cases have their intersection. And that is why we add $1$ function.

So the total no.of functions that satisfy the property $A$
= $1800-\binom{5}{2}\times \,^5P_3+\binom{5}{3}\times \,^4P_2-\binom{5}{4}\times \,^3P_1+1=?_4$

Hence your answer is $2520-?_5$.

Hope this helps.

  • 0
    Thankyou very much ! I got my error !!2017-01-15
  • 1
    You're welcome :)2017-01-15