|
-
Apr 3rd, 2013, 12:00 PM
#5
Re: Pinochle Probability (again)
Basically, yes. As it turns out, this is much easier than I expected. In c#, again (and using the same Choose() function in my earlier post:
Code:
private long[] CalculateAll()
{
long[] total = new long[5];
for(long i=0; i<=4;i++)
for(long j=0; j<=4;j++)
for(long k=0; k<=4;k++)
for(long l=0; l<=4;l++)
total[Math.Min(Math.Min(i,j),Math.Min(k,l))]+= Choose(4,i) * Choose(4,j) * Choose(4,k) * Choose(4,l) * Choose(64, 20 - (i+j+k+l));
return total;
}
That's it! This nets you:
[4] = 635,376
[3] = 1,299,449,210,880
[2] = 7,576,701,736,868,160
[1] = 731,135,833,306,109,440
[0] = 2,796,602,307,719,350,464
[T] = 3,535,316,142,212,174,320
([T] is the sum of [0] - [4], and, as verification, equals (80,20))
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|