

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A lecture note from cs221: computational complexity course by prof. Salil vadhan. The lecture focuses on circuit complexity, which measures the number of gates in the smallest boolean circuit that computes a given function. The relation of circuit complexity to other complexity measures, the motivation behind studying circuit complexity, and the theorem stating that every problem in p has polynomial-sized circuits. It also introduces the concept of advice strings and the class c/a(n), and the theorem that the class of languages with poly-sized circuits equals p/poly.
Typology: Study notes
1 / 3
This page cannot be seen from the preview
Don't miss anything!


CS221: Computational Complexity Prof. Salil Vadhan
11/6 Scribe: Chris Crick
Definition: The circuit complexity or circuit size of a function f : { 0 , 1 }n^ → { 0 , 1 } is the number of gates in the smallest boolean circuit that computes f.
Circuit complexity depends our choice of a universal basis, but only up to a constant. We can therefore use any such basis to represent our circuit. Because it’s familiar and convenient, then, we will usually use AND, OR and NOT, though sometimes the set of all boolean functions of two inputs and one output is more natural.
Example: To provide a sense for how one programs with circuits, we will examine the thresh-
old function Th 2 (x 1 , · · · , xn) = { 1 if at least two xis are 1 0 otherwise }. Figure 1 shows a simple circuit to
compute this function.
In this circuit, li = 1 if at least one of (x 1 ,... , xi) = 1. ri becomes 1 once two xis equal 1. li is just xi ∨ li− 1 , and ri is ri− 1 ∨ (li− 1 ∧ xi). The output node is rn.
Conventions for counting circuit gates vary a little – for example, some people count the inputs in the total, while others don’t. Since we’re interested in asymptotic complexity in terms of n, this doesn’t really matter. This is a circuit of size ≈ 4 n for Th 2. What can we say about lower bounds on this function’s complexity?
Definition A function f : { 0 , 1 }∗^ → { 0 , 1 } has circuit complexity s(n) if ∀n, f on { 0 , 1 }n^ is computable with a circuit of size s(n).
It is natural now to aske the question, “What functions have polynomial-sized circuits?”
Theorem: Every problem in P has poly-sized circuits.
Proof: This is obvious by the Cook-Levin construction.
xn
x
x 2
x 1
l n
l 3
l 2
l 1
r n
r 3
r 2
r 1
0
Figure 1: Threshold function Th 2
But is the converse true? It turns out that it is not. There are uncountably many functions with poly-size circuits, because we can construct a new circuit for each |n|. More , we can build a very simple polynomial circuit for the language L = { 1 n^ : if the nth Turing Machine halts on ≤ (the empty string)}. So not only are certain poly-sized circuits not in P, they can be used to represent undecidable prob- lems!
Definition: Let C be a complexity class, and let a be a proper function from N → N. Let L ∈ C/a(n) if ∃L′^ ∈ C, and a sequence of “advice” strings α 1 , α 2 ,... ∈ { 0 , 1 }∗^ where |αn| = a(n) such that x ∈ L ⇔ (x, α|x|) ∈ L′.
This means that C/a(n) is like the complexity class C with advice of length a(n). Advice strings depend on the length of x, but we say nothing about the complexity of α – it’s extra, “magical” information used in the computation. Equivalently, C/a(n) can be thought of as like C, but with a growing program size of length a(n).
Theorem: The class of languages with poly-sized circuits = P/poly, where P/poly means
c P/n c.
Proof: Poly-sized circuits ⊆ P/poly: Take αi to be a description of a circuit of size nc^ for length n. L′^ = {(x, α) : α(x) = 1}, interpreting α as a circuit. P/poly ⊆ poly-sized circuits: Say L ∈ P/poly. We have L′^ ∈ P (with the computation decided by M ). If this computation makes use of advice strings α 1 , α 2 ,.. ., then by the Cook-Levin construction, for every n we can build a poly-sized circuit Cn such that Cn(x, α) = 1 ⇔ M (x, α) = 1. Here the fact that we are allowed to construct different circuits for each size n comes in handy – we can hardwire α = αn into Cn.
This ability to grow with the size of n is very different from our notions of “uniform” Turing ma- chine complexity, which stipulates a fixed program for inputs of every length. Intuitively, then, nonuniform constructions like circuit complexity may yield insight into why certain problems seem hard. Are natural problems (like the NP-complete ones) hard because of the Turing machine’s uni- formity, or are the reasons located somewhere else? This is one reason to study circuit complexity. There are others.
For instance, studying circuits has practical implications, because they are much closer to real