Question:medium

There are 8 tasks and 8 persons. Task 1 cannot be assigned either to person 1 or to person 2 or to person 8; task 2 must be assigned to either person 3 or person 4 or person 5. Every person is to be assigned one task. In how many ways can the tasks be assigned?

Updated On: Nov 25, 2025
  • 3360
  • 5040
  • 6720
  • 8640
  • 20160
Hide Solution

The Correct Option is D

Solution and Explanation

The correct answer is option (D):
8640

Let's break down this problem step-by-step to understand how to arrive at the correct answer. We have 8 tasks and 8 persons, and each person must be assigned one task. This is a permutation problem with some constraints.

Let's denote the tasks as T1, T2, ..., T8 and the persons as P1, P2, ..., P8.

Constraint 1: Task 1 (T1) cannot be assigned to Person 1 (P1), Person 2 (P2), or Person 8 (P8).
This means T1 can only be assigned to P3, P4, P5, P6, or P7. There are 5 possible persons for T1.

Constraint 2: Task 2 (T2) must be assigned to either Person 3 (P3), Person 4 (P4), or Person 5 (P5).
This means T2 can only be assigned to P3, P4, or P5. There are 3 possible persons for T2.

We need to find the total number of ways to assign all 8 tasks to all 8 persons, respecting these constraints.

Let's consider the assignments for T1 and T2 first, as they have restrictions.

Case 1: T1 is assigned to a person, and T2 is assigned to a person, and these persons are different.

Let's pick an assignment for T1 first. There are 5 choices for T1 (P3, P4, P5, P6, P7).

Now let's consider the assignment for T2. There are 3 choices for T2 (P3, P4, P5).
However, we need to be careful if the person chosen for T1 is also one of the allowed persons for T2.

Let's use the principle of inclusion-exclusion or consider cases based on the assignments of T1 and T2.

A more systematic approach is to consider the remaining tasks and persons after assigning T1 and T2.

Let's assign T1. There are 5 valid persons (P3, P4, P5, P6, P7).
Let's assign T2. There are 3 valid persons (P3, P4, P5).

We need to consider the overlap between the allowed persons for T1 and T2. The persons P3, P4, and P5 are allowed for both T1 and T2.

Let's break this down by considering assignments for T1 and T2 more carefully.

Possibility A: The person assigned to T1 is NOT among P3, P4, P5.
If T1 is assigned to P6 or P7 (2 choices), then the persons P3, P4, P5 are still available for T2.
If T1 is assigned to P6 (1 choice), then T2 has 3 choices (P3, P4, P5).
If T1 is assigned to P7 (1 choice), then T2 has 3 choices (P3, P4, P5).
So, if T1 is assigned to P6 or P7 (2 ways), T2 has 3 choices. This gives 2 * 3 = 6 pairs of assignments for (T1, T2).

Possibility B: The person assigned to T1 IS among P3, P4, P5.
If T1 is assigned to P3 (1 choice), then T2 can be assigned to P4 or P5 (2 choices, since T2 cannot be assigned to P3 anymore).
If T1 is assigned to P4 (1 choice), then T2 can be assigned to P3 or P5 (2 choices).
If T1 is assigned to P5 (1 choice), then T2 can be assigned to P3 or P4 (2 choices).
So, if T1 is assigned to one of P3, P4, P5 (3 ways), T2 has 2 choices. This gives 3 * 2 = 6 pairs of assignments for (T1, T2).

Total ways to assign T1 and T2 such that they are assigned to different people respecting the constraints:
Number of ways to choose a person for T1 = 5 (P3, P4, P5, P6, P7)
Number of ways to choose a person for T2 = 3 (P3, P4, P5)

Let's use a direct counting method by considering the assignments of T1 and T2.

Step 1: Assign Task 1.
There are 5 choices for Task 1 (P3, P4, P5, P6, P7).

Step 2: Assign Task 2.
The number of choices for Task 2 depends on who was assigned Task 1.

Case 1: Task 1 was assigned to P6 or P7 (2 possibilities).
In this case, P3, P4, and P5 are still available for Task 2. So, there are 3 choices for Task 2.
Number of ways for this case: 2 (choices for T1) * 3 (choices for T2) = 6.
After assigning T1 and T2 to two distinct persons, there are 6 remaining tasks and 6 remaining persons. The number of ways to assign the remaining 6 tasks to the remaining 6 persons is 6! = 720.
So, for this case, total ways = 6 * 720 = 4320.

Case 2: Task 1 was assigned to P3, P4, or P5 (3 possibilities).
Let's say Task 1 was assigned to P3. Then Task 2 can be assigned to P4 or P5 (2 possibilities).
If Task 1 was assigned to P4, Task 2 can be assigned to P3 or P5 (2 possibilities).
If Task 1 was assigned to P5, Task 2 can be assigned to P3 or P4 (2 possibilities).
So, there are 3 choices for T1 that fall into this category. For each of these choices, there are 2 choices for T2.
Number of ways for this case: 3 (choices for T1) * 2 (choices for T2) = 6.
After assigning T1 and T2 to two distinct persons, there are 6 remaining tasks and 6 remaining persons. The number of ways to assign the remaining 6 tasks to the remaining 6 persons is 6! = 720.
So, for this case, total ways = 6 * 720 = 4320.

