1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Compute how many n-digit numbers

  1. Sep 3, 2013 #1
    1. The problem statement, all variables and given/known data
    Compute how many n-digit numbers can be made from the digits of at least one of {0,1,2,3,4,5,6,7,8,9 }
    Assume, repetition or order do not matter.

    2. Relevant equations
    ## a_{1}, a_{2}, ..., a_{n} ##

    3. The attempt at a solution
    10 choices for the 1st sub-index, 10 choices for the second sub-index, ..., 10 choices for the nth- sub-index.
    ## 10^{n} ## total possible combinations.
    I think that now we need to add 'n' for a set full of one identical digit. i.e.: {2,2,...,n-th}
    Now, n*9 for all possibilities

    Now, I need to take some n_i number into account in pairs and each of the n-2 numbers repeated for each number.
    So, groups of two repeated for each i-th number?
    Also, then I would extend this to include triple identical numbers and the rest (n-3) numbers in the set?
    And, so on...?

    I am sorry, if this does not make any sense or it is too messy.
    Could someone give me any guidance?
    Thank you.
     
  2. jcsd
  3. Sep 3, 2013 #2

    LCKurtz

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    How can order not matter for numbers?

    Is it OK to have a string of 0's for leading digits?

    I don't follow what you are doing in this last section. Is there something about the problem you haven't told us?
     
  4. Sep 4, 2013 #3
    The question is for a Theoretical Computer Science class.
    You might be right, but he said that it does not matter. My professor was very vague in posing the question. I asked it twice.
    He gave some examples:
    ## {0, 0, 0,0, ...,0_{n} }={0} ##
    ## {0, 0, 0, ..., 0, 1_{n}}={0,1}##

    Yes, it is.
    This counts as a valid number.
    ## { a_{0}, a_{1}, ..., a_{n} } \equiv {0_{0},0_{1},...,0_{n} } ##

    Sadly, I have told you everything that was given to me.

    In the last section, I wanted to start counting numbers as if repetition mattered, but I recalled that the professor said that they do not.

    I will for sure ask for more clarity next time, I see him.
     
  5. Sep 4, 2013 #4

    LCKurtz

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    OK. Since leading zeroes are OK it seems to me that your original calculation of ##10^n## should do it.
     
  6. Sep 4, 2013 #5
    Let me get back to you in a few days, I believe I can obtain more specific information about the problem. Thank you for your help so far.
     
  7. Sep 10, 2013 #6
    It turns out that order does matter after all. One 'gotta' love language.
    An example helped to elucidate.

    Example:
    {0,1,2,3,...,8,9, ...<whatever>,...} is a vector of size n and 1 solution that satisfies the constraints.
    {3,4,7,...,9,2,1,...<whatever>,... } is another vector of size n and another solution.

    Let me work it out. If you have any leads, they are welcome.
    Thanks :>
     
  8. Sep 16, 2013 #7
    Please, check the solution in attachment.
    Apparently, it is incorrect. Can someone verify?
    I think that I am not taking into account cases such as {m, o ,m } or {1,0,1}, where there could be repetitions.

    The solution should be in the form:
    Order matters
    { ... , <at least digits from 0 to 9>,..., <any numbers>, ... }

    Thank you.
     

    Attached Files:

  9. Sep 22, 2013 #8
    So, here is the solution.

    ## \dfrac{ |n| !}{ |n_{1}|! |n_{2}|!... |n_{k}|!} \text{, where n is the size of the vector and the values in denominator are types of symbols in n that repeat.}## ##\text{For instance, if I have a vector called v={e, i, g, e, n, v, a, l, u, e}, there are say n1 type symbols.}## ##\text{n1 relates to, say, e and our |n1|=3. The numerator in the equation takes care of all combination including repetitions}## ##\text{and the denominator takes care of cases as the one just mentioned. } ##
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted