Concepts2
โMathAdvanced
Mรถbius Function and Inversion
The Mรถbius function ฮผ(n) is 0 if n has a squared prime factor, otherwise it is (-1)^k where k is the number of distinct prime factors.
#mobius function#mobius inversion#dirichlet convolution+12
โ๏ธAlgorithmAdvanced
Sum over Subsets (SOS) DP
Sum over Subsets (SOS) DP lets you compute F[mask] = sum of A[submask] over all submasks in O(n 2^n) instead of O(3^n).
#sos dp#subset zeta transform#mobius inversion+11