Courses
Courses for Kids
Free study material
Offline Centres
More
Store Icon
Store
seo-qna
SearchIcon
banner

Number of ways of selecting three integers from $\left\{ 1,2,3,......n \right\}$ if their sum is divisible by 3 is
A. $3\left( {}^{\dfrac{n}{3}}{{C}_{3}} \right)+{{\left( \dfrac{n}{3} \right)}^{3}}$ if $n=3k$ , $k\in N$
B. $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+1$ , $k\in N$
 C. $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+2$ , $k\in N$
D. Independent of n

Answer
VerifiedVerified
550.8k+ views
Hint: 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=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 $P\in N$ ), the second set contains the numbers which have values of the form $\left( 3P+1 \right)$ , and the last set which has value of the form $\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 ${{S}_{1}},{{S}_{2}}$ and ${{S}_{3}}$ contains $\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: - ${}^{\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 ${}^{\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$ . The elements in the sets ${{S}_{1}},{{S}_{2}}$ and ${{S}_{3}}$ 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}}$ and ${{S}_{3}}$ contain $\left( \dfrac{n-1}{3} \right)$ elements each while ${{S}_{2}}$ contain $\left( \dfrac{n+2}{3} \right)$ 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)$ . 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, 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 ${{S}_{1}}$ and ${{S}_{3}}$ contain $\dfrac{\left( n+1 \right)}{3}$ elements each while ${{S}_{2}}$ contains $\dfrac{\left( n-2 \right)}{3}$ elements since $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\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\text{ }=\text{ }3k\text{ }+\text{ }2$, the number of selection ways is same as in the case of $n\text{ }=\text{ }3k\text{ }+\text{ }1$ \[\]
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+2$ or you can select all three of same type i.e. all 3P or all $\left( 3P+1 \right)$ or all $\left( 3P+2 \right)$ . We should always remember that we can collect $r$ distinct objects from $n$ distinct objects in ${}^{n}{{C}_{r}}=\dfrac{n!}{r!\left( n-r \right)!}$ way.