Dividing gems by random permutation A group of people have found a treasure of gems: $G=90$ green and $B=990000$ blue. They decided to divide it among them. Since there are more people then gems, they decide to order themselves in a random permutation and let each person choose one gem in turn.
As it turns out, there are $G+g=100$ citizens who prefer a green gem and $B+b=1000000$ who prefer blue ($g=10, b=10000$). How many of the 100 green citizens will get a green gem?
The number is of course at most $G$, but might be less. Why? Because if the $B$ blue gems run out before the first $G$ green preferrers have a chance to select their gem, the remaining $b$ blue preferrers will take the green gems (which are still somewhat valuable for them).
My intuition is that this event is very unlikely, because in a random permutation, there will be approximately 1 green preferrers in every $(B+b)/(G+g)=10000$ blue citizens. At the point when $G$ green preferrers have taken their gem, only $G(B+b)/(G+g)=900000$ blue preferrers have had a chance to take their gem; there are still plenty of blue gems (about 90000). In other words, the green gems will be over much before the blue gems.
MY QUESTION IS: Is this event indeed unlikely? And what is its approximate probability, as a function of the parameters $G,g,B,b$?

It is unlikely that fewer than $90$ green gems will go to green-preferrers, with a probability lower than $10^{-8}$.  
The hypergeometric probability that $G=g$ of the first $990090$ citizens prefer green is $$\frac{{100 \choose g}{1000000 \choose 990090 -g }}{{1000100 \choose 990090 }}$$ and you want to sum this from $g=0$ to $g=89$.  
Using R, this can easily be calculated with phyper(89,100,1000000,990090) or with
> p <- function(g){exp(lchoose(100,g) +
+                      lchoose(1000000,990090 - g) -
+                      lchoose(1000100,990090)      ) }
> sum(p(0:100))
[1] 1
> sum(p(0:89))
[1] 6.284201e-09

As you might expect, $99$ gems (of which $9$ are blue) going to green-preferrers is the most likely outcome, though $100$ is only slightly less likely.
