0% found this document useful (0 votes)
130 views4 pages

Shannon Counting Argument

This document summarizes two lectures on combinatorics and graph theory: 1. It presents the proof of the Kővári-Sós-Turán upper bound theorem, which uses Jensen's inequality to bound the number of stars in a graph. 2. It introduces Shannon's counting argument, which provides an easy upper bound of n2n + n gates needed to represent any boolean function of n variables, and a lower bound of Ω(2n/n) gates needed for almost all such functions.

Uploaded by

joseoliv0
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
130 views4 pages

Shannon Counting Argument

This document summarizes two lectures on combinatorics and graph theory: 1. It presents the proof of the Kővári-Sós-Turán upper bound theorem, which uses Jensen's inequality to bound the number of stars in a graph. 2. It introduces Shannon's counting argument, which provides an easy upper bound of n2n + n gates needed to represent any boolean function of n variables, and a lower bound of Ω(2n/n) gates needed for almost all such functions.

Uploaded by

joseoliv0
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

CS 388C: COMBINATORICS AND GRAPH THEORY

Lecture 3
Scribes: Shilpi Goel, Joyce Whang
January 24, 2012

1 The Kővári-Sós-Turán Upper Bound


Proof. . . . Continued from Lecture 2 . . .
X d(x)  
n
≤ (s − 1)
t t
x∈V1

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 :

f (λa + (1 − λ)b) ≤ λf (a) + (1 − λ)f (b)


for any
0 ≤ λ ≤ 1.
If we plot the graph of a convex function f (x) and draw a line connecting any two points (a, f (a))
and (b, f (b)) of the curve of the function, then all the points for values between a and b lie be-
low that line. Another way to know whether f (x) is convex is if its second derivative is non-negative.

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

Back to the inequality in consideration:

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

Now, we can replace  


d(x)
t
with f (d(x)). The number of t-stars in the graph are:

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

The original inequality becomes:


 
n
nf (y) ≤ (s − 1)
t
   
y n
⇒n ≤ (s − 1)
t t

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!

we can state that


(n − t + 1)t nt
 
n
≤ ≤
t! 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)

which is our original conjecture, i.e.


1
ks,t (n) ≤ cs,t n2− min{s,t}

2 Shannon’s Counting Argument


Boolean circuits are directed acyclic graphs. A boolean function of n variables is a mapping from a binary string
of length n to 0 or 1. Shannon’s counting argument gives an estimate of the number of gates needed to represent a
boolean function.

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.

The sum of the three gives an upper bound n2n + n.


n
Theorem 2 (Shannon,’49). [A Lower bound] Almost all boolean functions of n variables require ≥ Ω( 2n ) gates to
compute with a fan-in ≤ 2 and gates (∧, ∨, ¬).
Proof. First, instead of almost all boolean functions, we will prove the statement for at least one boolean function.

1. Count the number of all possible boolean functions of n variables.


For n variables, there are 2n possible input values. Each value may be assigned the truth value 0 or 1 by a
n
function. Hence, there are 22 possible ways to fill the truth table for n variables. The number of possible
n
boolean functions for n variables are 22 .
2. Count the number of different boolean circuits (fan-in ≤ 2 and operators (∧, ∨, ¬)) with n input variables
and m gates.
We will do a rough overestimation of the number of boolean circuits here but still, this number will be less
than all the possible boolean functions of n variables.

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.

You might also like