+ Reply to Thread
Results 1 to 9 of 9

possible combinations

  1. #1
    Registered User
    Join Date
    02-11-2009
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2003
    Posts
    5

    possible combinations

    I need to find possible combinations for the following example:

    a*x + b*y + c*z = t
    p = 10

    Where
    a = 0
    b = 5
    c = 10
    t = 30

    x + y + z has to = p

    a, b, c, t, and p would be variables that I would specify. The numbers above are just examples. What I would need to see as output would be:

    7a, 0b, 3c
    4a, 6b, 0c
    5a, 4b, 1c
    etc...
    Last edited by yarnedia; 02-11-2009 at 10:47 PM. Reason: mistake

  2. #2
    Registered User
    Join Date
    02-11-2009
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: possible combinations

    any help is greatly appreciated!
    Last edited by yarnedia; 02-11-2009 at 10:48 PM. Reason: mistake

  3. #3
    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: possible combinations

    You have 7 unknowns and 5 equations. There are an infinite number of solutions.
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Registered User
    Join Date
    02-11-2009
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: possible combinations

    No, there are only 3 unkowns. Values for a,b,c,t,and p are specified. For example using this particular example the potential solutions are:

    6y and 4x
    4y, 1z and 5x
    2y, 2z and 6x
    3z and 7x

    All of these combinations result in t=30 and x+y+z=10 (or p)

  5. #5
    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: possible combinations

    OK, there are three unknowns -- still an infinite number of solutions. Are x, y and z constrained to be non-negative?

  6. #6
    Registered User
    Join Date
    02-11-2009
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: possible combinations

    Yes, xyz cannot be negative.

    To be clear, I am not looking for the number of possibilities. I am looking for actual possible combinations when the variables of a,b,c,t,p are assigned values (> 0)

  7. #7
    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: possible combinations

    So,

    x + y + z = p => z = p - x - y

    For x = 0, there are p+1 possibilities for y and z
    For x = 1, there are p possibilities for y and z
    For x = 2, there are p-1 possibilities for y and z
    For x = 3, there are p-2 possibilities for y and z
    ...
    For x = p, there is 1 possibility for y and z

    The sum of {i, i+1, i+2, ..., P+1} is (P+1)*(P+2)/2

    For P=0, 1, 2, 3, 4, ..., combinations = 1, 3, 6, 10, 15, ... (which are the triangular numbers starting at 1)

    To list them,
    Please Login or Register  to view this content.
    Last edited by shg; 02-12-2009 at 02:45 PM.

  8. #8
    Registered User
    Join Date
    02-11-2009
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: possible combinations

    excellent, this did the trick. Thanks!!!

  9. #9
    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: possible combinations

    You’re welcome. Would you please mark the thread as Solved?

    Click the Edit button on your first post in the thread

    Click Go Advanced, select [SOLVED] from the Prefix dropdown, then click Save Changes

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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