Sign in
Please select an account to continue using cracku.in
↓ →
Join Our JEE Preparation Group
Prep with like-minded aspirants; Get access to free daily tests and study material.
Consider a string of $$n$$ $$1$$'s. We wish to place $$+$$ signs in between so that the sum is $$1000$$. For instance, if $$n=190$$, one may put $$+$$ signs so as to get $$11$$ ninety times and $$1$$ ten times, and get the sum $$1000$$. If $$a$$ is the number of positive integers $$n$$ for which it is possible to place $$+$$ signs so as to get the sum $$1000$$, then find the sum of the digits of $$a$$.
Correct Answer: 09
Let the string contain $$n$$ digits ‘1’. We partition it into blocks of equal‐length ‘1’s; after inserting $$+$$ signs every block represents a repunit
$$R_m=\underbrace{\,11\ldots1\,}_{m\text{ digits}}=\dfrac{10^{m}-1}{9},\qquad m\in\{1,2,3,\ldots\}$$
Because the target sum is only $$1000$$, any block longer than $$3$$ digits would already exceed $$1000$$ (since $$R_4=1111\gt1000$$).
Hence every block is $$1,\;11$$ or $$111$$, i.e. blocks of length $$1,\;2$$ or $$3$$.
Let
$$x_1=\text{number of 1-digit blocks},\qquad
x_2=\text{number of 2-digit blocks},\qquad
x_3=\text{number of 3-digit blocks}$$
Then
$$x_1+11x_2+111x_3=1000\quad -(1)$$
and the total number of digits is
$$n=x_1+2x_2+3x_3\quad -(2)$$
----------------------------------------------------
Case 1 — Eliminating $$x_1$$From (1) write $$x_1=1000-11x_2-111x_3$$ and substitute into (2):
$$n=(1000-11x_2-111x_3)+2x_2+3x_3 =1000-9x_2-108x_3\quad -(3)$$
All variables are non-negative. Put $$x_3=k\;(0\le k\le 9)$$. Then (1) becomes
$$x_1+11x_2=1000-111k=:r_k$$
The remainder $$r_k$$ must be non-negative, so indeed $$k\le 9$$. Now $$x_2$$ can vary from $$0$$ up to
$$m_k=\Bigl\lfloor\dfrac{r_k}{11}\Bigr\rfloor$$
For each fixed $$k$$ relation (3) gives
$$n=1000-108k-9x_2,\qquad 0\le x_2\le m_k$$
Thus each admissible $$k$$ generates the set
$$S_k=\{\,1000-108k-9t\mid t=0,1,\dots ,m_k\}$$
----------------------------------------------------
Case 2 — Working modulo $$9$$Every element of every $$S_k$$ is $$\equiv1\pmod9$$, because
$$1000-108k-9t\equiv 1-0-0\equiv1\pmod9$$
Write any candidate length as $$n=9q+1\;(q\ge0)$$. With $$t=\dfrac{1000-n}{9}=111-q$$, equation (3) becomes
$$t=12k+x_2,\qquad 0\le k\le9,\;0\le x_2\le m_k$$
So for each $$k$$ the attainable values of $$t$$ form the interval
$$I_k=[\,12k,\;12k+m_k\,]$$
The table of $$m_k$$ is
$$m_0=90,\;m_1=80,\dots ,m_8=10,\;m_9=0$$
Hence
$$\begin{aligned} I_0&=[0,90]\\ I_1&=[12,92]\\ I_2&=[24,94]\\ &\;\;\vdots\\ I_8&=[96,106]\\ I_9&=[108,108] \end{aligned}$$
----------------------------------------------------
Case 3 — Counting the covered $$t$$ valuesThe union $$\bigcup_{k=0}^{9}I_k$$ covers every integer $$t$$ from $$0$$ up to $$108$$ except $$t=107$$, because
• $$I_8$$ ends at $$106$$,
• $$I_9$$ is the single point $$108$$.
Thus the number of attainable $$t$$ is
$$108-0+1-1=108$$
----------------------------------------------------
Case 4 — Back to $$n$$Every admissible $$t$$ gives a unique $$n=1000-9t\;(=9(111-t)+1)$$, so exactly $$108$$ different values of $$n$$ are possible.
Therefore $$a=108$$ and the required digit-sum is $$1+0+8=9$$.
Answer: 09
Predict your JEE Main percentile, rank & performance in seconds
Educational materials for JEE preparation