How many different 4 digit combinations will include at least one 7, assuming numbers cannot repeat

5.5k Views Asked by At

I cannot get the correct answer - $2016$.

What I have tried so far is thus: the number $7$ can occur $1, 2, 3,$ or $4$ times. Since it is a combination we do not care if the number starts with zero or not since it is a combination and not a number. Therefore:

$(1*9*8*7 + 1*1*8*7 + 1*1*1*7 )*4 = 2268$

where $4$ is the order it can appear.

What should i do instead to get it correct?

4

There are 4 best solutions below

6
On

Hint: this is a trick question. How many times at most can the number 7 occur assuming numbers cannot repeat?

I'm leaving my earlier hint below, because it is a very simple, general method that gets also the right answer in this case.


Hint: think about

  1. how many 4 digit numbers there are altogether where digits don't repeat?

  2. how many 4 digit numbers are there with no 7s where digits don't repeat?

How many different 4 digit combinations will include at least one 7, assuming numbers cannot repeat?

How can you define this in terms of 1. and 2.?

2
On

If there has to be exactly one 7, that 7 can go into 4 positions, and the other 3 digits can be arranged in $9 \cdot 8 \cdot 7$ ways. In all, $4 \cdot 9 \cdot 8 \cdot 6$ ways. If starting with 0 is not allowed, the ways of starting 0 in the above is $3 \cdot 8 \cdot 7$ ways, so you get $4 \cdot 9 \cdot 8 \cdot 6 - 3 \cdot 8 \cdot 7 = 1848$

If the 7 can repeat, you have to select 1, 2, 3, or 4 positions for the 7s; the others have to be arranged into the rest of the positions (here $x^{\underline{n}} = x (x - 1) \cdots (x - n + 1)$, for $n$ factors). By the same reasoning above: $$ \binom{4}{1} \cdot 9^{\underline{3}} + \binom{4}{2} \cdot 9^{\underline{2}} + \binom{4}{3} \cdot 9^{\underline{1}} + \binom{4}{4} \cdot 9^{\underline{0}} - \binom{3}{1} \cdot 8^{\underline{2}} - \binom{3}{2} \cdot 8^{\underline{1}} - \binom{3}{3} \cdot 8^{\underline{0}} = 1957 $$ It seems the place you've got this from is mistaken.

0
On

Answer: I am assuming that 0 in the first place is possible. Seems like a password!!

How many 4 digit combination with one 7 will get you the result. But your question asks for atleast one.

_ _ _ _ Assume this four digit number and fix 7 in any one place. This you can do it in four ways - 4. The second digit from {0-9} except 7 can be chosen in 9 ways. The third digit except 7 and the digit chosen earlier, can be chosen in 8 ways. Similarly, the fourth digit can be chosen in 7 ways. Thus for one 7 to appear in the four digit combination, you can have a total of 4*9*8*7 = 2016 ways.

If you need an answer for 2 7's , 3 7's and 4 7's. Fix the two 7's and this can be done in 4C2 ways= 6. The third digit can be chosen in 9 ways, the four digit can be chosen in 8 ways to a total of 432.

Fix the three 7's and this can be done in 4 ways. The fourth digit can be chosen in 9 ways to a total of 36. And finally, four 7 will get you 1.

Thus for atleast one 7, the number of ways = 2016+432+36+1 = 2485.

Good Luck

Thanks

Satish

0
On

2016 = 9 * 8 * 7 * 4. So, working backwards:

There are 4 different ways of placing the solitary 7 in one of the 4 slots. After that, there are 9 * 8 * 7 ways of the filling the 3 remaining slots with 3 digits, without repeats, from the remaining 9 possible digits. Hence the answer.