You are here:

Advanced Math/counting the unique numbers without considering the location of the digits, within 0 to 10^x, where x be an even natural number


123 counts, but 132, 213, 231, 312 or 321 not.

For x=
2 -> 55
[3 -> 220]
4 -> 715
[5 -> 2002]
6 -> 5005

i could figure out the answer til x=3, but after that, it becomes complicated.

of course, with the help of computer programing like fortran, could find the answer in a bit larger extent
as is seen in the examples above, but not very much due the increase at processing time.

i think even the high performance computing centers, if just clustered cpus, can not do that incredibly faster,
as this is almost a sequential task, and not parallel.
this is a personal research relating to the possibility of matrice, the idea to relate the digits in a 2-dimensioanl way,
resulting data compression and other math or non-math knowledge.

thanks, anyway.

It looks like you are trying to find the number of numbers with distinct digits for 1, 2, 3 ... N digit numbers. It think this can be solved by careful counting and using formulas for combinations, in particular the Binomial Theorem, which says

Number of combinations of N unique objects (the digits 0-9 in our case) taken M at a time is

C(N) = N! / [ (M! (N-M)! ].

The M here is the same as your x and N = 10 = number of digits to choose from. This a standard formula you should be familiar with. For M = 2, this is

C(2) = (10・9)/2 = 45

where the factor of 2 takes care of the doublets such as 23 and 32, etc.

If you declare that the numbers 0 through 9 should should not be considered doublets and should be added back, then the total is 55.

For N = 3, we have for triple digit numbers (triplets)

C(3) = 10! / [ 3! (10-3)! = 120.

If the number 0-99 are not considered triplets and are added back in, then the total is 220 = # of numbers with up to 3 distinct digits.

I'm not sure if this is they right interpretation of your question; I'd like to see how you solved it for x = 2.

At any rate, I don't see how matrices can obviously be directly utilized for this problem. I think perhaps you are thinking in terms of using a computer code to search through the possible combinations and count only those that do not have duplicate digits. This is certainly one way to do it, but, as you say, not very efficient if done in a brute force manner. I suppose there may be a way using linear algebra to set up matrices which represent some sort of an ideal of a permutation group and then calculate unique normal subgroups, but I don't know how to do it off the top of my head.

I think you'd be better off with a analytical approach such as sketched above.

Advanced Math

All Answers

Answers by Expert:

Ask Experts


randy patton


college mathematics, applied math, advanced calculus, complex analysis, linear and abstract algebra, probability theory, signal processing, undergraduate physics, physical oceanography


26 years as a professional scientist conducting academic quality research on mostly classified projects involving math/physics modeling and simulation, data analysis and signal processing, instrument development; often ocean related

J. Physical Oceanography, 1984 "A Numerical Model for Low-Frequency Equatorial Dynamics", with M. Cane

M.S. MIT Physical Oceanography, B.S. UC Berkeley Applied Math

Past/Present Clients
Also an Expert in Oceanography

©2017 All rights reserved.