Non-Uniform Computation & Circuits Lecture 10 Wherein every - - PowerPoint PPT Presentation

non uniform computation circuits
SMART_READER_LITE
LIVE PREVIEW

Non-Uniform Computation & Circuits Lecture 10 Wherein every - - PowerPoint PPT Presentation

Non-Uniform Computation & Circuits Lecture 10 Wherein every language can be decided 1 Non-Uniform Computation 2 Non-Uniform Computation Uniform: Same program for all (the infinitely many) inputs 2 Non-Uniform Computation Uniform: Same


slide-1
SLIDE 1

Non-Uniform Computation & Circuits

Lecture 10 Wherein every language can be decided

1

slide-2
SLIDE 2

Non-Uniform Computation

2

slide-3
SLIDE 3

Non-Uniform Computation

Uniform: Same program for all (the infinitely many) inputs

2

slide-4
SLIDE 4

Non-Uniform Computation

Uniform: Same program for all (the infinitely many) inputs Non-uniform: A different “program” for each input size

2

slide-5
SLIDE 5

Non-Uniform Computation

Uniform: Same program for all (the infinitely many) inputs Non-uniform: A different “program” for each input size Then complexity of building the program and executing the program

2

slide-6
SLIDE 6

Non-Uniform Computation

Uniform: Same program for all (the infinitely many) inputs Non-uniform: A different “program” for each input size Then complexity of building the program and executing the program Sometimes will focus on the latter alone

2

slide-7
SLIDE 7

Non-Uniform Computation

Uniform: Same program for all (the infinitely many) inputs Non-uniform: A different “program” for each input size Then complexity of building the program and executing the program Sometimes will focus on the latter alone Not entirely realistic if the program family is uncomputable

  • r very complex to compute

2

slide-8
SLIDE 8

Non-uniform advice

3

slide-9
SLIDE 9

Non-uniform advice

Program: TM M and advice strings {An}

3

slide-10
SLIDE 10

Non-uniform advice

Program: TM M and advice strings {An} M given A|x| along with x

3

slide-11
SLIDE 11

Non-uniform advice

Program: TM M and advice strings {An} M given A|x| along with x An can be the program for inputs of size n

3

slide-12
SLIDE 12

Non-uniform advice

Program: TM M and advice strings {An} M given A|x| along with x An can be the program for inputs of size n |An|=2n is sufficient

3

slide-13
SLIDE 13

Non-uniform advice

Program: TM M and advice strings {An} M given A|x| along with x An can be the program for inputs of size n |An|=2n is sufficient But {An} can be uncomputable (even if just one bit long)

3

slide-14
SLIDE 14

Non-uniform advice

Program: TM M and advice strings {An} M given A|x| along with x An can be the program for inputs of size n |An|=2n is sufficient But {An} can be uncomputable (even if just one bit long) e.g. advice to decide undecidable unary languages

3

slide-15
SLIDE 15

P/poly and P/log

4

slide-16
SLIDE 16

P/poly and P/log

DTIME(T)/a

4

slide-17
SLIDE 17

P/poly and P/log

DTIME(T)/a Languages decided by a TM in time T(n) using non-uniform advice of length a(n)

4

slide-18
SLIDE 18

P/poly and P/log

DTIME(T)/a Languages decided by a TM in time T(n) using non-uniform advice of length a(n) P/poly = ∪c,d,k>0 DTIME(knc)/knd

4

slide-19
SLIDE 19

P/poly and P/log

DTIME(T)/a Languages decided by a TM in time T(n) using non-uniform advice of length a(n) P/poly = ∪c,d,k>0 DTIME(knc)/knd P/log = ∪c,k>0 DTIME(knc)/k log n

4

slide-20
SLIDE 20

NP vs. P/log, P/poly

5

slide-21
SLIDE 21

NP vs. P/log, P/poly

P/log (or even DTIME(1)/1) has undecidable languages

5

slide-22
SLIDE 22

NP vs. P/log, P/poly

P/log (or even DTIME(1)/1) has undecidable languages e.g. unary undecidable languages

5

slide-23
SLIDE 23

NP vs. P/log, P/poly

P/log (or even DTIME(1)/1) has undecidable languages e.g. unary undecidable languages So P/log cannot be contained in any of the uniform complexity classes

5

slide-24
SLIDE 24

NP vs. P/log, P/poly

P/log (or even DTIME(1)/1) has undecidable languages e.g. unary undecidable languages So P/log cannot be contained in any of the uniform complexity classes P/log contains P

