Code:
7 same: 1
6+1: 7 (7 positions where the one suit can be)
5+2: (7 choose 5)=21 (choose which 5 of the 7 are the same)
5+1+1: (7 choose 5)=21 (choose which 5 of the 7 are the same)
4+3: (7 choose 4)=35 (choose which 4 of the 7 are the same)
4+1+1+1: (7 choose 4)=35
4+2+1: (7 choose 4)*(3 choose 2)=105
3+2+1+1: (7 choose 3)*(4 choose 2)=210
3+2+2: (7 choose 3)*(4 choose 2)/2=105 (div 2 because the suits with 2 are isomorph)
3+3+1: (7 choose 3)*(4 choose 3)/2=70 (div 2 because the suits with 3 are isomorph)
2+2+2+1: (7 choose 2)*(5 choose 2)*(3 choose 2)/6=105 (div 6 because the suits with 2 are isomorph)
Total: 1 + 7 + 21 + 21 + 35 + 35 + 105 + 210 + 105 + 70 + 105 = 715
How many does Djhemlig collapse (less than 3 of same suit on board)?
Code:
7 same: 0
6+1: 0
5+1+1 and 5+2: 0
4+3: 0
4+1+1+1: (5 choose 2)=10 (if we have suited holes and the suit is part of the 4, so choose the 2 same from the board, or alternative: (4/7)*(3/6)*35)
4+2+1: (5 choose 2)*(3 choose 2)=30 (if we have suited holes and the suit is part of the 4, so choose the matching suits on board, or alternative: (4/7)*(3/6)*105)
3+2+1+1: (2*(3/7)*(4/6) + (3/7)*(2/6)) * 210 = 150 (if holes contain 2 or 1 of the 3 => only 1: 2*(3/7)*(4/6), both: (3/7)*(2/6))
3+2+2: (2*(3/7)*(4/6) + (3/7)*(2/6)) * 105 = 75 (if holes contain 2 or 1 of the 3 => only 1: 2*(3/7)*(4/6), both: (3/7)*(2/6))
3+3+1: (3/7)(3/6) * 70 = 15 (if holes contain 1 of each 3 => (3/7)(3/6))
2+2+2+1: 105 (all)
Djhemlig Total: 1 + 7 + 42 + 35 + (35-10) + (105-30) + (210-150) + (105-75) + (70-15) + 0 = 330
So Djhemlig would be 715/330 = 2.1667 times larger without that trick.
So: 52402675 * 2.1667 = 113,540,876 (still smaller than 123M )
Probably a calculation error on my side or another optimization I did not find until now.Statistics: Posted by SkyBot — Tue Sep 13, 2016 8:32 pm
]]>