Circuits Lecture 11 Uniform Circuit Complexity 1 Recall 2 - - PowerPoint PPT Presentation

circuits
SMART_READER_LITE
LIVE PREVIEW

Circuits Lecture 11 Uniform Circuit Complexity 1 Recall 2 - - PowerPoint PPT Presentation

Circuits Lecture 11 Uniform Circuit Complexity 1 Recall 2 Recall Non-uniform complexity 2 Recall Non-uniform complexity P/1 Decidable 2 Recall Non-uniform complexity P/1 Decidable NP P/log NP = P 2 Recall Non-uniform


slide-1
SLIDE 1

Circuits

Lecture 11 Uniform Circuit Complexity

1

slide-2
SLIDE 2

Recall

2

slide-3
SLIDE 3

Recall

Non-uniform complexity

2

slide-4
SLIDE 4

Recall

Non-uniform complexity P/1 ⊈ Decidable

2

slide-5
SLIDE 5

Recall

Non-uniform complexity P/1 ⊈ Decidable NP ⊆ P/log ⇒ NP = P

2

slide-6
SLIDE 6

Recall

Non-uniform complexity P/1 ⊈ Decidable NP ⊆ P/log ⇒ NP = P NP ⊆ P/poly ⇒ PH = Σ2P

2

slide-7
SLIDE 7

Recall

Non-uniform complexity P/1 ⊈ Decidable NP ⊆ P/log ⇒ NP = P NP ⊆ P/poly ⇒ PH = Σ2P Circuit Complexity

2

slide-8
SLIDE 8

Recall

Non-uniform complexity P/1 ⊈ Decidable NP ⊆ P/log ⇒ NP = P NP ⊆ P/poly ⇒ PH = Σ2P Circuit Complexity SIZE(poly) = P/poly

2

slide-9
SLIDE 9

Recall

Non-uniform complexity P/1 ⊈ Decidable NP ⊆ P/log ⇒ NP = P NP ⊆ P/poly ⇒ PH = Σ2P Circuit Complexity SIZE(poly) = P/poly SIZE-hierarchy

2

slide-10
SLIDE 10

Recall

Non-uniform complexity P/1 ⊈ Decidable NP ⊆ P/log ⇒ NP = P NP ⊆ P/poly ⇒ PH = Σ2P Circuit Complexity SIZE(poly) = P/poly SIZE-hierarchy SIZE(T’) ⊊ SIZE(T) if T=Ω(t2t) and T’=O(2t/t)

2

slide-11
SLIDE 11

Recall

Non-uniform complexity P/1 ⊈ Decidable NP ⊆ P/log ⇒ NP = P NP ⊆ P/poly ⇒ PH = Σ2P Circuit Complexity SIZE(poly) = P/poly SIZE-hierarchy SIZE(T’) ⊊ SIZE(T) if T=Ω(t2t) and T’=O(2t/t) Most functions on t bits (that ignore last n-t bits) are in SIZE(T) but not in SIZE(T’)

2

slide-12
SLIDE 12

Uniform Circuits

3

slide-13
SLIDE 13

Uniform Circuits

Uniform circuit family: constructed by a TM

3

slide-14
SLIDE 14

Uniform Circuits

Uniform circuit family: constructed by a TM Undecidable languages are undecidable for these circuits families

3

slide-15
SLIDE 15

Uniform Circuits

Uniform circuit family: constructed by a TM Undecidable languages are undecidable for these circuits families Can relate their complexity classes to classes defined using TMs

3

slide-16
SLIDE 16

Uniform Circuits

Uniform circuit family: constructed by a TM Undecidable languages are undecidable for these circuits families Can relate their complexity classes to classes defined using TMs Logspace-uniform:

3

slide-17
SLIDE 17

Uniform Circuits

Uniform circuit family: constructed by a TM Undecidable languages are undecidable for these circuits families Can relate their complexity classes to classes defined using TMs Logspace-uniform: An O(log n) space TM can compute the circuit

3

slide-18
SLIDE 18

NCi and ACi

4

slide-19
SLIDE 19

NCi and ACi

NCi: class of languages decided by bounded fan-in logspace-uniform circuits of polynomial size and depth O(logi n)

4

slide-20
SLIDE 20

