back to blog

killing a mosquito with a sledgehammer

4/30/2025 AD

it was a really annoying mosquito
i was doing a math test today
and one of the problems was:
if you have a "word" with five distinct letters, (just say they're abcde)
and the number of each letter is n1, n2, n3, n4, n5, respectively
prove the number of anagrams of that "word" is equal to 
(n1 + n2 + n3 + n4 + n5)!

n1! n2! n3! n4! n5!

so i went "i'm not writing out  (
n1 + n2 + n3 + n4 + n5
n1
) (
n2 + n3 + n4 + n5
n2
) (
n3 + n4 + n5
n3
) (
n4 + n5
n4
) (
n5
n5
)
"
i decided to instead prove that this formula is true for any number of distinct letters >:)
definitely much less work :)
the formula in question: with N distinct letters, the number of anagrams is 
(
N Σ i = 1
ni )!

N Π i = 1
ni!

and obviously the claim is this formula with N = 5
i obviously could have done the simple combinatoric proof with ways to place n1 copies of a in n1 + n2 + n3 + n4 + n5 spaces
but you know how i am (you probably don't)

note: updated 5/1/2025 AD to change the text formulas to css crimes better looking formulas