Analysis of Boolean Functions

Analysis of Boolean Functions
Fourier Analysis,
Projections,
Influence,
Junta,
Etc…
And (some) applications
Slides prepared with help of Ricky Rosen
Boolean Functions

Def: A Boolean function
f : P[n]  0,1
1,1

Power set
of [n]
Choose the
location of -1
Choose a sequence
of -1 and 1
P[n]   x  [n]
 1,1
n
1,4
 1,1,1, 1
Functions as Vector-Spaces

A function can be represented as a
string of size 2n (i.e.: it’s truth table)
11*
11*
1*
1*
1-1*
1-1*
**
-11*
-11*
111*
111*
11-1*
11-1*
1-11*
1-11*
1-1-1*
1-1-1*
-111*
-111*
-11-1*
-11-1*
-1*
-1*
-1-1*
-1-11*
-1-11*
-1-1*
-1-1-1*
-1-1-1*
ff
2n
11*
11*
1*
1*
10*
10*
Functions’ Vector-Space

A functions f is a vector

Addition:


f
**
01*
01*
0*
0*
00*
00*
n
2
‘f+g’(x) = f(x) + g(x)
Multiplication by scalar
‘cf’(x) = cf(x)
Inner product (normalized)
fg
E f  x   g  x 
x2n
111*
111*
110*
110*
101*
101*
100*
100*
011*
011*
010*
010*
001*
001*
000*
000*
ff
Boolean function as voting system

Consider n agents, each voting either
“for” (T=-1) or “against” (F=1)
-1 1 -1 -1 1 1 -1 1 -1 1 -1 1 -1 1 -1 1 1 1 -1 1
-11


The system is not necessarily majority.
This is a boolean function over n
variables.
Voting and influence
-1 1 -1 -1 1 1 -1 1 -1 1 -1 1 -1 1 -1 1 1 1 -1 1
-11

Def: the influence of i on f is the
probability, over a random input x, that f
changes its value when i is flipped X represented as a
set of variables
influencei  f  Pr f  x  
i   f  x \ 
i 
xPn
-1 1 -1 -1 ? 1 -1 1 -1 1 -1 1 -1 1 -1 1 1 1 -1




Majority :{1,-1}n {1,-1}
The influence of i on Majority is the probability,
over a random input x, Majority changes with i
this happens when half of the n-1 coordinate
(people) vote -1 and half vote 1.
i.e.
 n 1  1
influencei  2 

n
  n  1 / 2 
n
-1 1 -1 -1 1 1 -1 1 -1 1 -1 1 -1 1 -1 1 1 1 -1 1

Parity : {1,-1}n {1,-1}
Parity(X) 
n
x
i1
Influencei  1
i
n
 xi  xj
ji
Always
changes the
value of
parity
-1 1 -1 -1 1 1 -1 1 -1 1 -1 1 -1 1 -1 1 1 1 -1 1




Dictatorshipi :{1,-1}20 {1,-1}
Dictatorshipi(x)=xi
influence of i on Dictatorshipi= 1.
influence of ji on Dictatorshipi= 0.
Total Influence (Average Sensitivity)

Def: the Average Sensitivity of f (as)
is the sum of influences of all
coordinates i  [n] :
as  f  



 influence  f
i
as(Majority) = O(n½)
as(Parity) = n
as(dictatorship) =1
i
When as(f)=1
Def: f is a balanced function if it equals -1
exactly half of the times:
Ex[f(x)]=0
Can a balanced f have as(f) < 1?
What about as(f)=1?
Beside dictatorships?
Prop: f is balanced and as(f)=1
 f is a dictatorship.
Representing f as a Polynomial

What would be the monomials over x  P[n] ?

All powers except 0 and 1 cancel out!

Hence, one for each character S[n]
S (x)

 x   1
iS
Sx
i
These are all the multiplicative functions
Fourier-Walsh Transform

S (x)   xi
Consider all characters
iS

Given any function f : P n 
let the Fourier-Walsh coefficients of f be
f S