NCi and ACi

NCi: class of languages decided by bounded fan-in logspace-uniform circuits of polynomial size and depth O(logi n) ACi: Similar, but unbounded fan-in circuits

4

slide-21
SLIDE 21

NCi and ACi

NCi: class of languages decided by bounded fan-in logspace-uniform circuits of polynomial size and depth O(logi n) ACi: Similar, but unbounded fan-in circuits NC0 and AC0: constant depth circuits

4

slide-22
SLIDE 22

NCi and ACi

NCi: class of languages decided by bounded fan-in logspace-uniform circuits of polynomial size and depth O(logi n) ACi: Similar, but unbounded fan-in circuits NC0 and AC0: constant depth circuits NC0 output depends on only a constant number of input bits

4

slide-23
SLIDE 23

NCi and ACi

NCi: class of languages decided by bounded fan-in logspace-uniform circuits of polynomial size and depth O(logi n) ACi: Similar, but unbounded fan-in circuits NC0 and AC0: constant depth circuits NC0 output depends on only a constant number of input bits NC0 ⊊ AC0: Consider L = {1,11,111,...}

4

slide-24
SLIDE 24

NC and AC

5

slide-25
SLIDE 25

NC and AC

NC = ∪i>0 NCi. Similarly AC.

5

slide-26
SLIDE 26

NC and AC

NC = ∪i>0 NCi. Similarly AC. NCi ⊆ ACi ⊆ NCi+1

5

slide-27
SLIDE 27

NC and AC

NC = ∪i>0 NCi. Similarly AC. NCi ⊆ ACi ⊆ NCi+1 Clearly NCi ⊆ ACi

5

slide-28
SLIDE 28

NC and AC

NC = ∪i>0 NCi. Similarly AC. NCi ⊆ ACi ⊆ NCi+1 Clearly NCi ⊆ ACi ACi ⊆ NCi+1 because polynomial fan-in can be reduced to constant fan-in by using a log depth tree

5

slide-29
SLIDE 29

NC and AC

NC = ∪i>0 NCi. Similarly AC. NCi ⊆ ACi ⊆ NCi+1 Clearly NCi ⊆ ACi ACi ⊆ NCi+1 because polynomial fan-in can be reduced to constant fan-in by using a log depth tree So NC = AC

5

slide-30
SLIDE 30

NC ⊆ P

6

slide-31
SLIDE 31

NC ⊆ P

Generate circuit of the right input size and evaluate on input

6

slide-32
SLIDE 32

NC ⊆ P

Generate circuit of the right input size and evaluate on input Generating the circuit

6

slide-33
SLIDE 33

NC ⊆ P

Generate circuit of the right input size and evaluate on input Generating the circuit in logspace, so poly time; also circuit size is poly

6

slide-34
SLIDE 34

NC ⊆ P

Generate circuit of the right input size and evaluate on input Generating the circuit in logspace, so poly time; also circuit size is poly Evaluating the gates

6

slide-35
SLIDE 35

NC ⊆ P

Generate circuit of the right input size and evaluate on input Generating the circuit in logspace, so poly time; also circuit size is poly Evaluating the gates Poly(n) gates

6

slide-36
SLIDE 36

NC ⊆ P

Generate circuit of the right input size and evaluate on input Generating the circuit in logspace, so poly time; also circuit size is poly Evaluating the gates Poly(n) gates Per gate takes O(1) time + time to look up output values of (already evaluated) gates

6

slide-37
SLIDE 37

NC ⊆ P

Generate circuit of the right input size and evaluate on input Generating the circuit in logspace, so poly time; also circuit size is poly Evaluating the gates Poly(n) gates Per gate takes O(1) time + time to look up output values of (already evaluated) gates Open problem: Is NC = P?

6

slide-38
SLIDE 38

Motivation for NC

7

slide-39
SLIDE 39

Motivation for NC

Fast parallel computation is (loosely) modeled as having poly many processors and taking poly-log time

7

slide-40
SLIDE 40

Motivation for NC

Fast parallel computation is (loosely) modeled as having poly many processors and taking poly-log time Corresponds to NC (How?)

7

slide-41
SLIDE 41

Motivation for NC

