I'm hoping to develop a formulaic approach to answering a problem to do with dealing card games. I will be using the output of this formula as a checksum against an algorithm that I made. Thanks in advance for any help with this.
Parameters & Background
- We represent equivalent card combinations (hereafter, archetypes) by notating them or their component groups as suited ('s', sharing a suit) or offsuit ('o', not sharing a suit). For instance, AKs might be A-clubs K-clubs or A-diamonds K-diamonds.
- In a two-card game, there are 1326 unique combinations ((52 x 51) / 2) that reduce to 169 archetypes. This grid shows an arrangement of two-card archetypes: Pairs run down the diagonal. The top-right hands are suited, bottom left are unsuited. The density of combinations represented by each archetype is variable. There are 12 offsuit combos, 6 pair combos, and 4 suited combos for each respective element.
- Develop a formula or algorithm that returns the number of archetypes for n-cards. For instance, in a 5-card archetype, we may see notation like AKs74s3o indicating that the A-K share a suit, 7-4 share another, and the 3 is a different suit altogether.
Is there a formulaic way to arrive at the archetype count without brute-forcing it?
Thanks for any insight!
Partial answer , too long for comment.
1st point, error in your count, There are 12 offsuit combos, not 16. You can check that total should be 1326.
With 3 cards, if you want to check your process, My result is :
AcKdQh and similar : 286
AcAdKh and similar : 156
AcAdAh and similar : 13
AcKcQd and similar : 858
AcAdKd and similar : 156
AcKcQc and similar : 286
Total 1755.
If you also find 1755, we can consider we are both correct. If not, maybe I am wrong, maybe you are wrong.
There is no formula valid for any number of cards ; if you want to check more, you need to focus on some values.
example, 5 cards, AcAdKcKdQh and similar : 858.