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 (fastest), (middle speed), and (slowest). Let the 6 jobs be in increasing order of difficulty, so is the toughest job and is the easiest job.
The problem states:
- The fastest computer () must get the toughest job ().
- The slowest computer () must get the easiest job ().
Therefore, the assignments and are fixed. Notice that and are each already guaranteed at least one job.
There remain 4 unassigned jobs: . Each of these 4 jobs can be assigned to any of the 3 computers (). The total number of unconstrained assignments for these 4 jobs is:
The second condition requires that 'Every computer gets at least one job'. Because already has and already has , the condition is violated if and only if computer receives zero jobs from the remaining 4 jobs.
If receives no jobs, each of the 4 jobs must be placed on either or (2 choices per job). The number of such invalid assignments is:
Subtracting these invalid assignments gives the total number of valid ways:
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.