Interesting question and reference, as I compared this formula of mine with Rasmus’ ABC output and obtained a very neat fit. Don’t you miss the 2^{k-i} in your numerator? Thanks, Hong!

I implement your close-form equation in R:

closeForm1 <- function(s,p,k) {

sum <- 0

# s is number of singleton socks

# p is number of sock pairs

# m is total number of socks

m = s + 2 * p

# k is the select unique socks

for (i in 0:k) {

sum <- sum + choose(s,i) * choose(2*p,k-i) / choose(m,k)

sum closeForm1(s=3,p=21,k=11)

[1] 0.009357792

which is different from the result of Śaunak Sen @ http://t.co/HhS3K45Pc5:

> norepeat2(n1=3,n2=21,k=11)

[1] 0.2275212

Imagine this becomes a “hot” topic… Then we are running the risk it gets too smelly to be comfortable!

]]>Given the current interest in garment related computation I believe the time is ripe for “The Journal of Statistical Analysis of Clothing and General Apparel.”

]]>Thanks for the reference, not a pedestrian paper, far from it!!!

]]>Thanks, even 25 looks like 2g or at least 2G from far away…!

]]>