Total number of ways = Ways from Case 1 + Ways from Case 2 = 4320 + 4320 = 8640.

Let's verify this using a different perspective.

Total possible assignments without constraints is 8! = 40320.
Let A be the set of assignments where T1 is assigned to P1, P2, or P8.
Let B be the set of assignments where T2 is NOT assigned to P3, P4, or P5. (This is not the constraint, the constraint is that T2 MUST be assigned to P3, P4, or P5).

Let's rephrase the problem. We need to assign tasks to persons.
This is equivalent to assigning persons to tasks.

Let's assign persons to tasks.
For T1, the allowed persons are {P3, P4, P5, P6, P7}. So 5 choices.
For T2, the allowed persons are {P3, P4, P5}. So 3 choices.

We need to make sure that the person assigned to T1 is different from the person assigned to T2.

Let's assign T1 first.
If T1 is assigned to P3: 1 way. Then T2 can be assigned to P4 or P5 (2 ways). Remaining 6 tasks to 6 people: 6! ways. Total = 1 * 2 * 720 = 1440.
If T1 is assigned to P4: 1 way. Then T2 can be assigned to P3 or P5 (2 ways). Remaining 6 tasks to 6 people: 6! ways. Total = 1 * 2 * 720 = 1440.
If T1 is assigned to P5: 1 way. Then T2 can be assigned to P3 or P4 (2 ways). Remaining 6 tasks to 6 people: 6! ways. Total = 1 * 2 * 720 = 1440.
Total ways when T1 is assigned to P3, P4, or P5 = 1440 + 1440 + 1440 = 4320.

If T1 is assigned to P6: 1 way. Then T2 can be assigned to P3, P4, or P5 (3 ways). Remaining 6 tasks to 6 people: 6! ways. Total = 1 * 3 * 720 = 2160.
If T1 is assigned to P7: 1 way. Then T2 can be assigned to P3, P4, or P5 (3 ways). Remaining 6 tasks to 6 people: 6! ways. Total = 1 * 3 * 720 = 2160.
Total ways when T1 is assigned to P6 or P7 = 2160 + 2160 = 4320.

Total ways = 4320 (from T1 in {P3, P4, P5}) + 4320 (from T1 in {P6, P7}) = 8640.

Let's consider another way using permutations.
Let's assign persons to tasks.
Assign T1: 5 choices (P3, P4, P5, P6, P7).
Assign T2: 3 choices (P3, P4, P5).

Let's denote the chosen person for T1 as p1 and for T2 as p2. We must have p1 != p2.

We can consider two scenarios:
Scenario 1: The person chosen for T1 is one of {P3, P4, P5}.
There are 3 choices for T1 from {P3, P4, P5}. Let's say we choose P3.
Then for T2, we have 2 choices (P4, P5).
Number of ways to assign T1 and T2 in this scenario: 3 * 2 = 6.
For each such assignment, we have 6 remaining tasks and 6 remaining persons. The number of ways to assign these is 6!.
So, this scenario contributes 6 * 6! = 6 * 720 = 4320 ways.

Scenario 2: The person chosen for T1 is NOT one of {P3, P4, P5}.
The possible persons for T1 are {P6, P7}. There are 2 choices for T1. Let's say we choose P6.
Then for T2, we have 3 choices (P3, P4, P5).
Number of ways to assign T1 and T2 in this scenario: 2 * 3 = 6.
For each such assignment, we have 6 remaining tasks and 6 remaining persons. The number of ways to assign these is 6!.
So, this scenario contributes 6 * 6! = 6 * 720 = 4320 ways.

Total number of ways = Ways from Scenario 1 + Ways from Scenario 2 = 4320 + 4320 = 8640.

The reasoning is sound and consistent across different approaches. The key is to correctly enumerate the choices for the constrained tasks while ensuring the assignments are distinct.

Final check:
Total ways to assign T1 = 5.
Total ways to assign T2 = 3.

Let's consider the number of ordered pairs of distinct persons (p_T1, p_T2) such that p_T1 is an allowed person for T1 and p_T2 is an allowed person for T2.

Allowed for T1: {P3, P4, P5, P6, P7}
Allowed for T2: {P3, P4, P5}

If p_T1 = P3, then p_T2 can be P4 or P5 (2 pairs)
If p_T1 = P4, then p_T2 can be P3 or P5 (2 pairs)
If p_T1 = P5, then p_T2 can be P3 or P4 (2 pairs)
If p_T1 = P6, then p_T2 can be P3, P4, or P5 (3 pairs)
If p_T1 = P7, then p_T2 can be P3, P4, or P5 (3 pairs)

Total number of valid ordered pairs (p_T1, p_T2) = 2 + 2 + 2 + 3 + 3 = 12.

For each of these 12 ways to assign T1 and T2 to distinct persons, there are 6 remaining tasks and 6 remaining persons. The number of ways to assign these is 6! = 720.

Total number of ways = 12 * 6! = 12 * 720.
12 * 720 = 12 * (700 + 20) = 8400 + 240 = 8640.

The answer is indeed 8640.

The final answer is $\boxed{8640}$.
Was this answer helpful?
0

Top Questions on Permutations and Combinations