Question

There are 6 jobs with distinct difficulty levels, and 3 computers with distinct processing speeds. Each job is assigned to a computer such that:

  • The fastest computer gets the toughest job and the slowest computer gets the easiest job.
  • Every computer gets at least one job.

The number of ways in which this can be done is __________

Official answer and solution
Official answer
65
From
Official GATE 2021 answer key

Solution

Fix the assignments for the toughest and easiest jobs, then apply the principle of inclusion-exclusion to ensure the third computer receives at least one job.

Let the 3 computers be C1C_1 (fastest), C2C_2 (middle speed), and C3C_3 (slowest). Let the 6 jobs be J1<J2<J3<J4<J5<J6J_1 < J_2 < J_3 < J_4 < J_5 < J_6 in increasing order of difficulty, so J6J_6 is the toughest job and J1J_1 is the easiest job.

The problem states:

  1. The fastest computer (C1C_1) must get the toughest job (J6J_6).
  2. The slowest computer (C3C_3) must get the easiest job (J1J_1).
    Therefore, the assignments J6→C1J_6 \to C_1 and J1→C3J_1 \to C_3 are fixed. Notice that C1C_1 and C3C_3 are each already guaranteed at least one job.

There remain 4 unassigned jobs: J2,J3,J4,J5J_2, J_3, J_4, J_5. Each of these 4 jobs can be assigned to any of the 3 computers (C1,C2,C3C_1, C_2, C_3). The total number of unconstrained assignments for these 4 jobs is:

34=813^4 = 81

The second condition requires that 'Every computer gets at least one job'. Because C1C_1 already has J6J_6 and C3C_3 already has J1J_1, the condition is violated if and only if computer C2C_2 receives zero jobs from the remaining 4 jobs.

If C2C_2 receives no jobs, each of the 4 jobs must be placed on either C1C_1 or C3C_3 (2 choices per job). The number of such invalid assignments is:

24=162^4 = 16

Subtracting these invalid assignments gives the total number of valid ways:

81−16=6581 - 16 = 65
Final answer

65

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2021 Computer Science and Information Technology (CS, Set-1)
Question
29 of 65, printed as CS Q.19
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.