1
$\begingroup$

What is the maximum number of five digit numbers are there that can't change to each other with changing the permutation of digits?

The answer should use the number of answers of $x_1+x_2+\dots +x_n=m$ because its in the part of that kind of questions.The first idea that I got is finding number of solutions of $x_1+x_2+x_3+x_4+x_5 \le 35$ but then we should apply the condition that all are $\le9$.And that takes a lot of time.Any hints?

$\endgroup$
1
$\begingroup$

If one number can be rearranged to another, it's because they have the same distribution of digits. So we only care about counting the number of distinct distributions.

This is the same as having $10$ "bins" (representing the $10$ digit possibilities) and trying to allocate $5$ objects among them (the digit frequencies which must sum to $5$), minus the possibility that all $5$ digits are $0$. Therefore the total number of ways is:

$$\binom{10+5-1}{5-1} - 1 = 1000$$

The details of the stars and bars method can be seen here: https://en.wikipedia.org/wiki/Stars_and_bars_%28combinatorics%29#Theorem_two_2

$\endgroup$
1
$\begingroup$

Call two five digit numbers equivalent if they contain the same digits an equal number of times. We are told to count the number $N$ of equivalence classes.

Denote by $x_k$ $(0\leq k\leq9)$ the number of times the digit $k$ occurs in a given five digit number. Then $N$ is almost equal to the number $N'$ of solutions of $\sum_{k=0}^9 x_k=5$ in nonnegative integers. By "stars and bars" one has $$N'={5+10-1\choose 5-1}=1001\ .$$ Now the solution $x_0=5$, all other $x_k=0$ is not acceptable, as it cannot be realized by a single five digit number; but all other solutions can be realized. It follows that $N=1000$.

$\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.