5

slide-25
SLIDE 25

NP vs. P/log, P/poly

P/log (or even DTIME(1)/1) has undecidable languages e.g. unary undecidable languages So P/log cannot be contained in any of the uniform complexity classes P/log contains P Does P/log or P/poly contain NP?

5

slide-26
SLIDE 26

NP ⊆ P/log ⇒ NP=P

6

slide-27
SLIDE 27

NP ⊆ P/log ⇒ NP=P

Recall finding witness for an NP language is Turing reducible to deciding the language

6

slide-28
SLIDE 28

Search using Decision

Suppose given “oracles” for deciding all NP languages, can we easily find certificates? Yes! So, if decision easy (decision-oracles realizable), then search is easy too! Say, given x, need to find w s.t. (x,w) ∈ L ’ (if such w exists) consider L1 in NP: (x,y) ∈ L1 iff ∃z s.t. (x,yz) ∈ L ’. (i.e., can y be a prefix of a certificate for x). Query L1-oracle with (x,0) and (x,1). If ∃w, one of the two must be positive: say (x,0) ∈ L1; then first bit of w be 0. For next bit query L1-oracle with (x,00) and (x,01)

Recall

7

slide-29
SLIDE 29

Search using Decision

Suppose given “oracles” for deciding all NP languages, can we easily find certificates? Yes! So, if decision easy (decision-oracles realizable), then search is easy too! Say, given x, need to find w s.t. (x,w) ∈ L ’ (if such w exists) consider L1 in NP: (x,y) ∈ L1 iff ∃z s.t. (x,yz) ∈ L ’. (i.e., can y be a prefix of a certificate for x). Query L1-oracle with (x,0) and (x,1). If ∃w, one of the two must be positive: say (x,0) ∈ L1; then first bit of w be 0. For next bit query L1-oracle with (x,00) and (x,01)

Use L2 so that (x,z,pad) in L2 iff (x,z) in L1. Can query L2 with same size instances

Recall

7

slide-30
SLIDE 30

NP ⊆ P/log ⇒ NP=P

Recall finding witness for an NP language is Turing reducible to deciding the language

8

slide-31
SLIDE 31

NP ⊆ P/log ⇒ NP=P

If NP ⊆ P/log, then for each L in NP, there is a poly-time TM with log advice which can find witness (via self- reduction) Recall finding witness for an NP language is Turing reducible to deciding the language

8

slide-32
SLIDE 32

NP ⊆ P/log ⇒ NP=P

If NP ⊆ P/log, then for each L in NP, there is a poly-time TM with log advice which can find witness (via self- reduction) Guess advice (poly many), and for each guessed advice, run the TM and see if it finds witness Recall finding witness for an NP language is Turing reducible to deciding the language

8

slide-33
SLIDE 33

NP ⊆ P/log ⇒ NP=P

If NP ⊆ P/log, then for each L in NP, there is a poly-time TM with log advice which can find witness (via self- reduction) Guess advice (poly many), and for each guessed advice, run the TM and see if it finds witness If no advice worked (one of them was correct), then input not in language Recall finding witness for an NP language is Turing reducible to deciding the language

8

slide-34
SLIDE 34

NP ⊆ P/poly ⇒ PH=Σ2P

9

slide-35
SLIDE 35

NP ⊆ P/poly ⇒ PH=Σ2P

Will show Π2P = Σ2P

9

slide-36
SLIDE 36

NP ⊆ P/poly ⇒ PH=Σ2P

Will show Π2P = Σ2P Consider L = {x| ∀w1 (x,w1) ∈ L ’ } ∈ Π2P where L ’ = {(x,w1)| ∃w2 F(x,w1,w2)} ∈ NP

9

slide-37
SLIDE 37

NP ⊆ P/poly ⇒ PH=Σ2P

Will show Π2P = Σ2P Consider L = {x| ∀w1 (x,w1) ∈ L ’ } ∈ Π2P where L ’ = {(x,w1)| ∃w2 F(x,w1,w2)} ∈ NP If NP ⊆ P/poly then consider M with advice {An} which finds witness for L ’: i.e. if (x,w1) ∈ L ’, then M(x,w1; An) outputs a witness w2 s.t. F(x,w1,w2)

9

slide-38
SLIDE 38

NP ⊆ P/poly ⇒ PH=Σ2P

