Reminder: This post contains 1552 words
· 5 min read
· by Xianbin
This post shows the basic math required to understand the boolean function analysis.
Definitions.
Rademacher Function
The n-th Rademacher function rn(t) is defined on the interval [0, 1] as follows.
rn(t)=sign(sin(2nπt))
or equivalently,
rn(t)=(−1)⌊2nt⌋
where n∈N.
Or,
ri(x)=(−1)xi
where xi satisfying the following expansion.
x=i=0∑+∞2nxi
0≤x<1/2n;x1=0;1/2n≤2/2n;x1=1;....
It is easy to see that xi differs with (odd) even number of bits with xi+1 alternatively.
Walsh Function
The Walsh function is very similar to Rademacher function, but it has more interesting properties. The motivation of creating Walsh function is that to represent a periodic function by simple components like Fourier expansions.
It needs to satisfy some properties, like orthogonality basis.
Let
n=a0+2a1+⋯+2kakwhere ai∈{0,1}
Then, we have
wn(x)=Πi=1kri(x)ai
where ai is the indicator of the i-th bit of n.
To be more clearly, we have
wn(x)=Πi=0k(−1)aixi=(−1)∑i=0kaixi
Examples
n |
Binary |
Walsh Function Expression |
0 |
000 |
w0(x)=1 |
1 |
001 |
w1(x)=r0(x) |
2 |
010 |
w2(x)=r1(x) |
3 |
011 |
w3(x)=r0(x)⋅r1(x) |
w0(x)=1;w1(x)=(−1)x1;w2(x)=(−1)x2;w3(x)=(−1)x1+x2
where 0≤x<1/4,x1=0,x2=0;
0≤x<1/4;x1=0,x2=0;1/4≤x<1/2;x1=0,x2=1;1/2≤x<3/4;x1=1,x2=0;3/4≤x<1;x1=1,x2=1;
Then, it is easy to check the following.
-
wa(x)⋅wb(x)=wa⊕b(x)
- ⟨wi,wj⟩=∫01wi(x)wj(x)dx=0
for any i=j.