Fast parallel computation is (loosely) modeled as having poly many processors and taking poly-log time Corresponds to NC (How?) Depth translates to time

7

slide-42
SLIDE 42

Motivation for NC

Fast parallel computation is (loosely) modeled as having poly many processors and taking poly-log time Corresponds to NC (How?) Depth translates to time Total “work” is size of the circuit

7

slide-43
SLIDE 43

An example

8

slide-44
SLIDE 44

An example

PARITY in NC1

8

slide-45
SLIDE 45

An example

PARITY in NC1 PARITY = { x | x has odd number of 1s }

8

slide-46
SLIDE 46

An example

PARITY in NC1 PARITY = { x | x has odd number of 1s } Circuit should evaluate x1⊕x2⊕...⊕xn

8

slide-47
SLIDE 47

An example

PARITY in NC1 PARITY = { x | x has odd number of 1s } Circuit should evaluate x1⊕x2⊕...⊕xn Tree of n-1 XOR gates: log n deep

8

slide-48
SLIDE 48

An example

PARITY in NC1 PARITY = { x | x has odd number of 1s } Circuit should evaluate x1⊕x2⊕...⊕xn Tree of n-1 XOR gates: log n deep Each XOR gate implemented in depth 3

8

slide-49
SLIDE 49

An example

PARITY in NC1 PARITY = { x | x has odd number of 1s } Circuit should evaluate x1⊕x2⊕...⊕xn Tree of n-1 XOR gates: log n deep Each XOR gate implemented in depth 3

8

slide-50
SLIDE 50

Another example

9

slide-51
SLIDE 51

Another example

PATH ∈ AC1

9

slide-52
SLIDE 52

Another example

PATH ∈ AC1 “Boolean” Matrix Multiplication

9

slide-53
SLIDE 53

Another example

PATH ∈ AC1 “Boolean” Matrix Multiplication Z=XY: zij = ∨k=1..n (xik∧ykj)

9

slide-54
SLIDE 54

Another example

PATH ∈ AC1 “Boolean” Matrix Multiplication Z=XY: zij = ∨k=1..n (xik∧ykj) AC0 circuit (OR gate with fan-in n, AND gates)

9

slide-55
SLIDE 55

Another example

PATH ∈ AC1 “Boolean” Matrix Multiplication Z=XY: zij = ∨k=1..n (xik∧ykj) AC0 circuit (OR gate with fan-in n, AND gates) If X adjacency matrix (with self-loops), Xtij=1 iff path from i to j of length t or less

9

slide-56
SLIDE 56

Another example

PATH ∈ AC1 “Boolean” Matrix Multiplication Z=XY: zij = ∨k=1..n (xik∧ykj) AC0 circuit (OR gate with fan-in n, AND gates) If X adjacency matrix (with self-loops), Xtij=1 iff path from i to j of length t or less Xmij for m ≥ n is the transitive closure

9

slide-57
SLIDE 57

Another example

PATH ∈ AC1 “Boolean” Matrix Multiplication Z=XY: zij = ∨k=1..n (xik∧ykj) AC0 circuit (OR gate with fan-in n, AND gates) If X adjacency matrix (with self-loops), Xtij=1 iff path from i to j of length t or less Xmij for m ≥ n is the transitive closure O(log n) matrix multiplications to compute Xnij

9

slide-58
SLIDE 58

Another example

PATH ∈ AC1 “Boolean” Matrix Multiplication Z=XY: zij = ∨k=1..n (xik∧ykj) AC0 circuit (OR gate with fan-in n, AND gates) If X adjacency matrix (with self-loops), Xtij=1 iff path from i to j of length t or less Xmij for m ≥ n is the transitive closure O(log n) matrix multiplications to compute Xnij Total depth O(log n)

9

slide-59
SLIDE 59

NC1 ⊆ L

10

slide-60
SLIDE 60

NC1 ⊆ L

Generate circuit (implicitly) and evaluate

10

slide-61
SLIDE 61

NC1 ⊆ L

Generate circuit (implicitly) and evaluate

  • cf. NC ⊆ P. But now, to conserve space, a recursive evaluation

(rather than bottom-up).

10

slide-62
SLIDE 62

NC1 ⊆ L

Generate circuit (implicitly) and evaluate

  • cf. NC ⊆ P. But now, to conserve space, a recursive evaluation

