Massimiliano Maini-3 wrote: > > I did the computation this way: > > # Non-contact positions. > NC_pos = 0 > for lop in range(1,23+1): > # Black has 1 checker on point lop, 15-1 checkers on points > # 0..lop (0 meaning off). > # White can be on points lop+1..25 (25 meaning off), but at > # least one is on points lop+1..24. Nobody is on the bar. > NC_pos += Dnm(lop+1,15-1)*(Cnm(24-(lop+1)+1,1)*Dnm(25-(lop+1)+1,15-1)) > > I get this: > > Non-contact positions: 9350831674578000 (9E+15). >
Massimiliano, I think your formula is incorrect. For white, you have: White = (Cnm(24-(lop+1)+1,1)*Dnm(25-(lop+1)+1,15-1)) With the explanation: # White can be on points lop+1..25 (25 meaning off), but at # least one is on points lop+1..24. Nobody is on the bar. I think from your explanation, it should be: White = Dnm(25-lop+1, 15) - 1 where the -1 accounts for the one case that all checkers are off. For example, if lop = 22, and therefore white has 3 spaces to distribute 15 checkers, your formula gives: White = Cnm(2, 1) * Dnm(3, 14) = 2 * 120 = 240 But that number exceeds the total number of ways to distribute 15 checkers on 3 spaces, which is: Dnm(3, 15) = 136 Your formula gives the number of ways to distribute 15 checkers with 1 checker being distinguishable from all other checkers (and this special checker is not in the tray). This number is larger than the case where all checkers are indistinguishable from each other. I hope that made sense. - BGNJ -- View this message in context: http://old.nabble.com/Re%3A-%28OT%29-Position-ID-documentation-tp28666843p28793143.html Sent from the Gnu - Backgammon mailing list archive at Nabble.com. _______________________________________________ Bug-gnubg mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-gnubg
