Lecture 5. Formula complexity I

advertisement
Lecture 5. Formula complexity I
A Boolean function can be computed by different models, and an important one is the class of
formulas. Roughly speaking, formulas are circuits with fanout 1. To be more specific, a formula is a
rooted tree s.t.

each internal node is associated with a gate which is either AND or OR,

each leaf is associated with a variable xi, the negation of a variable ð‘ĨĖ…𝑖 , or a constant 0 or 1.
(Note that we have used DeMorgan rule to push all negations to the leaf level.) The formula computes
a function f on input x by evaluating the gates in a bottom-up manner, and the root outputs f(x).
Different measures of formula are studied, among which depth, size (number of gates) and leaf size
(number of leaves) are the most important ones. The leaf size L(F) of a formula F is simply the
number of leaves. The leaf size L(f) of a function f is the minimum leaf size L(F) of any formula F
that computes f.
A function 𝑓: {0,1}𝑛 → {0,1} is monotone if 𝑓(ð‘Ĩ) ≤ 𝑓(ð‘Ķ) whenever ð‘Ĩ𝑖 ≤ ð‘Ķi , ∀𝑖 ∈ [𝑛]. In other
words, it requires that changing an input variable from 0 to 1 doesn’t decrease the function value. For
monotone functions, we can require the formula contain only variables and constants in leaves, but no
negation of variables. (Convince yourself.) These are called monotone formulas. So for monotone
functions, we can define the monotone leaf size ðŋ+ (𝑓) as the minimal number of leaves of any
monotone formula that computes f.
While circuit lower bounds are too hard to prove---the best unconditional lower bound is only cn for
some constant c, people stepped back and tried to prove formula lower bounds. In this and the next
lectures, we will learn various methods to prove lower bounds for formula complexity.
1.
(Random) Restriction
The idea of restriction is as follows. We will pick some variables and fix their values to be some
constants, resulting in a “subfunction” f’. The variables are picked and fixed in such a ways that the
complexity of this subfunction is considerably smaller than that of f. But if we keep doing so, we’ll go
to a very small scale function with complexity 0. But this small scale function is still not a constant
function, thus has a positive complexity---contradiction. This idea went all the way back to
Subbotovskaya [Sub61].
Lemma 1.1. For every Boolean function f of n variables, it is possible to fix one variable such that the
resulting subfunction 𝑓′ satisfies
1 3/2
ðŋ(𝑓 ′ ) ≤ (1 − 𝑛)
⋅ ðŋ(𝑓).
Before proving the lemma, let’s get some feelings of the parameters and see why it’s nontrivial.
Suppose F is a minimal formula which computes f, and F has s = L(f) leaves. Since f has n variables,
there exists one variable xi which appears at least s/n times in the leaf level (though some of the
appearances are in the form of ð‘ĨĖ…𝑖 ). If we fix xi to be some constant, then the leaf size will reduce to
s − s/n = (1 − 1/n)s. The lemma says that actually one can reduce the size by more. Now we
prove it.
Proof. Define F and s as in the above discussion. The idea is that if there is a subtree H in F which is
of the form xi ∧ 𝐚 for some subtree G, then setting xi = 0 will kill the whole subtree G. (You can
handle the cases where the gate is OR, or where the occurrence of xi is in negation, in a similar way.)
Therefore, suppose variable i appears t ≥ s/n times, then for each appearance there is an assignment
of xi = 0/1 to kill its “neighbor” subtree G. Then one of the two assignments, xi = 0 and xi = 1, kills
more, at least t/2, subtrees. Use that assignment. The leaf size reduces to at most
t
3
1 3/2
s − t − 2 ≤ (1 − 2n) s ≤ (1 − 𝑛)
s,
as claimed.
The above analysis is almost correct except that it forgets to consider the case in which the subtrees G
intersect. Consider the extreme case that there is a subtree H of the form ð‘Ĩ𝑖 ∧ ð‘Ĩ𝑖 ∧ ð‘Ĩ𝑖 … This looks
weird since clearly some xi’s are redundant. We can indeed make this rigorous by claiming the
following: For any leaf ð‘Ĩ𝑖 or ð‘ĨĖ…𝑖 , its neighbor subtree G doesn’t contain variable i. (Thus the G’s
don’t intersect.)
The claim is not hard to prove. Basically, if we see xi ∧ 𝐚 and G contains xi, then it is observed that
one can simply replace the xi in G by 1 without changing the function. (If xi = 1, then we “guessed
correctly” by replacing xi in G by 1. If xi = 0, then xi ∧ 𝐚 = 0 anyway.) Other cases such as G
contains ð‘ĨĖ…𝑖 , or the gate connecting xi and G is OR, can be handled similarly. This completes the
proof of the lemma.
□
Repeatedly applying the lemma gives the following theorem.
Theorem 1.2. For every Boolean function f of n variables and every k ∈ [n], there is a way to fix
n − k variables such that the resulting subfunction of k variables satisfies
𝑘 3/2
ðŋ(𝑓 ′ ) ≤ (𝑛)
⋅ ðŋ(𝑓).
Proof. Applying the lemma n − k times, we obtain a subfunction of k variables with leaf size at most
1 3/2
ðŋ(𝑓 ′ ) ≤ (1 − 𝑛)
3/2
1
(1 − 𝑛−1)
1
3/2
… (1 − 𝑘+1)
𝑘 3/2
⋅ ðŋ(𝑓) = (𝑛)
⋅ ðŋ(𝑓).
□
In the above theorems, we carefully constructed an assignment to shrink the leaf size. Next we will
show that actually this construction doesn’t need to be so careful---a random one does the job with
good probability.
Theorem 1.3. Let f be a Boolean function of n variables. Pick k variables uniformly at random, and
for the rest n − k variables, assign each of them a random constant c ∈ {0,1}. Then with probability
at least 3/4,
𝑘 3/2
𝑛
ðŋ(𝑓 ′ ) ≤ 4 ( )
⋅ ðŋ(𝑓).
Proof. Let’s choose a variable randomly and assign a random value. (We will choose variables one by
one; note that the process is actually the same as the random assignment in the statement of the
theorem.) Denote by s1 the number of resulting leaves. The proof of the previous theorem actually
shows that the expected number of reduced leaves is at least
3𝑠
2𝑛
. Thus
3𝑠
1 3/2
ðļ[𝑠1 ] ≤ 𝑠 −
≤ (1 − ) 𝑠.
2𝑛
𝑛
Continue the above process for n − k variables, resulting in a subfunction of k variables with the
expected leaf size
1 3/2
ðļ[𝑠𝑛−𝑘 ] ≤ (1 − 𝑛)
1
3/2
(1 − 𝑛−1)
1
3/2
… (1 − 𝑘+1)
The claimed statement now follows from Markov Inequality.
𝑘 3/2
⋅ 𝑠 = (𝑛)
⋅ 𝑠.
□
(The above analysis is a bit informal about the expectation of multiple stages. Can you make it more
formal? Just compute the stage 2, namely E[s2], and you’ll see why it’s correct.)
We can apply the theorem to show a lower bound for the parity function 𝑓(ð‘Ĩ) = ð‘Ĩ1 ⊕ ð‘Ĩ2 ⊕ … ⊕ ð‘Ĩ𝑛 .
Theorem 1.4. For the parity function, ðŋ(𝑓) ≥ 𝑛3/2.
Proof. Fix all but one variable, resulting in the parity function (or its negation) of one variable, which
has leaf size at least 1. So
1 3/2
1 ≤ ðŋ(𝑓 ′ ) ≤ (𝑛)
which implies the claimed lower bound.
2.
ðŋ(𝑓),
□
Rectangle and tiling number
We now introduce another lower bound method for leaf size, due to Khrapchenko [Khr72] and
Rychkov [Ryc85].
A rectangle is a pair (A,B) of disjoint sets ðī, ðĩ ⊆ {0,1}𝑛 . A rectangle (A,B) is monochromatic if
there exists an i ∈ [n], s.t. for all ð‘Ĩ ∈ ðī and ð‘Ķ ∈ ðĩ, it holds that ð‘Ĩ𝑖 ≠ ð‘Ķ𝑖 . A rectangle (A,B) is
1-monochromatic if there exists an i ∈ [n], s.t. for all x ∈ A and y ∈ B, it holds that ð‘Ĩ𝑖 = 1 and
ð‘Ķ𝑖 = 0. A rectangle (A,B) is 0-monochromatic if there exists an i ∈ [n], s.t. for all ð‘Ĩ ∈ ðī and ð‘Ķ ∈ ðĩ,
it holds that ð‘Ĩ𝑖 = 0 and ð‘Ķ𝑖 = 1. Any monochromatic rectangle is either 1- or 0-monochromatic. (See
why?)
The tiling number 𝜒(𝑅) of a rectangle R is the minimum number r s.t. R can be partitioned into r
monochromatic rectangles. Please note that by “partition”, we emphasize that the rectangles are
disjoint (and, of course, their union needs to be the whole set R). The tiling number 𝜒(𝑓) of a
function f is χ(𝑓 −1 (1) × ð‘“ −1 (0)), the tiling number of the rectangle 𝑓 −1 (1) × ð‘“ −1 (0).
Theorem 2.1. For every Boolean function f, ðŋ(𝑓) ≥ 𝜒(𝑓). If f is monotone, then ðŋ+ (𝑓) ≥ 𝜒+ (𝑓).
Proof. We prove the first inequality by induction on L(f), and the second one is similar. The base is
easy to confirm: If ðŋ(𝑓) = 1, then 𝑓(ð‘Ĩ) = ð‘Ĩ𝑖 or 𝑓(ð‘Ĩ) = ð‘ĨĖ…𝑖 . Then the rectangle 𝑓 −1 (1) × ð‘“ −1 (0)
is itself monochromatic by definition.
Now the induction step. Take a formula F with the minimal leaf size. Assume that the root is AND
function; the other case can be handled similarly. So the function 𝑓 = 𝑓0 ∧ 𝑓1, and ðŋ(𝑓) = ðŋ(𝑓0 ) +
ðŋ(𝑓1 ). (Convince yourself that the subtrees are also optimal for the corresponding subfunctions.)
Define
ðĩ0 = 𝑓 −1 (0) ∩ 𝑓0−1 (0), and ðĩ1 = 𝑓 −1 (0) ∩ 𝑓0−1 (1).
First, we observe that
𝑓 −1 (1) ⊆ 𝑓0−1 (1), 𝑓 −1 (1) ⊆ 𝑓1−1 (1), ðĩ0 ⊆ 𝑓0−1 (0), ðĩ1 ⊆ 𝑓1−1 (0), 𝑓 −1 (0) = ðĩ0 ∪ ðĩ1 .
The first two inclusions are because 𝑓(ð‘Ĩ) = 1 imples that 𝑓0 (ð‘Ĩ) = 𝑓1 (ð‘Ĩ) = 1. (Recall that 𝑓 =
𝑓0 ∧ 𝑓1 .) The third one is by definition of B0. The fourth one is because 𝑓(ð‘Ĩ) = 0 and 𝑓0 (ð‘Ĩ) = 1 ⇒
𝑓1 (ð‘Ĩ) = 0. The last one is trivial by definition of B0 and B1. Now
𝜒(𝑓) = 𝜒(𝑓 −1 (1) × ð‘“ −1 (0))
// def. of 𝜒(𝑓)
≤ 𝜒(𝑓 −1 (1) × ðĩ0 ) + 𝜒(𝑓 −1 (1) × ðĩ1 )
// tiling separately
≤ 𝜒 (𝑓0−1 (1) × ð‘“0−1 (0)) + 𝜒(𝑓1−1 (1) × ð‘“1−1 (0)) // the four inclusions above
≤ 𝜒(𝑓0 ) + 𝜒(𝑓1 )
// def. of 𝜒(𝑓𝑖 )
≤ ðŋ(𝑓0 ) + ðŋ(𝑓1 )
// induction hypothesis
□
= ðŋ(𝑓)
Now we need to further lower bound 𝜒(𝑓).
Theorem 2.2. Let ðī = 𝑓 −1 (1), ðĩ = 𝑓 −1 (0), and 𝑆 = {(ð‘Ĩ, ð‘Ķ): ð‘Ĩ ∈ ðī, ð‘Ķ ∈ ðĩ, |ð‘Ĩ ⊕ ð‘Ķ| = 1}. We have
ðŋ(𝑓) ≥
|𝑆|2
|ðī| ⋅ |ðĩ|
where |ð‘Ĩ ⊕ ð‘Ķ| is the Hamming weight of ð‘Ĩ ⊕ ð‘Ķ.
Proof. Suppose we have a decomposition of ðī × ðĩ into r monochromatic rectangles Ri of
dimensions 𝑠𝑖 × ð‘Ąð‘– . Let ci be the number of elements of S in Ri. We claim that each 𝑐𝑖 ≤
𝑚𝑖𝑛{𝑠𝑖 , ð‘Ąð‘– } ≤ √𝑠𝑖 ð‘Ąð‘– . Indeed, suppose that all elements (x,y) in Ri differ at position j: ð‘Ĩ𝑗 ≠ ð‘Ķ𝑗 . Then
each x has at most one y s.t. (ð‘Ĩ, ð‘Ķ) ∈ 𝑆 ∩ 𝑅𝑖 , therefore 𝑐𝑖 ≤ 𝑠𝑖 . Similarly, we can show that 𝑐𝑖 ≤ ð‘Ąð‘– .
Then
𝑟
|𝑆|2
2
= (∑ 𝑐𝑖 ) ≤
𝑖=1
𝑟
𝑟 ∑ 𝑐𝑖2
𝑖=1
Rearranging the terms gives the bound.
𝑟
≤ 𝑟 ∑ 𝑠𝑖 ð‘Ąð‘– = 𝑟|ðī × ðĩ| = 𝑟|ðī| ⋅ |ðĩ|,
𝑖=1
□
We can use this to show a quadratic lower bound for parity function, improving the bound given in
the last section.
Theorem 2.3. Let f be the parity function of n variables. Then ðŋ(𝑓) ≥ 𝑛2 .
Proof. Clearly, |A| = |B| = 2n−1 , and |S| = n2n−1 . So ðŋ(𝑓) ≥ 𝑛2 .
□
One may wonder whether this lower bound can be further improved. The answer is no: actually there
is a formula to compute parity function with O(n2 ) leaves. Can you find one?
(hint: Consider the two-variable version, ð‘Ĩ1 ⊕ ð‘Ĩ2 , first.)
References
[Sub61] B. A. Subbotovskaya, Realizations of linear functions by formulas using +, ., -, Soviet
Math. Dokl. 2, 110–112, 1961.
[Khr72] V.M. Khrapchenko, A method of obtaining lower bounds for the complexity of
𝛑-schemes, Math. Notes Acad. of Sci. USSR 10, 474–479, 1972.
[Ryc85] K. L. Rychkov, A modification of Khrapchenko’s method and its application to lower
bounds for -schemes of code functions, in Metody Diskretnogo Analiza, 42 (Novosibirsk), 91–98,
1985.
Download