How many integers can be formed by using exactly $x$ $4$'s, $y$ $5$'s, and $z$ $6$'s if no other numbers are used?

66 Views Asked by At

Can anyone tell me the total number of integers than can be formed by using exactly $x$ $4$'s , $y$ $5$'s and $z$ $6$'s and no other numbers are used?

For $x=1$, $y=1$, $z=1$, the total is $6 \implies 456~465~654~645~546~564$?

In general, what can be the formula for that if $n$ types of numbers are used to form the numbers and to calculate total numbers with all these possible combinations?

2

There are 2 best solutions below

2
On

Since each integer is composed of exactly $x$ $4$'s, $y$ $5$'s, and $z$ $6$'s, it has $x + y + z$ digits. A particular integer is determined by the positions of the $4$'s, $5$'s, and $6$'s. We can fill $x$ of the $x + y + z$ positions with $4$'s, $y$ of the $y + z$ remaining positions with $5$'s, and the remaining $z$ positions with $6$'s in $$\binom{x + y + z}{x}\binom{y + z}{y}\binom{z}{z} = \frac{(x + y + z)!}{x!(y + z)!} \cdot \frac{(y + z)!}{y!z!} \cdot \frac{z!}{z!0!} = \frac{(x + y + z)!}{x!y!z!}$$ distinguishable ways. The factor of $x!$ in the denominator represents the number of ways the $4$'s can be permuted within a given arrangement without producing an arrangement distinguishable from the original arrangement. Likewise, the factors of $y!$ and $z!$ in the denominator represent, respectively, the number of ways the $5$'s and $6$'s can be permuted within a given arrangement without producing an arrangement distinguishable from the original arrangement.

For the second part of your question, each integer has $x_1 + x_2 + \cdots + x_n$ digits. By similar reasoning, the number of integers that can be formed is $$\binom{x_1 + x_2 + \cdots + x_n}{x_1}\binom{x_2 + \cdots + x_n}{x_2} \cdots \binom{x_n}{x_n} = \frac{(x_1 + x_2 + \cdots + x_n)!}{x_1!x_2! \cdots x_n!}$$

0
On

If all $(x + y + z)$ digit occurrences in your word were considered distinct, the problem would be to count the number of ways to arrange $(x + y + z)$ in a sequence, and there are $(x + y + z)!$ such ways.

If we now stopped distinguishing between different occurrences of 4, then the arrangements that differ only by rearranging the occurrences of 4 are in fact identical arrangements. So, for the arrangements in which the occurrences of 5's and 6's are still considered distinct objects, but occurrences of 4 are not, the number $(x + y + z)!$ is an overcount by a factor of $x!$. To correct for that (for failing to distinguish between different occurrences of 4), we divide by $x!$:

$(x + y + z)! / (x!)$

The latter number still needs to be corrected for failing to distinguish between occurrences of 5, and the correction factor to divide by is $y!$. Similarly for the occurrences of $6$.

Consequently, the answer must include all three corrections. It equals $$ {(x + y + z)! \over x! y! z!}, $$ and is explained in more detail in Part III of this video: https://www.youtube.com/watch?v=QrfA8mKOIjI