+ Reply to Thread
Results 1 to 15 of 15

5 digit number combinations

  1. #1
    Registered User
    Join Date
    09-02-2010
    Location
    Southampton
    MS-Off Ver
    Excel 2007
    Posts
    7

    Exclamation 5 digit number combinations

    I need all the 5 digit number combination using the character 0-9, but there cannot not be any duplicate numbers.

    For example, 01198, 02297, these couldn't be used as they have duplicate numbers.

    Once the numbers with duplicate numerals have been removed, I need to come up with a formula that will remove every additional number that contains the same 5 numerals. For example, if I already have 01234, I need to remove (or somehow identify) every other combination of those four numbers....12340, 24301, 30124, etc

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: 5 digit number combinations

    Read this first
    http://www.mathsisfun.com/combinator...mutations.html

    Combinations or Permutations?

  3. #3
    Registered User
    Join Date
    09-02-2010
    Location
    Southampton
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: 5 digit number combinations

    It is a combination

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: 5 digit number combinations

    Did you read down the page for Combinations without repititions?
    Do you want us to list all the numbers for you in cells in Excel?
    How many numbers will there be?

  5. #5
    Registered User
    Join Date
    09-02-2010
    Location
    Southampton
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: 5 digit number combinations

    If you read my post properly you can tell i asked for it without repititions, yes or just a code so i can do it myself easily.

    I have no idea how many numbers its whi im asking.

  6. #6
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: 5 digit number combinations

    Hi Puppiie,
    I'm not trying to be dumb, but your original post was confusing for me. I'm confused between your use of of the words number and digit.

    In your second sentence in your post you said that:
    For example, 01198, 02297, these couldn't be used as they have duplicate numbers.

    I couldn't tell if the problem(s) with these was that 0 and 9 (digits) had been used in both numbers or if it was because you didn't allow the 1 digit to be used in a single number.

    I've taught combinations and permutations in the past and it is always confusing if there are replacements or not and how to structure the problem correctly.

    This is why I'm asking.
    Last edited by MarvinP; 09-02-2010 at 11:08 AM.

  7. #7
    Registered User
    Join Date
    09-02-2010
    Location
    Southampton
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: 5 digit number combinations

    Oh sorry about the confusion

    i didn't mean the mubers 0 and 9 i ment because in each of the 5 digits there 2 ones and in the other 2 twos.

    Sorry for the confusion hope this helps

  8. #8
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: 5 digit number combinations

    Would the sum of the digits being unique solve your problem?
    0+1+2+3+4 = 10 , ...., 5+6+7+8+9 = 35

  9. #9
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: 5 digit number combinations

    Not sure how that would work, Marvin.. as 01567 summed is the same as 20467. (And many other matching sums)

  10. #10
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: 5 digit number combinations

    Hi Paul,
    The teacher in me is coming out. You are absolutely correct and I knew that.

    Now - are there C(10,5) = 252 possible numbers?

    Let Puppiie struggle a little bit with that question before we provide an answer.

    I'm exploring pulling the digits out of the 5 digit number, sorting them and putting back as a number.

    Would this accomplish the task? Example: 43210 -> 01234 as would 34012 -> 01234 after sorting digits.
    Then each 5 digit number would have a value and could eliminate dupicates in the question asked.

    I've used the sum of the digits before as an easy first test to see if I need to go further in the test.

  11. #11
    Registered User
    Join Date
    09-02-2010
    Location
    Southampton
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: 5 digit number combinations

    I'm not going to lie you have got me a bit confused.

    but you are right i could not have 43210 aswell as 01234 because the order of the numbers do not matter.

  12. #12
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: 5 digit number combinations

    Puppiie -

    You confusion is GREAT! As we try to give answers, it's important for us to understand your question. You have to decide if 01234 is the same as 43210. It was not obvious, to me, from your original post.

    I decided you wanted to say that 12345 was the same as 54321. I've written a User Defined Function that sorts (from small to large) 5 digits and returns the value. Example 54321 = 12345 , 13245 = 12345 ect.

    If you use this function in a column next to your text digits it will be easier to tell which are the same, as the value will be the same.

    Please Login or Register  to view this content.

    To use the above User Defined Function (UDF)

    If A1 contains "43267" (any 5 character string of digits)
    In B1 type "=MinValue5String(A1)"
    B1 will then show the value 23467.

    I'm not sure this answers your entire question but may be a start for determining if any 2 Five Digit strings have the same exact 5 digits in them as another (based on their minimum 5 digit values).

  13. #13
    Registered User
    Join Date
    09-02-2010
    Location
    Southampton
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: 5 digit number combinations

    I am sorry but i am a complete fool, is it possible to get a list f numbers i am really struggling with this =/

  14. #14
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: 5 digit number combinations

    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  15. #15
    Registered User
    Join Date
    09-02-2010
    Location
    Southampton
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: 5 digit number combinations

    Thanks SHG you helped me crack my lockbox!!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1