"Summary" polynomial generating function-related (2)

The main speaking about \ (FWT \)
we know that \ (FFT \) is a kind of transformation.
We want to construct \ (FWT \) is a kind of transformation.

\ (FWT \) is used to doing it?
It is used for determining the bit convolution operation.
Perhaps not enough to say so explicitly.
We define the convolution is the thing:
\ [C_K = \ \ limits_ {I \ J} a_ib_j CIRC \ SUM]
inside the circle represents one operation.
Ordinary convolution is \ (+ \)
Dirichlet convolution is \ (* \)
subset convolution is \ (\ subseteq \)
then bit computing convolution it?
\ (and, or, xor \ )

In fact, \ (and \) and \ (or \) is relatively simple, and \ (xor \) is the most difficult.

1. \ (or \) convolution
we require this form of the convolution:
\ [C_K = \ SUM \ limits_ {I \ or \ J} = K a_ib_j \]
we set our converted into \ (T (A) \) , the inverse transform is \ (IT (A) \) .
This transformation according to \ (an FFT \) routine is the case, it is necessary to satisfy:
T (A B) = T (A) T (B)
A
B = the IT (T (A) T (B))
is the convolution becomes paired bit multiplication.

If such a structure, then (in fact, I do not know how to think so made): \
[T (A) _J = \ SUM \ limits_ {i \ or \ J = J} A_i \]
so we started at the above convolution:
\ [T (A * B) _i = \ sum \ limits_ {j \ or \ i = i} \ sum \ limits_ {k \ or \ l = j} A_kB_l = \ sum \ limits_ {k \ or \ l \ subseteq I} A_kB_l \]
\ [(T (A) T (B)) _ I = \ SUM \ limits_ {K \ or \ I = I} a_k \ SUM \ limits_ {L \ or \ I = I} B_L = \ SUM \ limits_ {k \ or \ l \ subseteq i} A_kB_l \]

So right.
Below that how to calculate \ (or \) convolution.
We consider this transfer thing is kind of how.
First, assume that \ (A \) halves \ (A_0 \) and \ (A_1 \) transformation has been calculated, we now seek \ (A \) transformation.
We set \ (merge (A, B) \) as a function of connecting two arrays.
Then:
\ [T (A) = Merge (T (A_0), T (A_0) + T (A_1)) \]
Why?
This is the highest level since the current one is zero belongs to a subset of the case 1, so the \ (A_0 \) added \ (A_1 \) side of the family to stay.
It is clear that the inverse transform.
\ [IT (A) = merge
(IT (A_0), IT (A_1) -IT (A_0)) \] Save back would be finished.

2.1. \ (And \) convolution
we require this form of convolution.
\ [c_k = \ sum \ limits_
{i \ and \ j = k} a_ib_j \] Similarly configured transformation \ (T \)
considering such transformations:
\ [T (A) _i = \ SUM \ limits_ {I \ and \ j = i} a_j \]
expand at:
\ [T (A * B) _i = \ SUM \ limits_ {I \ and \ J = I} \ SUM \ limits_ {K \ and \ L = J} A_kB_l = \ SUM \ limits_ {I \ subseteq K \ and \ L} A_kB_l \]
\ [(T (A) T (B)) _ I = \ SUM \ limits_ {K \ and \ I = I} \ SUM \ limits_ {L \ and \ i = i} A_kB_l = \
sum \ limits_ {i \ subseteq k \ and \ l} A_kB_l \] obtained by the point value of the equation.
Similar or convolution.
\ [T (A) = Merge (T (A_0) + T (A_1), T (A_1)) \]
\ [the IT (A) = Merge (the IT (A_0) Expediting IT (A_1), the IT (A_1)) \]

3. \ (xor \) convolution
here repeat what \ (rvalue \) seniors (sister) explanation. (In fact, I can not think of other methods of proof)

For a binary number \ (X \) , we set \ (d (x) \) to its binary \ (1 \) parity number.
Then the following can be concluded:
\ [D (I \ and \ K) \ XOR \ D (J \ and \ K) = D ((I \ XOR \ J) \ and \ K) \]
First \ (and \ k \ ) equivalent to no, this is the difference between the number of bits of change.
Obviously the rest.
\ (i \) each time more out of a \ (1 \) , the overall \ (1 \) parity will change.

尝试构造如下变换:
\[T(A)_i=\sum\limits_{d(i\ and\ j)=0}A_j-\sum\limits_{d(i\ and\ j)=1}A_j\]
展开一下:
\[T(A*B)_i=\left(\sum\limits_{d(i\ and\ j)=0}\sum\limits_{k\ xor\ l=j}A_kB_l\right)-\left(\sum\limits_{d(i\ and\ j)=1}\sum\limits_{k\ xor\ l=j}A_kB_l\right)\]
\[\begin{aligned}\\ (T(A)T(B))_i&=\left(\sum\limits_{d(i\ and\ j)=0}A_j-\sum\limits_{d(i\ and\ j)=1}A_j\right)\left(\sum\limits_{d(i\ and\ j)=0}B_j-\sum\limits_{d(i\ and\ j)=1}B_j\right)\\ &=\left(\sum\limits_{d(a\ and\ i)\ xor\ d(b\ and\ i)=0}A_aB_b\right)-\left(\sum\limits_{d(a\ and\ i)\ xor\ d(b\ and\ i)=1}A_aB_b\right)\\ &=\left(\sum\limits_{d((a\ xor\ b)\ and\ i)=0}A_aB_b\right)-\left(\sum\limits_{d((a\ xor\ b)\ and\ i)=1}A_aB_b\right)\\ &=\left(\sum\limits_{d(i\ and\ j)=1}\sum\limits_{k\ xor\ l}A_kB_l\right)-\left(\sum\limits_{d(i\ and\ j)=1}\sum\limits_{k\ xor\ l}A_kB_l\right)\\ \end{aligned}\]

Convolution transformation of the structure is right.
Consider how the calculation.
\ [T (A) = merge
(T (A_0) + T (A_1), T (A_0) -T (A_1)) \] If the most significant bit is 0, then, then in any case the \ (and \) operations are 0, the contribution will not change.
Directly to the left.
If the most significant bit is 1, then, for the right value will generate a contribution of more than 1, this will lead to parity inverted, so negated plus to go.
Inverse transform words:
\ [the IT (A) = Merge (\ {FRAC the IT (A_0) + the IT (A_1)} {2}, \ {FRAC the IT (A_0) Expediting IT (A_1)} {2}) \]

So you can quickly find a bit convolution operation

Guess you like

Origin www.cnblogs.com/Lrefrain/p/12025227.html