In how many different ways can tests A, B, C be performed based on the following conditions?

68 Views Asked by At

Suppose a patient has to undergo, on the advice and prescription of an expert physician, three medical tests A, B and C (say a urine test, a blood test, and an X-ray, to be specific). The physician has imposed certain conditions on these tests:
(i) Tests B and C must be done only after test A is done.
(ii) Test A takes a full day; no other test can be carried out that day.
(iii) Each test can be completed on a single day; its implementation does not spill over to the next day.
(iv) Tests B and C can be carried out on the same day, or on separate days, in either order. When two tests are done together on a single day, we consider them to be a single test. The order in which the tests are performed is of no importance in this case.
(v) The tests must be completed within $n + 1$ days numbered $1, 2, 3,..., n + 1$.
The question now is: In how many different ways can tests A, B, C be performed?

My approach :
Let us consider $n=4$, so, number of days $=5$.
Case 1(B and C are being performed not on the same day):
So for this, clearly the ans is $\frac{^5P_5}{2!}-x$, where $x$ is the number of ways in which A is after B and C.
Case 2(B and C are on same day):
So, it's clerely $\frac{^5P_5}{3!}-y$, where $y$ is the number of ways in which A is after the single test (BC).
Am I correct? How to find $x$ and $y$? How to generalize this?

2

There are 2 best solutions below

4
On BEST ANSWER

Let us just straightway jump into the general case, starting from the fact that we should first get test $A$ done.

For this we note that the test $A$ cannot be done on the $(n+1)^{\text{th}}$ day (why?). Let thus then safely assume that the test $A$ is done on the $k^{\text{th}}$ day.

Then, we can see that there are a total of $(n+1-k)$ possible days to take the tests $B$ and $C$. The total number of ways to do this are then $(n+1-k)^2$ (why?).

Thus, the total number of ways can be found by summing the value obtained before for $k=1$ to $n$ giving us: $$\sum_{k=1}^{n}(n+1-k)^2 = \,?$$

1
On

Let us assume that B and C must be done 1 day before each other. Then, $x=2\cdot(3+2+1)=12$. Then find the value for 2 days after each other, which is $x=2\cdot(2+1)=6$. For 1, this would be $1\cdot2=2$. If you noticed, this is the sum of triangle numbers multiplied by $2$, or tetrahedral numbers. The formula, adapted would be: $$\frac{n(n-1)(n+1)}{3}$$ This is the value of $x$. $y$ is $4+3+2+1=10$, which is part of the triangle numbers or the sum of natural numbers. The formula would be: $$\frac{n(n-1)}{2}$$ Piercing the numbers together, the final answer is: $$n^2(n+1)-\left(\frac{n(n-1)}{2}+\frac{n(n-1)(n+1)}{3}\right)$$