carlosblack
07-15-2003, 09:11 PM
Hello everybody, incredible forums with so much good info!
I was wondering if anybody had any ideas on what an algorithm to create all possible seven card combinations ignoring position (so As Ad Ah Ac 2c 2d 2h is the same as 2c 2d 2h As Ad Ah Ac) and how many combinations this will create?
I have tried an iterative approach but it is hard to ignore duplicates. I create all combinations for as ad ah ac 2s 2d xx for example, then when I go to create as ad ah ac 2s 3d xx I run into the as ad ah ac 2s 3d 2d dupe, this gets exponentially worse as I progress. Checking every single variation against existing variations seems to be the only way to do this iterativelly but it seems silly. Any ideas appreciated.
I was wondering if anybody had any ideas on what an algorithm to create all possible seven card combinations ignoring position (so As Ad Ah Ac 2c 2d 2h is the same as 2c 2d 2h As Ad Ah Ac) and how many combinations this will create?
I have tried an iterative approach but it is hard to ignore duplicates. I create all combinations for as ad ah ac 2s 2d xx for example, then when I go to create as ad ah ac 2s 3d xx I run into the as ad ah ac 2s 3d 2d dupe, this gets exponentially worse as I progress. Checking every single variation against existing variations seems to be the only way to do this iterativelly but it seems silly. Any ideas appreciated.