Will show Π2P = Σ2P Consider L = {x| ∀w1 (x,w1) ∈ L ’ } ∈ Π2P where L ’ = {(x,w1)| ∃w2 F(x,w1,w2)} ∈ NP If NP ⊆ P/poly then consider M with advice {An} which finds witness for L ’: i.e. if (x,w1) ∈ L ’, then M(x,w1; An) outputs a witness w2 s.t. F(x,w1,w2) L = {x| ∃z ∀w1 F(x, w1, M(x,w1; z)) }

9

slide-39
SLIDE 39

Boolean Circuits

10

slide-40
SLIDE 40

Boolean Circuits

Non-uniformity: circuit family {Cn}

10

slide-41
SLIDE 41

Boolean Circuits

Non-uniformity: circuit family {Cn} Given non-uniform computation (M,{An}), can define equivalent {Cn}

10

slide-42
SLIDE 42

Boolean Circuits

Non-uniformity: circuit family {Cn} Given non-uniform computation (M,{An}), can define equivalent {Cn} An,q0 (x,An) x

10

slide-43
SLIDE 43

Boolean Circuits

Non-uniformity: circuit family {Cn} Given non-uniform computation (M,{An}), can define equivalent {Cn} Advice An is hard-wired into circuit Cn An,q0 (x,An) x

10

slide-44
SLIDE 44

Boolean Circuits

Non-uniformity: circuit family {Cn} Given non-uniform computation (M,{An}), can define equivalent {Cn} Advice An is hard-wired into circuit Cn Size of circuit polynomially related to running time of TM An,q0 (x,An) x

10

slide-45
SLIDE 45

Boolean Circuits

Non-uniformity: circuit family {Cn} Given non-uniform computation (M,{An}), can define equivalent {Cn} Advice An is hard-wired into circuit Cn Size of circuit polynomially related to running time of TM An,q0 (x,An) x S i z e = n

  • .
  • f

w i r e s

10

slide-46
SLIDE 46

Boolean Circuits

Non-uniformity: circuit family {Cn} Given non-uniform computation (M,{An}), can define equivalent {Cn} Advice An is hard-wired into circuit Cn Size of circuit polynomially related to running time of TM Conversely, given {Cn}, can use description of Cn as advice An for a “universal” TM An,q0 (x,An) x S i z e = n

  • .
  • f

w i r e s

10

slide-47
SLIDE 47

Boolean Circuits

Non-uniformity: circuit family {Cn} Given non-uniform computation (M,{An}), can define equivalent {Cn} Advice An is hard-wired into circuit Cn Size of circuit polynomially related to running time of TM Conversely, given {Cn}, can use description of Cn as advice An for a “universal” TM |An| comparable to size of circuit Cn An,q0 (x,An) x S i z e = n

  • .
  • f

w i r e s

10

slide-48
SLIDE 48

SIZE(T)

11

slide-49
SLIDE 49

SIZE(T)

SIZE(T): languages solved by circuit families of size T(n)

11

slide-50
SLIDE 50

SIZE(T)

SIZE(T): languages solved by circuit families of size T(n) P/poly = SIZE(poly)

11

slide-51
SLIDE 51

SIZE(T)

SIZE(T): languages solved by circuit families of size T(n) P/poly = SIZE(poly) SIZE(poly) ⊆ P/poly: Size T circuit can be described in O(T log T) bits (advice). Universal TM can evaluate this circuit in poly time

11

slide-52
SLIDE 52

SIZE(T)

SIZE(T): languages solved by circuit families of size T(n) P/poly = SIZE(poly) SIZE(poly) ⊆ P/poly: Size T circuit can be described in O(T log T) bits (advice). Universal TM can evaluate this circuit in poly time P/poly ⊆ SIZE(poly): Transformation from Cook’ s theorem, with advice string hardwired into circuit

11

slide-53
SLIDE 53

SIZE bounds

12

slide-54
SLIDE 54

SIZE bounds

All languages (decidable or not) are in SIZE(T) for T=O(n2n)

12

slide-55
SLIDE 55

SIZE bounds

All languages (decidable or not) are in SIZE(T) for T=O(n2n) Circuit encodes truth-table

12

slide-56
SLIDE 56

SIZE bounds

All languages (decidable or not) are in SIZE(T) for T=O(n2n) Circuit encodes truth-table Most languages need circuits of size !(2n/n)

12

slide-57
SLIDE 57

SIZE bounds

All languages (decidable or not) are in SIZE(T) for T=O(n2n) Circuit encodes truth-table Most languages need circuits of size !(2n/n) Number of circuits of size T is at most T2T

12

slide-58
SLIDE 58

SIZE bounds

