直接给定形式吧。
不给证明了。
或卷积
\(c_i = \sum_{i | j =k} a_i * b_i\)
写作\(FWT(A)_i = \sum_{j \in i}A_j\)
将\(A\)对半分为\(A_0,A_1\)
\(FWT(A) = \left\{ \begin{aligned} (FWT(A_0),FWT(A_0) + FWT(A_1))\\ A(len_A = 0) \end{aligned} \right.\)
先转成\(FWT\)后,两式单点乘,再\(IFWT\)。
与卷积
\(c_i = \sum_{i \& j =k} a_i * b_i\)
写作\(FWT(A)_i = \sum_{i \in j}A_j\)
先转成\(FWT\)后,两式单点乘,再\(IFWT\)。
\(FWT(A) = \left\{ \begin{aligned} (FWT(A_0) + FWT(A_1),FWT(A_1))\\ A(len_A = 0) \end{aligned} \right.\)
异或卷积
\(FWT(A) = \left\{ \begin{aligned} (FWT(A_0) + FWT(A_1),FWT(A_0) - FWT(A_1))\\ A\ (len_A = 0) \end{aligned} \right.\)
\(IFWT(A) = \left\{ \begin{aligned} (\frac{FWT(A_0) + FWT(A_1)}{2},\frac{FWT(A_0) - FWT(A_1)}{2})\\ A\ (len_A = 0) \end{aligned} \right.\)