(rather than bottom-up). For each gate, recursively evaluate each input wire

10

slide-63
SLIDE 63

NC1 ⊆ L

Generate circuit (implicitly) and evaluate

  • cf. NC ⊆ P. But now, to conserve space, a recursive evaluation

(rather than bottom-up). For each gate, recursively evaluate each input wire Storage: A path to the current node, from the output node: since bounded fan-in, takes O(1) bits per node; since logspace uniform that is sufficient to compute the node id in logspace

10

slide-64
SLIDE 64

NC1 ⊆ L

Generate circuit (implicitly) and evaluate

  • cf. NC ⊆ P. But now, to conserve space, a recursive evaluation

(rather than bottom-up). For each gate, recursively evaluate each input wire Storage: A path to the current node, from the output node: since bounded fan-in, takes O(1) bits per node; since logspace uniform that is sufficient to compute the node id in logspace And at each node along the path, the input wire values evaluated results so far (again O(1) bits per node)

10

slide-65
SLIDE 65

NC1 ⊆ L

Generate circuit (implicitly) and evaluate

  • cf. NC ⊆ P. But now, to conserve space, a recursive evaluation

(rather than bottom-up). For each gate, recursively evaluate each input wire Storage: A path to the current node, from the output node: since bounded fan-in, takes O(1) bits per node; since logspace uniform that is sufficient to compute the node id in logspace And at each node along the path, the input wire values evaluated results so far (again O(1) bits per node) Length of path = depth of circuit = O(log n)

10

slide-66
SLIDE 66

NL ⊆ AC1

11

slide-67
SLIDE 67

NL ⊆ AC1

Recall PATH ∈ AC1

11

slide-68
SLIDE 68

NL ⊆ AC1

Recall PATH ∈ AC1 Also recall PATH is NL-complete

11

slide-69
SLIDE 69

NL ⊆ AC1

Recall PATH ∈ AC1 Also recall PATH is NL-complete with respect to log-space reductions

11

slide-70
SLIDE 70

NL ⊆ AC1

Recall PATH ∈ AC1 Also recall PATH is NL-complete with respect to log-space reductions in fact, with respect to NC1 reductions

11

slide-71
SLIDE 71

NL ⊆ AC1

Recall PATH ∈ AC1 Also recall PATH is NL-complete with respect to log-space reductions in fact, with respect to NC1 reductions Exercise! (For NL machine M, can build (in log-space) NC1 circuit which on input x, outputs (i,j)th entry of the adjacency matrix of configuration graph of M(x).)

11

slide-72
SLIDE 72

NL ⊆ AC1

Recall PATH ∈ AC1 Also recall PATH is NL-complete with respect to log-space reductions in fact, with respect to NC1 reductions Exercise! (For NL machine M, can build (in log-space) NC1 circuit which on input x, outputs (i,j)th entry of the adjacency matrix of configuration graph of M(x).) Combining the NC1 circuits for reduction and the AC1 circuit for PATH, we get an AC1 circuit

11

slide-73
SLIDE 73

Summary: NCi and ACi

12

slide-74
SLIDE 74

Summary: NCi and ACi

NCi ⊆ ACi ⊆ NCi+1 ⊆ NC = AC ⊆ P

12

slide-75
SLIDE 75

Summary: NCi and ACi

NCi ⊆ ACi ⊆ NCi+1 ⊆ NC = AC ⊆ P NC0 ⊊ AC0 ⊊ NC1 ⊆ L ⊆ NL ⊆ AC1

12

slide-76
SLIDE 76

Summary: NCi and ACi

NCi ⊆ ACi ⊆ NCi+1 ⊆ NC = AC ⊆ P NC0 ⊊ AC0 ⊊ NC1 ⊆ L ⊆ NL ⊆ AC1 AC0 ⊊ NC1 as PARITY ∉ AC0 (later)

12

slide-77
SLIDE 77

Summary: NCi and ACi

NCi ⊆ ACi ⊆ NCi+1 ⊆ NC = AC ⊆ P NC0 ⊊ AC0 ⊊ NC1 ⊆ L ⊆ NL ⊆ AC1 AC0 ⊊ NC1 as PARITY ∉ AC0 (later) Open: whether NCi ⊊ ACi ⊊ NCi+1 for larger i

