+ Reply to Thread
Results 1 to 9 of 9

Different Combinations of text

  1. #1
    Valued Forum Contributor
    Join Date
    04-21-2005
    Location
    Southern England
    MS-Off Ver
    Excel for Office 365
    Posts
    1,689

    Different Combinations of text

    Hi,

    I have a list of 5 words and I want to know the different combinations of these words.

    The List is:
    Stp (Yes/No)
    Shp (Yes/No)
    Ld (Yes/No)
    Geo (Yes/No)
    Gas (Yes/No)


    e.g. for Stp
    Stp Shp Ld Geo Gas
    Yes No No No No
    Yes Yes No No No
    Yes No Yes No No
    Yes No No Yes No
    Yes No No No Yes
    Yes Yes Yes No No
    Yes Yes No Yes No
    Yes Yes No No Yes

    And so on......

    I have found the attached spreadsheet that may do it but despite trying I couldnt get it to list all combinations.

    Can anyone get the attached to help solve my problem or point me in the direction of a simlar model? (Original post: http://www.excelforum.com/excel-misc...ent-words.html)

    Paul
    Attached Files Attached Files
    Last edited by pauldaddyadams; 11-20-2011 at 04:52 PM.

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

    Re: Different Combinations of text

    Hi Paul,

    The words Combination and Permutation are often confused to us laymen. First you need to know if the order of the words is a different and both count or not. The next question would be to calculate how many rows the answer will have. Read:
    http://www.mathsisfun.com/combinator...mutations.html
    to answer the above.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Valued Forum Contributor
    Join Date
    04-21-2005
    Location
    Southern England
    MS-Off Ver
    Excel for Office 365
    Posts
    1,689

    Re: Different Combinations of text

    Hi,

    It would be a combination - the order doesnt matter.

    Repetition is not allowed.

    i still cant work out how many different combinations I am expecting :-/

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

    Re: Different Combinations of text

    Sooooooo.

    If the order doesn't matter then
    Yes, Yes, Yes, Yes, No is the same as Yes, No, Yes, Yes, Yes! Is that correct?

    Now what does Stp, Shp, Ld, Geo and Gas have to do with this problem?

    I still don't understand the question.

    Here is why! I used to teach high school math. In Advanced Algebra we had a section on Combinations and Permutations. The killer problem was to put 4 black balls and 3 white balls in a bag. You would reach in and pull out a ball and see what color it was. In one type of problem you would put the ball back in the bag and draw again (with replacements). In another type of problem you would keep the ball and draw from what was left (no replacements). At the end of chapter test they would always ask, "Take 4 balls from the bag" and not mention replacements or not. I always had to look at the answer in the back of the book to see if they put those suckers back before drawing a second time or if they drew them all at once. Sometimes they meant one at a time with replacements which is much different than all at a time (no replacements).

    Defining the question to understand how the game is played is the most important part of these kinds of problems.

  5. #5
    Valued Forum Contributor
    Join Date
    04-21-2005
    Location
    Southern England
    MS-Off Ver
    Excel for Office 365
    Posts
    1,689

    Re: Different Combinations of text

    MarivnP – hope your patient! Lol

    This has had me and my colleague in a twist – its been a long time since I have had to think about the number of combinations.

    Previously I told you it doesn’t matter however this must be incorrect based on your example, so order does matter.

    Stp, Shp, Ld, Geo and Gas can either be Yes or No. In my new example I have called them:
    Stp and Unstp
    Shp and Unshp
    Ld and UnLd
    Geo and UnGeo
    Gas and UnGas


    So for example you can have the following
    Stp, Shp, Ld, Geo, Gas
    Stp, UnShp, Ld, Geo, Gas etc

    In the attached I think it lists all combinations however I am not confident at all. Can you confirm it?
    Attached Files Attached Files

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

    Re: Different Combinations of text

    This is starting to make more sense to me.

    Lets say you have 5 cards in a deck. You deal the first card and you have 4 left to deal (no replacements)
    The number of hands is
    5 factorial or 5 possible first cards (times) 4 possible second cards (times) 3 times two time 1. (order matters)

    But what about the Stp vs UnStp???? How about you can put the card face up or face down. That might simulate your problem.

    So 5 for the first card time 2 as it might go face up or down.
    Then 4 for second card times 2

    How about
    5*2*4*2*3*2*2*2*1*2 for all possible ways to do this problem.
    Total = 5 factorial times (2^5) = 120 * 32 = 3840 different ways to deal that deck using your rules.

    Is this the correct assumptions on what you want?

  7. #7
    Valued Forum Contributor
    Join Date
    04-21-2005
    Location
    Southern England
    MS-Off Ver
    Excel for Office 365
    Posts
    1,689

    Re: Different Combinations of text

    I found this on a different forum which helps explain it better than I can:

    Original Question - (similar to mine 5 combinations, yes or no)
    "Say I have 5 patents going into trial. All, one, none, or any combination of them may be found to infringe (so 2 options per patent - either it infringes or it doesn't)

    How many possible outcomes/combinations are there?"

    Answer
    This question deals with combinations (not permutations), since order doesn't matter here (Patent #1 and Patent #2 both infringing is the same as Patent #2 and Patent #1 infringing).

    This is actually the sum of 6 different combinations.
    1) the combination where none of 5 patents infringes (n=5, k=0)
    2) 1 of 5 infringes (n=5, k=1)
    3) 2 of 5 (n=5, k=2)
    4) 3 of 5 (n=5, k=3)
    5) 4 of 5 (n=5, k=4)
    6) 5 of 5 (n=5, k=5)

    So the total number of combinations is

    C(5,0)+C(5,1)+C(5,2)+C(5,3)+C(5,4)+C(5,5)

    =1+5+10+10+5+1=32


    Do you agree with this? I believe 32 is correct which is what the attachement shows

  8. #8
    Valued Forum Contributor
    Join Date
    04-21-2005
    Location
    Southern England
    MS-Off Ver
    Excel for Office 365
    Posts
    1,689

    Re: Different Combinations of text

    Anyone know the answer? I've been searching online and I'm still not sure

  9. #9
    Valued Forum Contributor
    Join Date
    04-21-2005
    Location
    Southern England
    MS-Off Ver
    Excel for Office 365
    Posts
    1,689

    Re: Different Combinations of text

    I found this site: (Universal Text Combination Generator section)
    http://textmechanic.com/Permutation-Generator.html

    It only goes up to 4 different combinations which total 16 different combinations but based on this I am confident 5 will have 32

+ 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