E f  x   S  x 
f  S
x
thus f can be described as
f   f SS
S
Norms
Def: Expectation norm on the function
q
q
f q    f(x) 

xP[n] 
Def: Summation norm on the transform
f
Thm [Parseval]:
q
 f S 
q
q
Sn
f  f2
2
Hence, for a Boolean f
2
 f (S) 
S
2
f2 1
Distribution over Characters

We may think of the Transform as
defining a distribution over the
characters.

x
1
x
2
2
 f (S)  1
S
 x x ...x
1 2
n
Characters and Multiplicative


Claim: Characters are all the F is multiplicative
function
multiplicative functions
Proof: f  = f  2 = f  ×  = f  × f  = 1
 

    
 
f  x  × f  x  = f  x  x  = 1  f x   -1,1

Let S={i | f({i})=-1 } we prove (f = s)


sx
f  x  = f   i  =  xi =  1
 x 1
 i,f i 1
 
 i

Simple Observations
f 1    f(x) 
xP[n]

Def:

For any function f whose range is {-1,0,1}:
q
1
f q  f 1  Pr f(x)  { 1,1} 
xP[n]
Variables` Influence

Recall: influence of an index i [n] on a
Boolean function f:{1,-1}n {1,-1} is
Influencei (f)


 

Which can be expressed in terms of the
Fourier coefficients of f
Claim:


Pr f  x   f x 
i 
xPn
Influencei  f 
And the as:
2
 f S
S,iS
2
as f =  f
S
S  S
Fourier Representation of influence
Proof: consider the influence function
fi  x 
fx  f x  i

2
which in Fourier representation is
1
1
fi  x    f(S)  S  x    f(S)  S  x   S i 
2 S
2 S

 f(S) 
and
iS
S
x
2
influencei  f   fi  x  2   f (S)
2
iS
Restriction and Average
Def: Let I[n], xP([n]\I),
the restriction function is
fI  x  : P I   1,1
y
fI  x   y   f  x  y 
I
[n]
x
xP[ [n]\I ]
-1 1 -1 -1 1 1 -1 1 -1 1 -1 1 -1 1 -1 1 1
I
1 -1 1
Average function
Def: the average function is
AI f : P I  
y
AI f  x   E f  x  y 
yP I 
xP[ [n]\I ]
-1 1 -1 -1 1 1 -1 1 -1 1 -1 1 -1 1 -1 1 1
I
Note: AI f  x   yEP I fI x  y 
 
y y
y
y
I
[n]
x
1 -1 1
In Fourier Expansion



Prop:


fI x      f T  T  x   S
SI T I S

FI[x] is a functions only of the variables of I
(since xP[ [n]\I ] is fixed).
Representing it as a polynomial hence involves
coefficient only to S  I , f  S  , each of
which is the sum of all coefficient of
characters whose intersection with I is S
where the value is calculated according to the
restriction x
In Fourier Expansion






Recall: fI  x     f  T  T  x  S


SI T I S

Since the expectation of a function is the
coefficient of its empty character:
Cor 1:
Cor 2:
AI f 

SI 
P[{i}] = { ,{i} }
A{i}[x] {-1,0,1}
f(S) S
2
Influencei  f  1  Ai f 
2
Parseval + corollary 1 + the sum of squares of
the coefficients of a boolean function equals 1
2
 f S 
S,iS
Expectation and Variance
f     E f(x) 

Recall:

Hence, for any f
x


f

f
x




Var
E

  E f  x  
xPn 
xPn 
2
2
2
f 2  f   

Sn,S 
2
f S
2

Balanced f s.t. as(f)=1 is Dict.

Since f is balanced f     0
and
ˆ2 S S  fˆ2 S  S  as  f   1
f


S
S

So f is homogeneous & linear

For any i s.t.
f =  f 
i  χi
If s s.t |s|>1
and f  s   0
then as(f)>1
i
f  {i}   0
f  x   f  x  i  2f  {i}   2,2
 f  {i}   1,1  f  xi or f  xi
Only i has
changed