12

slide-78
SLIDE 78

Summary: NCi and ACi

NCi ⊆ ACi ⊆ NCi+1 ⊆ NC = AC ⊆ P NC0 ⊊ AC0 ⊊ NC1 ⊆ L ⊆ NL ⊆ AC1 AC0 ⊊ NC1 as PARITY ∉ AC0 (later) Open: whether NCi ⊊ ACi ⊊ NCi+1 for larger i Open: Is NC = P? (Can all polynomial time decidable languages be sped up to poly-log time using parallelization?)

12

slide-79
SLIDE 79

Zoo

P

PSPACE

EXP NP NEXP L NL

NPSPACE

ΣkP PH NC0 NC1 AC0 AC1 NC AC NCK ACK-1 ACK

13

slide-80
SLIDE 80

DC Uniform

14

slide-81
SLIDE 81

DC Uniform

Recall Uniform circuit family: circuits in the family can be generated by a TM

14

slide-82
SLIDE 82

DC Uniform

Recall Uniform circuit family: circuits in the family can be generated by a TM Suppose circuits are super-polynomially large. Cannot be logspace-uniform or P-uniform.

14

slide-83
SLIDE 83

DC Uniform

Recall Uniform circuit family: circuits in the family can be generated by a TM Suppose circuits are super-polynomially large. Cannot be logspace-uniform or P-uniform. DC uniform allows exponentially large circuits

14

slide-84
SLIDE 84

DC Uniform

Recall Uniform circuit family: circuits in the family can be generated by a TM Suppose circuits are super-polynomially large. Cannot be logspace-uniform or P-uniform. DC uniform allows exponentially large circuits Still requires polynomial time implicit computation

  • f the circuit

14

slide-85
SLIDE 85

DC Uniform

Recall Uniform circuit family: circuits in the family can be generated by a TM Suppose circuits are super-polynomially large. Cannot be logspace-uniform or P-uniform. DC uniform allows exponentially large circuits Still requires polynomial time implicit computation

  • f the circuit

Coincides with EXP (Why?)

14

slide-86
SLIDE 86

O(1) depth DC Uniform

15

slide-87
SLIDE 87

Restricted to depth k, 2poly(n) size, unbounded fan-in DC uniform circuit families decide exactly languages in ΣkP ∪ ΠkP

O(1) depth DC Uniform

15

slide-88
SLIDE 88

Restricted to depth k, 2poly(n) size, unbounded fan-in DC uniform circuit families decide exactly languages in ΣkP ∪ ΠkP Given a DC uniform circuit (w.l.o.g alternating levels of AND and OR gates, and NOT gates only at the input level) of depth k, an equivalent quantified expression with k alternations

O(1) depth DC Uniform

15

slide-89
SLIDE 89

Restricted to depth k, 2poly(n) size, unbounded fan-in DC uniform circuit families decide exactly languages in ΣkP ∪ ΠkP Given a DC uniform circuit (w.l.o.g alternating levels of AND and OR gates, and NOT gates only at the input level) of depth k, an equivalent quantified expression with k alternations Given a quantified expression with k alternations, an equivalent DC uniform circuit of depth k

O(1) depth DC Uniform

15

slide-90
SLIDE 90

O(1) depth DC Uniform

16

slide-91
SLIDE 91

O(1) depth DC Uniform

From circuit to quantified expression

16

slide-92
SLIDE 92

O(1) depth DC Uniform

From circuit to quantified expression Consider game played on the circuit: adversary picks an edge going into the AND level and Alice picks an edge going into the OR level, going through levels top to bottom

16

slide-93
SLIDE 93

O(1) depth DC Uniform

From circuit to quantified expression Consider game played on the circuit: adversary picks an edge going into the AND level and Alice picks an edge going into the OR level, going through levels top to bottom Alice wins if adversary “breaks off the path” (by picking either a non-wire edge or a wire not continuing the path),

  • r if the path terminates at literal of value 1 (w/o breaking)

16

slide-94
SLIDE 94

O(1) depth DC Uniform

