Skip to content

expand.grid game

6 messages · Greg Snow, Rolf Turner, Baptiste Auguie

#
This also has a closed form solution:
[1] 229713
#
Nice --- am I missing something or was this closed form solution not
entirely trivial to find?

I ought to compile the various clever solutions given in this thread
someday, it's fascinating!

Thanks,

baptiste

2010/1/12 Greg Snow <Greg.Snow at imail.org>:
#
How trivial is probably subjective, I don't think it is much above trivial.  I would not have been surprised to see this question on an exam in my undergraduate (300 or junior level) probability course (the hard part was remembering the details from that class from over 20 years ago).  My favorite test question of all time came from that course: "You have a deck of poker cards with the 3's removed (and jokers), you deal yourself 5 cards at random, what is the probability of getting a straight (not including straight flushes)?"

This problem is simpler.  Just think of the 8 places in the number as urns, and the 17 1's as balls to be put into the urns.  One ball has to go in the first urn, so you have 16 left, there are choose(16+8-1,8-1) ways to distribute 16 undistinguishable balls among 8 distinguishable urns. But that includes some solutions with more than 9 balls in an urn which violates the digits restriction, so subtract off the illegal counts.  If we place 10 balls in the first urn, then we have 7 remaining balls to distribute between the 8 urns or choose( 7+8-1, 7), If we place 1 ball in the first urn and 10 balls in one of the 7 other urns (7*), then there are choose( 6+8-1, 7 ) ways to distribute the remaining 6 balls in the 8 urns.  Not too complicated once you remember (or look up) the formula for urns and balls.
#
On 13/01/2010, at 9:19 AM, Greg Snow wrote:

            
Sorry to be a thicko --- but doesn't the foregoing solution *leave  
in* the possibility
of putting all 17 balls in the first urn?  Or 3 balls in the first  
urn, 12 in the second,
and the remaining 2 in any of the other six urns?  Etc.  I.e. don't  
more terms have to
be subtracted?

	cheers,

		Rolf Turner

######################################################################
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}
#
I re-read the solution that you posted and realized where my thinking
was going wrong.  Sorry (again!) for being a thicko.

	cheers,

		Rolf Turner
On 13/01/2010, at 9:19 AM, Greg Snow wrote:

            
######################################################################
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}
#
It did take me a good night's sleep to understand it. I was stuck with
the exact same question but I see now how the remaining balls are
shared among all 8 urns (therefore cases with 11, 12, 13, ... 17 balls
are also dealt with).

Thanks again,

baptiste


2010/1/12 Rolf Turner <r.turner at auckland.ac.nz>: