#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    1
    Rep Power
    0

    Combinations into an Array?


    Using vb.net, I'd like to create an array of all possible combinations of a set of X objects from a master set of Y objects.

    i.e. If Y = {1 2 3 4 5 6 7} and the sub set limit is 2 then a partial list of combinations would be {1 2}, {1 3} {1 4}...but {4 1} would NOT be in the subset because {1 4} and {4 1} are different permutations but NOT different combinations.

    I don't want the permutations, only the combinations.

    Thanks!
  2. #2
  3. Doggie
    Devshed Novice (500 - 999 posts)

    Join Date
    Jul 2003
    Location
    Seattle, WA
    Posts
    751
    Rep Power
    13
    Someone just asked this same question:

    http://forums.devshed.com/t74853/s.html
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2001
    Location
    Dublin
    Posts
    413
    Rep Power
    14
    so did someone else:
    http://forums.devshed.com/t70346/s.html

    i attach a vb.net project with the above - it might be some help
    Attached Files

IMN logo majestic logo threadwatch logo seochat tools logo