Skip to content

Instantly share code, notes, and snippets.

@ricbit

ricbit/matrix.m

Created Apr 17, 2021
Embed
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