Skip to content

Instantly share code, notes, and snippets.

Created April 17, 2021 01:38
What would you like to do?
Expected number of packs to complete an album
row[n_] := Table[
Binomial[n, 4-(k-n)] Binomial[180-n, k-n] / Binomial[180, 4],
{k, 0, 180}]
m = Table[row[k], {k, 0, 180}]
r = m[[1;;180, 1;;180]]
Print[N[Total[Inverse[IdentityMatrix[180] - r][[1]]]]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment