How many three-digit positive integers are there in which the digit $7$ appears exactly once?

418 Views Asked by At

I was solving permutation and combination problems.

I have to count $3$ digit numbers such that $7$ is used exactly once.

What I did is under line three dashes and create cases:

  1. $7$ occupy the first place
  2. $7$ occupy the 2nd place
  3. $7$ occupy last place

Counting the total cases yields $225$, and I was right.

Is there any other method by which I can think about this problem or solution with a different thinking?

Because I have no teacher, your idea will create better knowledge of topic and required skills for answering typical questions.

Edit- if i want solve it by set method or relaation method

2

There are 2 best solutions below

4
On

In general, if you have a string of $n$ digits such that $7$ should be used exactly $k$ times

  • Pick which $k$ of the $n$ positions the digit seven will occupy simultaneously. This can be done in $\binom{n}{k}$ ways
  • Pick which digit occupies each remaining position from left to right, noting that none of the remaining positions may be a $7$ in $9^{n-k}$ ways

This gives an answer of $\binom{n}{k}9^{n-k}$

A bit more care needs to be taken in the event that you do not allow leading zeroes. In such a situation, break into cases based on whether $7$ is the leading digit, or a different nonzero number is the leading digit to get a total of $\binom{n-1}{k-1}9^{n-k} + \binom{n-1}{k}\times 8\times 9^{n-k-1}$

0
On

Your method was presumably:-

  1. 1x9x9=81

  2. 8x1x9=72

  3. 8x9x1=72

Totalling 225.

This is an excellent and easy method. It is an important skill in questions of this type to know how and when to split a problem into cases. For more complicated problems you may be able to ease the working by noting that some cases will have identical answers. (For example 2. and 3. above.)