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:
- $7$ occupy the first place
- $7$ occupy the 2nd place
- $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
In general, if you have a string of $n$ digits such that $7$ should be used exactly $k$ times
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}$