Circuits




CS254

Chris Pollett

Apr 17, 2017

Outline

Boolean Circuits

Boolean Circuits Formal Definition

Definition. A Boolean circuit is a directed, acyclic, labeled graph `(V, E, s)`, where `s:V ->{mbox(set of labels)}`. We assume the vertices are numbered `1, ...,n`. All vertices in the graph have indegree `0`, `1`, or `2`. Those of indegree `0` are called inputs and are labeled with variables or true or false. Those of indegree 1 are must be labeled with `neg` and those of indegree 2 can be labelled with `vv` or `^^`. We require the inputs `j`, `k` to any gate `i` be such that `j < i`, `k < i`. Gate `n` is called the output and has outdegree `0`.

Quiz

Which of the following statements is true?

  1. AP is contained in NP.
  2. It is possible that `Sigma_i^p = Pi_i^p` but for `j geq i` that `Sigma_j^p != Pi_j^p`.
  3. `TISP(n^(12), n^(2)) subseteq Sigma_2TIME(n^8)`

Polynomial Size Circuits

Example

Consider `L = {1^n| n in NN }`.

This language is recognized by the circuit family `F= {C_n}` where `C_n = ^^_{i=1}^n x_i`.

P is in P/Poly

Theorem. All languages in P have polynomial size circuits.

Proof. Let `L in P` be decided by `M` in `n^k` time. WLOG, we can assume `M` uses only one tape. We construct circuits `C_n` such that for `x` such that `|x| = n`, `C_n(x) = 1 iff x in L`. The inputs to this circuit will be `n` variables `x_1, ..., x_n` representing the bits of `x`. We imagine we encode configurations of a TMs as binary strings representing `(`squares seen so far to left of head, state, squares seen so far to right of tape head (or input squares not seen)`)`. The circuit computes from the input string a start configuration of `M`. It then consists of `n^k`-layers, where the `i+1`st layer computes the configuration one would be in given the `i`th layer's configuration. Finally, we take the last layer and have a circuit which computes from it the output of the TM. The total size of this will be `O(n^(2k))`.

Corollary. CVP is `P`-complete under logspace reductions.

Proof. Suppose `L in P`. To reduce `x in L`? to `CVP` we compute the circuit of the last theorem, then we hard code the input bits to be `x` and ask the result to CVP. one can verify this can be computed in logspace.

P/Poly contains Non-recursive Languages

Uniformity

Definition. We call a circuit family `(C_0, C_1, ... )` logspace-uniform if there is a `(log n)`-space machine `N` which on input `1^n` outputs `C_n`. We say that a language `L` has logspace-uniform polynomial circuits if there is a uniform family of p-size circuits that decides `L`.

Theorem. A language `L` has logspace-uniform polynomial circuits iff `L` is in `P`.

Proof. One direction follows from the theorem of two slides back, completeness of CVP was logspace computable. For the other direction suppose that `L` has logspace-uniform polynomial circuits. In p-time we can decide `x in L` by first running the logspace machine to get `C_(|x|)` then doing circuit evaluation on `x` in p-time.

Advice Classes

Karp-Lipton

Theorem (K-L 80). If `NP subseteq P``/poly`, then `PH = Sigma_2^p`.

Proof. If suffices to show that `Pi_2^p = Sigma_2^p`. In particular, to show that `Pi_2`-SAT is contained in `Sigma_2^p`. Let
`forall u in {0,1}^n exists v in {0,1}^n phi(u,v)=1`
be an instance of `Pi_2`-SAT. Here `phi` is a Boolean formula.

If `NP subseteq P``/poly`, then there exists a circuit family `{C_n}` of size some polynomial `p` such that for every boolean formula `phi` and `u in {0,1}^n`, `C_n(\phi, u) = 1` iff there exists a `v in {0,1}^n` such that `phi(u,v) = 1`. As stated this circuits solves the SAT decision problem for `phi`. As we showed on Mar 1, we can take such a family of `C_n`'s and modify them so that they actually output the witness `v`. Call this new family of circuits `{B_n}`. The size of `{B_n}` will also be bounded by some polynomial `q` and encoding of such a circuit as a string can be bounded by `10q(n)^2`. Our `Sigma_2^p` essentially guesses such a circuit and verifies that it works. i.e., it checks the following formula: `exists w in {0,1}^(10q^2)forall u in {0, 1}^n mbox(s.t. w describes a circuit B and ) phi(u,B(phi, u)) = 1.`