GateAI
Combinatorics

GATE CSE 2023 · Q48

MCQ2 marksMedium

Time

Let U={1,2,…,n}U = \{1, 2, \dots, n\}, where nn is a large positive integer greater than 1000. Let kk be a positive integer less than nn. Let A,BA, B be subsets of UU with ∣A∣=∣B∣=k|A| = |B| = k and A∩B=∅A \cap B = \emptyset. We say that a permutation of UU separates AA from BB if one of the following is true. - All members of AA appear in the permutation before any of the members of BB. - All members of BB appear in the permutation before any of the members of AA. How many permutations of UU separate AA from BB?

Select one answerSingle correct

Pick an option to check

Solution

Step-by-step verified solution

Official answer: D) 2 n2k (n - 2k)! (k!)2

Combinatorics

To construct a valid permutation of UU that separates AA from BB:

  1. Choose the positions for A∪BA \cup B: The total number of elements in A∪BA \cup B is ∣A∣+∣B∣=2k|A| + |B| = 2k. Out of the nn available positions in the permutation, we choose 2k2k positions in (n2k)\binom{n}{2k} ways.

  2. Place elements of AA and BB:

    • Case 1 (AA before BB): All kk elements of AA must occupy the first kk chosen positions (which can be arranged in k!k! ways), and all kk elements of BB must occupy the remaining kk chosen positions (which can be arranged in k!k! ways). This gives (k!)2(k!)^2 ways.

    • Case 2 (BB before AA): Similarly, all kk elements of BB occupy the first kk chosen positions, and all kk elements of AA occupy the last kk chosen positions. This gives (k!)2(k!)^2 ways.

    Since AA and BB are disjoint and non-empty, these two cases are mutually exclusive, yielding a total of 2(k!)22(k!)^2 ways to place the elements of AA and BB in the 2k2k chosen positions.

  3. Place the remaining elements: The remaining n−2kn - 2k elements of U∖(A∪B)U \setminus (A \cup B) can be arranged in the remaining n−2kn - 2k positions in (n−2k)!(n - 2k)! ways.

Multiplying these possibilities gives:

Total Permutations=2(n2k)(n−2k)!(k!)2\text{Total Permutations} = 2\binom{n}{2k}(n - 2k)!(k!)^2

Thus, option (D) is the correct answer.

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This Combinatorics previous year question is Q48 of the GATE CSE 2023 paper. Find more GATE CSE PYQs on Combinatorics in Engineering Mathematics, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related Combinatorics PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

Combinatorics in GATE CSE

Combinatorics has 19 GATE CSE PYQs across 15 papers from 2012 to 2025. 5 of them are 2-mark MCQs like this one, and it is the only one in GATE CSE 2023.

How GATE tests Combinatorics

More from GATE CSE 2023

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2023 · Q48 · MCQ

Let U = {1, 2, , n}, where n is a large positive integer greater than 1000. Let k be a positive integer less than n. Let A, B be subsets of U with |A| = |B| = k and A ∩ B = ∅. We say that a permutation of U separates A from B if one of the following is true. - All members of A appear in the permutation before any of the members of B. - All members of B appear in the permutation before any of the members of A. How many permutations of U separate A from B?

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.