Given a set of elements N = {1, 2, …, n} and two arbitrary subsets A⊆N and B⊆N, how many of the n! permutations π from N to N satisfy min(π(A)) = min(π(B)), where min(S) is the smallest integer in the set of integers S, and π(S) is the set of integers obtained by applying permutation π to each element of S?

**(A)** (n – |A ∪ B|) |A| |B|

**(B)** (|A|^{2}+|B|^{2})n^{2}

**(C)** n! |A∩B| / |A∪B|

**(D)** |A∩B|^{2}nC|A∪B|

**Answer:** **(C)** **Explanation:** First let us understand what question is asking. So π is a function from N to N, which just permutes the elements of N, so there will be n! such permutations. Now given a particular π i.e. given a particular permutation scheme, we have to find number of permutations out of these n! permuations in which minimum elements of A and B after applying π to them are same.

So for example, if N = {1,2,3}, π is {2,3,1}, and if A is {1,3}, then π(A) = {2,1}.

Now number of elements in A ∪ B is |A ∪ B|. We can choose permutations for A ∪ B in nC|A∪B| ways. Note that here we are just choosing elements for permutation, and not actually permuting. Let this chosen set be P. Now once we have chosen numbers for permutations, we have to select mapping from each element of A ∪ B to some element of P.

So first of all, to achieve required condition specified in question, we have to map minimum number in P to any of the number in A ∩ B, so that min(π(A)) = min(π(B)). We can do this in |A∩B| ways, since we can choose any element of |A∩B| to be mapped to minimum number in P.

Now we come to permutation. We can permute numbers in P in |A∪B-1|! ways, since one number (minimum) is already fixed.

Moreover, we can also permute remaining n – |A∪B-1| in (n – |A∪B-1|)! ways, so total no. of ways =

nC|A∪B|∗|A∩B|∗|A∪B−1|!∗(n−|A∪B−1|)!=n!|A∩B||A∪B|

So option (C) is correct.

Note: Some answer keys on web have shown answer as option (D), which is clearly incorrect. Suppose |A ∪ B| = 3, and |A ∩ B| = 1, and n = 4, then option (D) evaluates to 14=0.25, which doesn’t make sense.

Source: http://www.cse.iitd.ac.in/~mittal/gate/gate_math_2006.html

Quiz of this Question

## Recommended Posts:

- GATE | GATE CS 1999 | Question 36
- GATE | GATE CS Mock 2018 | Question 39
- GATE | GATE CS 2013 | Question 1
- GATE | GATE CS 2013 | Question 3
- GATE | GATE CS 2013 | Question 4
- GATE | GATE CS 2013 | Question 65
- GATE | GATE CS 2013 | Question 6
- GATE | GATE CS 2013 | Question 7
- GATE | GATE CS 2013 | Question 8
- GATE | GATE CS 2013 | Question 65
- GATE | GATE CS 2013 | Question 65
- GATE | GATE CS 2013 | Question 11
- GATE | GATE CS 2013 | Question 65
- GATE | GATE CS 2013 | Question 17
- GATE | GATE CS 2013 | Question 18
- GATE | GATE CS 2013 | Question 19
- GATE | GATE CS 2013 | Question 65
- GATE | GATE CS 2013 | Question 65
- GATE | GATE CS 2013 | Question 22
- GATE | GATE CS 2013 | Question 23