1
$\begingroup$

I want to check whether my concept and answer is right

I am considering strings of four decimal digits that contain the same digit twice. With this, I have the possibilities of $xxyz,xyxz,yxxz,yxzx,yzxx,xyzx$ where $x$ is the same digit, and $y, z$ are randomly different decimal digits taken. So $10 \cdot 1 \cdot 9 \cdot 8 = 720$ and $6$ possibilities, then $720 \cdot 6 = 4320$ ways. Now consider digits that have pattern $xxyy, yyxx,xyxy,yxxy,yxyx,xyyx$, here $10 \cdot 1 \cdot 9 \cdot 9=810 \cdot 6= 4860$ ways. Then total combinations are $10^4 =10000$ then $10000-4320-4860=820$ ways .

$\endgroup$
  • 1
    $\begingroup$ Why not calculate the probability that no number is repeated? $\endgroup$ – Mohammad Zuhair Khan Sep 8 '18 at 6:26
  • $\begingroup$ @MohammadZuhairKhan I suspect it concerns the number of strings that do not contain the same digit exactly $2$ times. $\endgroup$ – drhab Sep 8 '18 at 6:30
  • $\begingroup$ Oh, the wording confused me. Pardon $\endgroup$ – Mohammad Zuhair Khan Sep 8 '18 at 6:31
  • $\begingroup$ Welcome to MathSE. Please read this tutorial on how to typeset mathematics on this site. $\endgroup$ – N. F. Taussig Sep 8 '18 at 6:41
  • 1
    $\begingroup$ Do you mean how many strings of four decimal digits do not contain the same digit twice or exactly twice? $\endgroup$ – N. F. Taussig Sep 8 '18 at 6:46
0
$\begingroup$

Your title is ambiguous (see the comment of Mohammad) and I preassume that it concerns the number of strings that have the property that no digit appears exactly $2$ times.

Where it concerns strings that have $3$ distinct digits your calculation with outcome $$\binom42\cdot10\cdot9\cdot8=4320$$ is correct.

Where it concerns strings that have $2$ distinct digits that both appear twice the outcome should be: $$\frac12\binom42\cdot10\cdot9=270$$ You (maybe accidently) have $2$ factors $9$ instead of $1$ and did not repair double counting.

You could also reason that there are not $6$ but $3$ patterns there ($xxyy$,$xyxy$ and $xyyx$) and this with $10$ choices for $x$ and $9$ remaining choices for $y$.

$\endgroup$
  • $\begingroup$ Thanks here, I understood the fact. $\endgroup$ – Avni Sharma Sep 8 '18 at 7:19
  • $\begingroup$ You are welcome. $\endgroup$ – drhab Sep 8 '18 at 7:23
  • $\begingroup$ I want to know , what will be the answer in this case ,when we are assuming same digit exactly twice. $\endgroup$ – Avni Sharma Sep 8 '18 at 7:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.