Shannon Counting Argument
Shannon Counting Argument
Lecture 3
Scribes: Shilpi Goel, Joyce Whang
January 24, 2012
d(x)
Note that the left term corresponds to the number of t-stars in the graph, if we replace t by zero, when
d(x) < t.
A detour: The following box provides a review of convex functions and Jensen’s inequality, that we use in the
rest of the proof.
Convex Function:
A real-valued function f (x) is convex if for any two vaues a and b in the domain of f :
Jensen’s Inequality:
If f is a convex function and
n
X
0 ≤ λi ≤ 1, λi = 1,
i=0
then:
n
X n
X
f( λi Xi ) ≤ λi f (Xi ).
i=1 i=1
1
X d(x)
n
≤ (s − 1)
t t
x∈V1
We can transform the above inequality further using Jensen’s Inequality. However, to use Jensen’s Inequality,
we require that
d(x)
t
be convex. Since d(x) need not be necessarily greater than t for all values of x ∈ V1 , we need to define a convex
function which we can use in place of the binomial coefficient in the above inequality. Hence, we define a function
f (u) such that: u
t if u ≥ t
f (u) =
0 if u < t
X
# t-stars = f (d(x))
x∈V1
We apply Jensen’s Inequality here and assign λx = 1/n for every x. We note that these coefficients sum to 1.
X 1
# t-stars = n f (d(x))
n
x∈V1
X d(x)
≥ nf ( )
n
x∈V1
Summing the degrees of x over every x gives us the number of 1s in the matrix (or the number of edges in the
bipartite graph).
X d(x) z
nf ( ) = nf ( ) = nf (y), since z = ny
n n
x∈V1
Note that we can assume y ≥ t, since otherwise, the statement of the theorem trivially holds. Now, since
n n(n − 1) . . . (n − t + 1)
=
t t!
2
So the inequality becomes:
y n
n ≤ (s − 1)
t t
⇒ n(y − (t − 1))t ≤ (s − 1)nt
1 1
⇒ n t (y − (t − 1)) ≤ (s − 1) t n
1 1
⇒ y − (t − 1)) ≤ (s − 1) t n1− t
Since z = ny:
1 1
z ≤ (s − 1) t n2− t + n(t − 1)
Theorem 1 (An Easy Upper Bound). Any boolean function of n variables can be implemented with ≤ n2n + n
gates, using a fan-in ≤ 2 and operators (∧, ∨, ¬).
Proof. Given a boolean function in DNF, the upper bound of the number of gates needed to implement it can be
derived by taking the sum of the upper bounds of:
• The number of conjunctions in the DNF: There are at most (n-1) conjunctions in every term, and an optimal
DNF does not need more than 2n terms. Thus, there are at most (n-1)2n number of conjunctions (i.e. ∧).
• The number of disjunctions: There are at most 2n terms, and hence, (2n -1) disjunctions (i.e. ∨) in the DNF.
• The number of possible negations of the inputs: There are n inputs and hence, n ¬ gates corresponding to
their negations.
3
We assign labels to the elements in a circuit — we assume that any gate can be given any label and we specify
the incoming edges for each gate.
For a given circuit with m gates, there are at most ≤ (n + 5) possible labels. For a given gate, there are ≤ m2
possible pairs of incoming edges (from the outputs of other gates). Hence, the number of different boolean
circuits for m gates and n variables are:
m
≤ ((n + 5) × m2 )
= 2m×(2 log m+log (n+5))
2n n
If we substitute m = 10n , then the expression will be less than 22 .
NOTE:
• There are many circuits for a single expression but just one expression for a circuit. As long as m is small
enough, the number of circuits will be less than the number of functions. Thus, there will be functions of n
variables which circuits with m gates will not be able to compute.
• The statement of the theorem mentioned the words “almost all” whereas we proved this property for at least
one circuit. “Almost all” in the theorem statement means that as n tends to infinity, the probability that a
n
random function requires circuits of size AT LEAST Ω( 2n ) tends to 1. Thus, the probability of a random
n
function having circuits of size o( 2n ) tends to 0 (or as n tends to infinity, the fraction of n-ary functions with
n
circuit complexity less than Ω( 2n ) tends to zero).
This proof of the theorem by Shannon can be viewed as a special case of the Probabilistic method: we picked
a random function and found the probability of having a circuit of a small size that computes that function. If we
pick objects from a uniform distribution, then the probability that objects satisfy a certain property is:
Number of objects that satisfy the property
Pr(objects satisfy a certain property) =
Total number of objects
In this proof by Shannon:
Number of circuits of size ≤ m
Pr(f has a circuit of size ≤ m) =
Total number of functions
As long as this probability is < 1, then there exist functions that do not satisfy this property.