Solveeit Logo

Question

Question: Number of ways of selecting three integers from \(\left\\{ 1,2,3,......n \right\\}\) if their sum is...

Number of ways of selecting three integers from \left\\{ 1,2,3,......n \right\\} if their sum is divisible by 3 is
A. 3(n3C3)+(n3)33\left( {}^{\dfrac{n}{3}}{{C}_{3}} \right)+{{\left( \dfrac{n}{3} \right)}^{3}} if n=3kn=3k , kNk\in N
B. 2(n13C3)+(n+23C3)+((n1)3)2(n+2)2\left( {}^{\dfrac{n-1}{3}}{{C}_{3}} \right)+\left( {}^{\dfrac{n+2}{3}}{{C}_{3}} \right)+{{\left( \dfrac{\left( n-1 \right)}{3} \right)}^{2}}\left( n+2 \right), if n=3k+1n=3k+1 , kNk\in N
C. 2(n13C3)+(n+23C3)+((n1)3)2(n+2)2\left( {}^{\dfrac{n-1}{3}}{{C}_{3}} \right)+\left( {}^{\dfrac{n+2}{3}}{{C}_{3}} \right)+{{\left( \dfrac{\left( n-1 \right)}{3} \right)}^{2}}\left( n+2 \right) , if n=3k+2n=3k+2 , kNk\in N
D. Independent of n

Explanation

Solution

The answer to the question depends on the value of the last element. The answer will be different if the value of n is different. So, to solve this question we will have to proceed according to the options as the value of n in all the options are different. So, we will form cases according to the options and then we will solve each case.

