算法和计算复杂度 7 Bounded Depth Boolean Circuits
What if Boolean circuits has bounded depth?
Depth of Boolean circuit: the length of a longest path from an input gate to an output gate.
It’s a model of parallel computation where depth corresponds to parallel time.
Parallel model of random access machine PRAM 痛苦的计算几何课的回忆
📖Definition of . Let and . is the class of languages computed by families of Boolean circuits of size and depth .
📖Definition of . For , define , and further define .
These circuit classes is restrict to polynomial size and poly-logarithmic depth.
By definition, , hence .
为什么呢?回顾定义 ,发现它的多了一个深度的限制。
In fact is expected to hold. This means not all languages in can benefit greatly from parallelism.
General Boolean Circuits
Consider Boolean circuits that allows arbitrary fanin gate and more general functions than .
General definition of Boolean circuit. A Boolean circuit with inputs and outputs consists of the following:
- An underlying directed acyclic graph (multiple arcs is allowed)
- A labeling of the nodes of .
- A linear ordering on the arcs of .
- A choice of output gates
The size of is the number of wires. The labelling function should satisfy the following for all gates :
- If the fanin of is , then .
- If the fanin of is , then where is an -ary Boolean function.
compute a Boolean function in a natural way.
Boolean functions with k-ary
AND(z_1,\cdots,z_k)=z_1\and\cdots\and z_k\\ OR(z_1,\cdots,z_k)=z_1\or\cdots\or z_k\\ MOD_m(z_1,\cdots,z_k)=\begin{cases} 1\ if\ \sum_{i=1}^kz_i\not\equiv0\mod m\\ 0\ if\ \sum_{i=1}^kz_i\equiv0\mod m \end{cases}
is the same as the xor-sum.
The major voting function :
Let be weights and be a threshold. Then is defined:
When all weights is ,
Several Circuit Classes
📖Definition of . For , is the class of languages computed by families of Boolean circuits of polynomial size and depth using unbounded fanin and gates.
is similar to .
🤔Proposition 5. Hierarchy relation between and . for all .
is obtained by definition.
For : and gates of fanin can be replaced by a binary tree of depth of corresponding fanin gates. Thus the depth increases by a factor .
📖Definition of . Let . is the class of languages computed by families of Boolean circuits of polynomial size and depth using unbounded fanin gates. Define .
📖Definition of . is the class of languages computed by families of Boolean circuits of polynomial size and depth using unbounded fanin gates only.
语言类 可以被看做神经网络。
Logarithmic Space and Logarithmic Depth Circuits
log-space can be roughly the same as log-depth circuits.
🎯Theorem 38. .
Circuit with depth is computable by a space Turing Machine.
📖Definition of Boolean product of matrices. . The Boolean product is the Boolean matrix s.t.
c_{ij}=\bigvee_{k=1}^ra_{ik}\and a_{kj}.
A Boolean matrix corresponds to a directed graph. The transitive closure of the graph gives rise to the transitive closure of the matrix.
回想起大二学的离散数学了吗?邻接矩阵的闭包与可达性。
📖Definition of transitive closure. Transitive closure of is the Boolean matrix given by , where is the identity matrix .
🎯Theorem 39.
懒得看证明了,到学的时候再来
🤔Corollary 6. .
其实这里也存在层次结构:.
Functions and Reductions
Boolean circuit is fixed number of inputs, we consider output is also a bounded function of the length of input.
📖Definition of length-respecting. A function is length-respecting if for all , we have .
📖Definition of Turing reduction. Let and be length-respecting Boolean functions. We say reduces to by an Turing reduction if is computed by a family of Boolean functions of polynomial size and depth using unbounded fanin and gates as well as gates computing any coordinate function of .
什么玩意啊,绕来绕去的
If reduces to by an Turing reduction, it is denoted by .
Easy to see that Turing reductions satisfy transitivity.
🤔Lemma 8. If and , then .
Addition and Multiplication
: given -bit numbers and , output -bit number s.t. .
: given -bit numbers and , output -bit number s.t. .
🎯Theorem 40. .
!!!
A generalization of : iterated addition of numbers each of bits.
: given numbers of bits each, output -bit number s.t. .
🎯Theorem 41. .
We can to reduce the task to the task of add numbers each of bits. These may be added in depth by converting for to a circuit.
🤔Corollary 7. .
Note that by computing the sum of the input bits and comparing to the threshold value.
🤔Proposition 6. .
Given -bit numbers and , we form the numbers , each of bits by letting for . Then the product is simply the sum of the numbers .
: given -bit number , output -bit number , the sum of each bit.
Clearly .
🤔Proposition 7.
看不懂这个特例,但是图灵归约一般不是对称的
🤔Proposition 8. Let be a symmetric Boolean function. Then .
🤔Corollary 8. .
🤔Proposition 9. .
😭这些证明都不想看
🎯Theorem 42. is complete for under reductions.
Linear Threshold Functions
Using integers of bit-size as weights is sufficient to realize any linear threshold function.
🤔Lemma 9. Let be a linear threshold function on bits. Then there exists integers and of magnitude at most s.t. .
证明跳过。
It’s possible to improve the upper bound to .
🤔Corollary 9. Let be a linear threshold function. Then .
读下来感觉好崩溃💀
很难想象考试的时候是有多么悲惨。这么多定义都记不住,更何况这么多定理😭