From circuit to quantified expression Consider game played on the circuit: adversary picks an edge going into the AND level and Alice picks an edge going into the OR level, going through levels top to bottom Alice wins if adversary “breaks off the path” (by picking either a non-wire edge or a wire not continuing the path),

  • r if the path terminates at literal of value 1 (w/o breaking)

Can check in poly time

16

slide-95
SLIDE 95

O(1) depth DC Uniform

From circuit to quantified expression Consider game played on the circuit: adversary picks an edge going into the AND level and Alice picks an edge going into the OR level, going through levels top to bottom Alice wins if adversary “breaks off the path” (by picking either a non-wire edge or a wire not continuing the path),

  • r if the path terminates at literal of value 1 (w/o breaking)

Input accepted by the circuit iff Alice has a winning strategy (i.e., if the quantified expression is true)

Can check in poly time

16

slide-96
SLIDE 96

O(1) depth DC Uniform

From circuit to quantified expression Consider game played on the circuit: adversary picks an edge going into the AND level and Alice picks an edge going into the OR level, going through levels top to bottom Alice wins if adversary “breaks off the path” (by picking either a non-wire edge or a wire not continuing the path),

  • r if the path terminates at literal of value 1 (w/o breaking)

Input accepted by the circuit iff Alice has a winning strategy (i.e., if the quantified expression is true) Each edge has a polynomially long label, and quantified variables take values from the same domain. Checking if edge is a correct wire in poly time (uniformity)

Can check in poly time

16

slide-97
SLIDE 97

O(1) depth DC Uniform

17

slide-98
SLIDE 98

From quantified expression to circuit:

O(1) depth DC Uniform

17

slide-99
SLIDE 99

From quantified expression to circuit: Circuit has sub-circuits evaluating the poly-time condition for each possible assignment of the quantified variables.

O(1) depth DC Uniform

17

slide-100
SLIDE 100

From quantified expression to circuit: Circuit has sub-circuits evaluating the poly-time condition for each possible assignment of the quantified variables. Hang these sub-circuits at the leaves of a k-level AND-OR tree appropriately

O(1) depth DC Uniform

17

slide-101
SLIDE 101

From quantified expression to circuit: Circuit has sub-circuits evaluating the poly-time condition for each possible assignment of the quantified variables. Hang these sub-circuits at the leaves of a k-level AND-OR tree appropriately Circuit can be implicitly computed in polynomial

  • time. Size 2O(total length of variables)

O(1) depth DC Uniform

17

slide-102
SLIDE 102

Today

L NL NC0 NC1 AC0 AC1 NC AC NCK ACK-1 ACK P

18

slide-103
SLIDE 103

Today

NCi and ACi

L NL NC0 NC1 AC0 AC1 NC AC NCK ACK-1 ACK P

18

slide-104
SLIDE 104

Today

NCi and ACi DC-uniform

L NL NC0 NC1 AC0 AC1 NC AC NCK ACK-1 ACK P

18

slide-105
SLIDE 105

Today

NCi and ACi DC-uniform PH levels and EXP

L NL NC0 NC1 AC0 AC1 NC AC NCK ACK-1 ACK P

18

slide-106
SLIDE 106

Today

NCi and ACi DC-uniform PH levels and EXP Later, more circuits and non-uniform computation (time permitting)

L NL NC0 NC1 AC0 AC1 NC AC NCK ACK-1 ACK P

18

slide-107
SLIDE 107

Today

NCi and ACi DC-uniform PH levels and EXP Later, more circuits and non-uniform computation (time permitting) PARITY ∉ AC0

L NL NC0 NC1 AC0 AC1 NC AC NCK ACK-1 ACK P

18

slide-108
SLIDE 108

Today

NCi and ACi DC-uniform PH levels and EXP Later, more circuits and non-uniform computation (time permitting) PARITY ∉ AC0 Decision trees, Branching programs

L NL NC0 NC1 AC0 AC1 NC AC NCK ACK-1 ACK P

18

slide-109
SLIDE 109

Today

NCi and ACi DC-uniform PH levels and EXP Later, more circuits and non-uniform computation (time permitting) PARITY ∉ AC0 Decision trees, Branching programs Connections between circuit lowerbounds and other complexity class separations

L NL NC0 NC1 AC0 AC1 NC AC NCK ACK-1 ACK P

18