Complete step by step solution:
So, let us start the solution by the cases,
Case I: - Let the value of n=3kn=3k . Thus, we are going to divide the set into three sets such that one set contains the numbers which have values only 3P (where PNP\in N ), the second set contains the numbers which have values of the form (3P+1)\left( 3P+1 \right) , and the last set which has value of the form (3P+2)\left( 3P+2 \right) . Thus, we get three different sets: -
{{S}_{1}}=\left\\{ 3,6,9,12......3k \right\\}$$$$$ {{S}{2}}=\left\{ 1,4,7,10......3k-2 \right\} ${{S}_{3}}=\left\\{ 2,5,8,11......3k-1 \right\\}
The sets S1,S2{{S}_{1}},{{S}_{2}} and S3{{S}_{3}} contains n3\dfrac{n}{3} elements each. Now we have to make solution such that the sum is divisible by 3. This can be achieved in two ways: - We can select one element from each set, in this way of doing this are given by: - n3C1×n3C1×n3C1=(n3C1)3=(n3)3{}^{\dfrac{n}{3}}{{C}_{1}}\times {}^{\dfrac{n}{3}}{{C}_{1}}\times {}^{\dfrac{n}{3}}{{C}_{1}}={{\left( {}^{\dfrac{n}{3}}{{C}_{1}} \right)}^{3}}={{\left( \dfrac{n}{3} \right)}^{3}} .The other way is selecting all the three numbers from one set. In this case also, the number will be divisible by 3. The way of doing this are n3C3+n3C3+n3C3=3(n3C3){}^{\dfrac{n}{3}}{{C}_{3}}+{}^{\dfrac{n}{3}}{{C}_{3}}+{}^{\dfrac{n}{3}}{{C}_{3}}=3\left( {}^{\dfrac{n}{3}}{{C}_{3}} \right) .So, the total number of ways we get are: -
=3\left( {}^{\dfrac{n}{3}}{{C}_{3}} \right)+{{\left( \dfrac{n}{3} \right)}^{3}}..........\left( 1 \right)$$$$$ Case II: - Let the value of n=3k+1.Theelementsinthesets. The elements in the sets{{S}
{1}},{{S}{2}}andand{{S}{3}}willbeobtainedsimilarlyandwehaddoneincaseI.So,wewillget:will be obtained similarly and we had done in case I. So, we will get: - {{S}{1}}=\left\{ 3,6,9,12......3k \right\} ${{S}_{2}}=\left\\{ 1,4,7,10......3k+1 \right\\}
{{S}_{3}}=\left\\{ 2,5,8,11......3k-1 \right\\}$$$$$ Thus, sets {{S}
{1}}andand{{S}{3}}containcontain\left( \dfrac{n-1}{3} \right)elementseachwhileelements each while{{S}{2}}containcontain\left( \dfrac{n+2}{3} \right)elements.Inthiscasealso,wehavetomakeselection.Again,therearetwoways:Wecanselectoneelementfromeachset.Thetotalwaysofdoingthisaregivenby:elements. In this case also, we have to make selection. Again, there are two ways: - We can select one element from each set. The total ways of doing this are given by: -{}^{\left( \dfrac{n-1}{3} \right)}{{C}{1}}+{}^{\left( \dfrac{n-1}{3} \right)}{{C}{1}}+{}^{\left( \dfrac{n+2}{3} \right)}{{C}{1}}={{\left( \dfrac{\left( n-1 \right)}{3} \right)}^{2}}\left( \dfrac{\left( n+2 \right)}{3} \right).Theotherwayisselectingallthethreenumbersfromoneset.Thewaysdoingthisare:. The other way is selecting all the three numbers from one set. The ways doing this are: -{}^{\left( \dfrac{n-1}{3} \right)}{{C}{3}}+{}^{\left( \dfrac{n-1}{3} \right)}{{C}{3}}+{}^{\left( \dfrac{n+2}{3} \right)}{{C}{3}}=2\left( \dfrac{\left( n-1 \right)}{3} \right)+{}^{\dfrac{\left( n+2 \right)}{3}}{{C}{3}}.So,thetotalnumberofwayswegetare. So, the total number of ways we get are={}^{\left( \dfrac{n-1}{3} \right)}{{C}{3}}+{}^{\left( \dfrac{n-1}{3} \right)}{{C}{3}}+{}^{\left( \dfrac{n+2}{3} \right)}{{C}{3}}=2\left( {}^{\dfrac{\left( n-1 \right)}{3}}{{C}{3}} \right)+{}^{\dfrac{\left( n+2 \right)}{3}}{{C}{3}}+{{\left( \dfrac{\left( n-1 \right)}{3} \right)}^{2}}\left( \dfrac{\left( n+2 \right)}{3} \right)......\left( 2 \right) Case III: - Let the value of $n=3k+2$. Thus, we will get the sets ${{S}_{1}},{{S}_{2}},{{S}_{3}}$ as: - $$$$ ${{S}_{1}}=\left\\{ 3,6,9,12......3k \right\\}
{{S}_{2}}=\left\\{ 1,4,7,10......3k+1 \right\\}$$$$$ {{S}_{3}}=\left\{ 2,5,8,11......3k+2 \right\}$$$$$
Thus, sets S1{{S}_{1}} and S3{{S}_{3}} contain (n+1)3\dfrac{\left( n+1 \right)}{3} elements each while S2{{S}_{2}} contains (n2)3\dfrac{\left( n-2 \right)}{3} elements since 3k+23k1(mod3)3k+2\equiv 3k-1\left( \bmod 3 \right). Now, we will select the elements in this case also . Like case-I and case-II, the total number of ways we get are: -
=2((n+1)3C3)+((n2)3C3)+((n+1)3)2((n2)3)......(3)=2\left( {}^{\dfrac{\left( n+1 \right)}{3}}{{C}_{3}} \right)+\left( {}^{\dfrac{\left( n-2 \right)}{3}}{{C}_{3}} \right)+{{\left( \dfrac{\left( n+1 \right)}{3} \right)}^{2}}\left( \dfrac{\left( n-2 \right)}{3} \right)......\left( 3 \right)
When n = 3k + 2n\text{ }=\text{ }3k\text{ }+\text{ }2, the number of selection ways is same as in the case of n = 3k + 1n\text{ }=\text{ }3k\text{ }+\text{ }1 Hence,thecorrectoptionsfrom(1)(2)and(3)are(a),(b)and(c). Hence, the correct options from (1) (2) and (3) are (a), (b) and (c).
So, the correct answer is “Option A, B and C”.

Note: The method by which you can select the three numbers having sum divisible by 3 in the set S=\left\\{ 1,2,3,.......n \right\\} are only two. Either you can select the three numbers as 3P,3P+1,3P+23P,3P+1,3P+2 or you can select all three of same type i.e. all 3P or all (3P+1)\left( 3P+1 \right) or all (3P+2)\left( 3P+2 \right) . We should always remember that we can collect rr distinct objects from nn distinct objects in nCr=n!r!(nr)!{}^{n}{{C}_{r}}=\dfrac{n!}{r!\left( n-r \right)!} way.