3
$\begingroup$

How many numbers with 6 digits can be formed with the digits $1,2,3,4,5$ such that the digit $2$ appears every time at least three times.

My try:

Total numbers: $5^6$

Numbers in which 2 doesn't appear: $4^6$

Numbers in which 2 appear once : $6\cdot4^5$

Numbers in which 2 appear twice : $13\cdot4^4$

So my result is: $5^6-4^6- 6 \cdot4^5-13\cdot4^4=2057 $ but the right answer is $1545$ How solve it ?

$\endgroup$
  • $\begingroup$ Hmm... $2057-1545=2\cdot4^4$ right? $\endgroup$ – drhab Jul 9 '19 at 9:07
  • $\begingroup$ yes, that means that I lost 2*4^4 numbers $\endgroup$ – DaniVaja Jul 9 '19 at 9:10
  • 1
    $\begingroup$ Hint: you can insert $2$ elements in $6$ slots in $\binom{6}{2}=15$ different ways $\endgroup$ – M.P Jul 9 '19 at 9:10
  • $\begingroup$ So evidently you forgot $2$ possibilities. In how many ways can we select $2$ objects out of $6$? $\endgroup$ – drhab Jul 9 '19 at 9:11
  • 1
    $\begingroup$ 6!/(2!*4!)=15 so I forgot 2 cases, thanks $\endgroup$ – DaniVaja Jul 9 '19 at 9:12
4
$\begingroup$

You are really close to the actual answer here.

Hint: How did you get $13$ in $13\cdot 4^4$?

$\endgroup$
  • $\begingroup$ I thought if I have a 6 digit number abcdef the digit 2 must appear in ab ac ad ae af bc bd ....ef (13 cases) so the result is 13 * 4^4 $\endgroup$ – DaniVaja Jul 9 '19 at 9:05
  • 1
    $\begingroup$ @DaniVaja Count the number of cases more carefully. Note that 5 of them starts with "a", 4 of them starts with "b", and so on. $\endgroup$ – Arthur Jul 9 '19 at 9:07
  • $\begingroup$ I got 15 cases but using the formula but I don't see those 2 cases in my approach with ab ac ad... $\endgroup$ – DaniVaja Jul 9 '19 at 9:15
  • $\begingroup$ Thanks, I didn;t see your edit $\endgroup$ – DaniVaja Jul 9 '19 at 9:15
  • 1
    $\begingroup$ I totally forgot about de, df.Thank you $\endgroup$ – DaniVaja Jul 9 '19 at 9:17
0
$\begingroup$

...or the other way around: $\binom{6}{3}4^3 + \binom{6}{4}4^2 + \binom{6}{5}6^1 +1$. Keep in mind $\binom{6}{4} = \binom{6}{2}$. It's a term longer, but gives you an opportunity to compute sm binomial coefficients.

$\endgroup$

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.