All languages (decidable or not) are in SIZE(T) for T=O(n2n) Circuit encodes truth-table Most languages need circuits of size !(2n/n) Number of circuits of size T is at most T2T If T = 2n/ 4n, say, T2T < 2(2^n)/2

12

slide-59
SLIDE 59

SIZE bounds

All languages (decidable or not) are in SIZE(T) for T=O(n2n) Circuit encodes truth-table Most languages need circuits of size !(2n/n) Number of circuits of size T is at most T2T If T = 2n/ 4n, say, T2T < 2(2^n)/2 Number of languages = 22^n

12

slide-60
SLIDE 60

SIZE hierarchy

13

slide-61
SLIDE 61

SIZE hierarchy

SIZE(T’) ⊊ SIZE(T) if T=!(t2t) and T’=O(2t/t), for t(n)"n

13

slide-62
SLIDE 62

SIZE hierarchy

SIZE(T’) ⊊ SIZE(T) if T=!(t2t) and T’=O(2t/t), for t(n)"n e.g., T(n) = n log n and T’(n) = n/log n

13

slide-63
SLIDE 63

SIZE hierarchy

SIZE(T’) ⊊ SIZE(T) if T=!(t2t) and T’=O(2t/t), for t(n)"n e.g., T(n) = n log n and T’(n) = n/log n Consider functions on t bits (ignoring n-t bits)

13

slide-64
SLIDE 64

SIZE hierarchy

SIZE(T’) ⊊ SIZE(T) if T=!(t2t) and T’=O(2t/t), for t(n)"n e.g., T(n) = n log n and T’(n) = n/log n Consider functions on t bits (ignoring n-t bits) All of them in SIZE(T), most not in SIZE(T’)

13

slide-65
SLIDE 65

Uniform Circuits

14

slide-66
SLIDE 66

Uniform Circuits

Uniform circuit family: constructed by a TM

14

slide-67
SLIDE 67

Uniform Circuits

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

14

slide-68
SLIDE 68

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

14

slide-69
SLIDE 69

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:

14

slide-70
SLIDE 70

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

14

slide-71
SLIDE 71

NCi and ACi

15

slide-72
SLIDE 72

NCi and ACi

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

15

slide-73
SLIDE 73

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

15

slide-74
SLIDE 74

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

15

slide-75
SLIDE 75

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

15

slide-76
SLIDE 76

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,...}

15

slide-77
SLIDE 77

NC and AC

16

slide-78
SLIDE 78

NC and AC

NC = ∪i>0 NCi. Similarly AC.

16

slide-79
SLIDE 79

NC and AC

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

16

slide-80
SLIDE 80

NC and AC

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

16

slide-81
SLIDE 81

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

16

slide-82
SLIDE 82

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

16

slide-83
SLIDE 83

NC ⊆ P

17

slide-84
SLIDE 84

NC ⊆ P

Generate circuit of the right input size and evaluate on input

17

slide-85
SLIDE 85

NC ⊆ P

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

17

slide-86
SLIDE 86

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

17

slide-87
SLIDE 87

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

17

slide-88
SLIDE 88

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

17

slide-89
SLIDE 89

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

17

slide-90
SLIDE 90

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?

17

slide-91
SLIDE 91

Motivation for NC

18

slide-92
SLIDE 92

Motivation for NC

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

18

slide-93
SLIDE 93

Motivation for NC

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

18

slide-94
SLIDE 94

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

18

slide-95
SLIDE 95

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

18

slide-96
SLIDE 96

Today

19

slide-97
SLIDE 97

Today

Non-uniform complexity

19

slide-98
SLIDE 98

Today

Non-uniform complexity P/1 ⊈ Decidable

19

slide-99
SLIDE 99

Today

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

19

slide-100
SLIDE 100

Today

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

19

slide-101
SLIDE 101

Today

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

19

slide-102
SLIDE 102

Today

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

19

slide-103
SLIDE 103

Today

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

19

slide-104
SLIDE 104

Today

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

19

slide-105
SLIDE 105

Today

Non-uniform complexity P/1 ⊈ Decidable NP ⊆ P/log ⇒ NP = P NP ⊆ P/poly ⇒ PH = Σ2P Non-uniform circuit Complexity SIZE(poly) = P/poly SIZE-hierarchy: SIZE(T’) ⊊ SIZE(T) if T=!(t2t), T’=O(2t/t) Uniform Circuit Complexity NCi ⊆ ACi ⊆ NCi+1 ⊆ NC = AC ⊆ P

19