Toolbox

T1: Mathematical Foundation of Boolean Function Analysis

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)r_n(t) is defined on the interval [0, 1] as follows. rn(t)=sign(sin(2nπt))r_n(t) = \operatorname{sign}\left( \sin(2^n \pi t) \right) or equivalently,

rn(t)=(1)2ntr_n(t) = (-1)^{\lfloor 2^n t \rfloor}

where nNn \in \mathbb{N}.

Or,

ri(x)=(1)xir_i(x) = (-1)^{x_i} where xix_i satisfying the following expansion.

x=i=0+xi2nx = \sum_{i=0}^{+\infty} \frac{x_i}{2^n} 0x<1/2n;x1=0;1/2n2/2n;x1=1;....0\leq x <1/2^n; x_1 = 0;\\ 1/2^n \leq 2/2^n; x_{1} = 1;\\ ....\\

It is easy to see that xix_i differs with (odd) even number of bits with xi+1x_{i+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}n = a_0 + 2 a_1 + \cdots + 2^k a_k \quad \text{where } a_i \in \{0,1\}

Then, we have wn(x)=Πi=1kri(x)aiw_n(x) = \Pi_{i=1}^k r_i(x)^{a_i}

where aia_i is the indicator of the ii-th bit of nn.

To be more clearly, we have

wn(x)=Πi=0k(1)aixi=(1)i=0kaixiw_n(x) =\Pi_{i=0}^k (-1)^{a_i x_i} = (-1)^{\sum_{i=0}^k a_ix_i}

Examples

n Binary Walsh Function Expression
0 000 w0(x)=1w_0(x) = 1
1 001 w1(x)=r0(x)w_1(x) = r_0(x)
2 010 w2(x)=r1(x)w_2(x) = r_1(x)
3 011 w3(x)=r0(x)r1(x)w_3(x) = r_0(x) \cdot r_1(x)
w0(x)=1;w1(x)=(1)x1;w2(x)=(1)x2;w3(x)=(1)x1+x2w_0(x) = 1; \\w_1(x) = (-1)^{x_1};\\ w_2(x) = (-1)^{x_2}; \\w_3(x) = (-1)^{x_1+x_2}

where 0x<1/4,x1=0,x2=00\leq x< 1/4, x_1 = 0, x_2 = 0; 0x<1/4;x1=0,x2=0;1/4x<1/2;x1=0,x2=1;1/2x<3/4;x1=1,x2=0;3/4x<1;x1=1,x2=1;0\leq x < 1/4; x_1 = 0, x_2 = 0;\\ 1/4 \leq x < 1/2; x_1 = 0, x_2 = 1;\\ 1/2\leq x < 3/4; x_1 = 1, x_2 =0;\\ 3/4\leq x < 1; x_1 = 1, x_2 = 1;

Then, it is easy to check the following.