Software Design
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreSoftware Design

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 6th, 2003, 07:00 AM
cerksees cerksees is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 1 cerksees User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation 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!

Reply With Quote
  #2  
Old August 6th, 2003, 02:49 PM
dog135's Avatar
dog135 dog135 is offline
Doggie
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jul 2003
Location: Seattle, WA
Posts: 751 dog135 User rank is Corporal (100 - 500 Reputation Level)dog135 User rank is Corporal (100 - 500 Reputation Level)dog135 User rank is Corporal (100 - 500 Reputation Level)dog135 User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 10 h 38 m 25 sec
Reputation Power: 7
Someone just asked this same question:

http://forums.devshed.com/t74853/s.html

Reply With Quote
  #3  
Old August 7th, 2003, 07:21 AM
epl epl is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2001
Location: Dublin
Posts: 413 epl User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 18 m 18 sec
Reputation Power: 8
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
File Type: zip combinations.zip (8.8 KB, 430 views)

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreSoftware Design > Combinations into an Array?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT