Non-Uniform Computation Lecture 10 Non-Uniform Computational - - PowerPoint PPT Presentation

non uniform computation
SMART_READER_LITE
LIVE PREVIEW

Non-Uniform Computation Lecture 10 Non-Uniform Computational - - PowerPoint PPT Presentation

Non-Uniform Computation Lecture 10 Non-Uniform Computational Models: Circuits 1 Non-Uniform Computation 2 Non-Uniform Computation Uniform: Same program for all (the infinitely many) inputs 2 Non-Uniform Computation Uniform: Same program


slide-1
SLIDE 1

Non-Uniform Computation

Lecture 10 Non-Uniform Computational Models: Circuits

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

7

slide-29
SLIDE 29

Search using Decision

Suppose given “oracles” for deciding all NP languages, can we easily find certificates?

7

slide-30
SLIDE 30

Search using Decision

Suppose given “oracles” for deciding all NP languages, can we easily find certificates? Yes! So, if decision easy (i.e., oracles realizable), then search is easy too!

7

slide-31
SLIDE 31

Search using Decision

Suppose given “oracles” for deciding all NP languages, can we easily find certificates? Yes! So, if decision easy (i.e., oracles realizable), then search is easy too! Say need to find w s.t. (x,w) ∈ L’

7

slide-32
SLIDE 32

Search using Decision

Suppose given “oracles” for deciding all NP languages, can we easily find certificates? Yes! So, if decision easy (i.e., oracles realizable), then search is easy too! Say need to find w s.t. (x,w) ∈ L’ 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).

7

slide-33
SLIDE 33

Search using Decision

Suppose given “oracles” for deciding all NP languages, can we easily find certificates? Yes! So, if decision easy (i.e., oracles realizable), then search is easy too! Say need to find w s.t. (x,w) ∈ L’ 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). One of the two must be positive: say (x,0) ∈ L1; then first bit

  • f w be 0.

7

slide-34
SLIDE 34

Search using Decision

Suppose given “oracles” for deciding all NP languages, can we easily find certificates? Yes! So, if decision easy (i.e., oracles realizable), then search is easy too! Say need to find w s.t. (x,w) ∈ L’ 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). One of the two must be positive: say (x,0) ∈ L1; then first bit

  • f w be 0.

For next bit query oracle with (x,00) and (x,01)

7

slide-35
SLIDE 35

Search using Decision

Suppose given “oracles” for deciding all NP languages, can we easily find certificates? Yes! So, if decision easy (i.e., oracles realizable), then search is easy too! Say need to find w s.t. (x,w) ∈ L’ 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). One of the two must be positive: say (x,0) ∈ L1; then first bit

  • f w be 0.

For next bit query 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

7

slide-36
SLIDE 36

NP ⊆ P/log ⇒ NP=P

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

8

slide-37
SLIDE 37

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-38
SLIDE 38

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-39
SLIDE 39

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-40
SLIDE 40

NP ⊆ P/poly ⇒ PH=Σ2P

9

slide-41
SLIDE 41

NP ⊆ P/poly ⇒ PH=Σ2P

Will show Π2P = Σ2P

9

slide-42
SLIDE 42

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-43
SLIDE 43

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-44
SLIDE 44

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-45
SLIDE 45

Boolean Circuits

1

10

slide-46
SLIDE 46

Boolean Circuits

Directed acyclic graph

1

10

slide-47
SLIDE 47

Boolean Circuits

Directed acyclic graph Nodes: AND, OR, NOT, CONST gates, inputs, output(s)

1

10

slide-48
SLIDE 48

Boolean Circuits

Directed acyclic graph Nodes: AND, OR, NOT, CONST gates, inputs, output(s) Edges: Boolean valued wires

1

10

slide-49
SLIDE 49

Boolean Circuits

Directed acyclic graph Nodes: AND, OR, NOT, CONST gates, inputs, output(s) Edges: Boolean valued wires AND/OR fan-ins can be bounded (say two) or unbounded

1

10

slide-50
SLIDE 50

Boolean Circuits

Directed acyclic graph Nodes: AND, OR, NOT, CONST gates, inputs, output(s) Edges: Boolean valued wires AND/OR fan-ins can be bounded (say two) or unbounded Acyclic: output well-defined

1

10

slide-51
SLIDE 51

Boolean Circuits

Directed acyclic graph Nodes: AND, OR, NOT, CONST gates, inputs, output(s) Edges: Boolean valued wires AND/OR fan-ins can be bounded (say two) or unbounded Acyclic: output well-defined Note: no memory gates

1

10

slide-52
SLIDE 52

Boolean Circuits

Directed acyclic graph Nodes: AND, OR, NOT, CONST gates, inputs, output(s) Edges: Boolean valued wires AND/OR fan-ins can be bounded (say two) or unbounded Acyclic: output well-defined Note: no memory gates Size of circuit: number of wires

1

10

slide-53
SLIDE 53

Boolean Circuits

x q0 x

11

slide-54
SLIDE 54

Boolean Circuits

Recall: a TM’ s execution on inputs

  • f fixed length can be captured by

a Boolean circuit x q0 x

11

slide-55
SLIDE 55

Boolean Circuits

Recall: a TM’ s execution on inputs

  • f fixed length can be captured by

a Boolean circuit From proof of Cook’ s theorem x q0 x

11

slide-56
SLIDE 56

Boolean Circuits

Recall: a TM’ s execution on inputs

  • f fixed length can be captured by

a Boolean circuit From proof of Cook’ s theorem Size of circuit polynomially related to running time of TM x q0 x

11

slide-57
SLIDE 57

Boolean Circuits

Recall: a TM’ s execution on inputs

  • f fixed length can be captured by

a Boolean circuit From proof of Cook’ s theorem Size of circuit polynomially related to running time of TM If poly time TM, then poly sized circuit x q0 x

11

slide-58
SLIDE 58

Boolean Circuits

An,q0 (x,An) x

12

slide-59
SLIDE 59

Boolean Circuits

Non-uniformity: circuit family {Cn} An,q0 (x,An) x

12

slide-60
SLIDE 60

Boolean Circuits

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

12

slide-61
SLIDE 61

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

12

slide-62
SLIDE 62

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 Doesn’t affect circuit size An,q0 (x,An) x

12

slide-63
SLIDE 63

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 Doesn’t affect circuit size Conversely, given {Cn}, can use description of Cn as advice An for a “universal” TM An,q0 (x,An) x

12

slide-64
SLIDE 64

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 Doesn’t affect circuit size 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

12

slide-65
SLIDE 65

SIZE(T)

13

slide-66
SLIDE 66

SIZE(T)

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

13

slide-67
SLIDE 67

SIZE(T)

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

13

slide-68
SLIDE 68

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

13

slide-69
SLIDE 69

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

13

slide-70
SLIDE 70

SIZE bounds

14

slide-71
SLIDE 71

SIZE bounds

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

14

slide-72
SLIDE 72

SIZE bounds

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

14

slide-73
SLIDE 73

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)

14

slide-74
SLIDE 74

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

14

slide-75
SLIDE 75

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

14

slide-76
SLIDE 76

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

14

slide-77
SLIDE 77

SIZE hierarchy

15

slide-78
SLIDE 78

SIZE hierarchy

SIZE(T’) ⊊ SIZE(T) if T=Ω(t2t) and T’=O(2t/t)

15

slide-79
SLIDE 79

SIZE hierarchy

SIZE(T’) ⊊ SIZE(T) if T=Ω(t2t) and T’=O(2t/t) Consider functions on t bits (ignoring n-t bits)

15

slide-80
SLIDE 80

SIZE hierarchy

SIZE(T’) ⊊ SIZE(T) if T=Ω(t2t) and T’=O(2t/t) Consider functions on t bits (ignoring n-t bits) All of them in SIZE(T), most not in SIZE(T’)

15

slide-81
SLIDE 81

Uniform Circuits

16

slide-82
SLIDE 82

Uniform Circuits

Circuits are interesting for their structure too (not just size)!

16

slide-83
SLIDE 83

Uniform Circuits

Circuits are interesting for their structure too (not just size)! Uniform circuit family: constructed by a TM

16

slide-84
SLIDE 84

Uniform Circuits

Circuits are interesting for their structure too (not just size)! Uniform circuit family: constructed by a TM Undecidable languages are undecidable for these circuits families

16

slide-85
SLIDE 85

Uniform Circuits

Circuits are interesting for their structure too (not just size)! 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

16

slide-86
SLIDE 86

Uniform Circuits

Circuits are interesting for their structure too (not just size)! 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:

16

slide-87
SLIDE 87

Uniform Circuits

Circuits are interesting for their structure too (not just size)! 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

16

slide-88
SLIDE 88

NC and AC

17

slide-89
SLIDE 89

NC and AC

NC and AC: languages decided by poly size and poly-log depth logspace-uniform circuits

17

slide-90
SLIDE 90

NC and AC

NC and AC: languages decided by poly size and poly-log depth logspace-uniform circuits NC with bounded fan-in and AC with unbounded fan-in

17

slide-91
SLIDE 91

NC and AC

NC and AC: languages decided by poly size and poly-log depth logspace-uniform circuits NC with bounded fan-in and AC with unbounded fan-in NCi: decided by bounded fan-in logspace-uniform circuits of poly size and depth O(logi n)

17

slide-92
SLIDE 92

NC and AC

NC and AC: languages decided by poly size and poly-log depth logspace-uniform circuits NC with bounded fan-in and AC with unbounded fan-in NCi: decided by bounded fan-in logspace-uniform circuits of poly size and depth O(logi n) NC = ∪i>0 NCi

17

slide-93
SLIDE 93

NC and AC

NC and AC: languages decided by poly size and poly-log depth logspace-uniform circuits NC with bounded fan-in and AC with unbounded fan-in NCi: decided by bounded fan-in logspace-uniform circuits of poly size and depth O(logi n) NC = ∪i>0 NCi Similarly ACi and AC = ∪i>0 ACi

17

slide-94
SLIDE 94

NCi and ACi

18

slide-95
SLIDE 95

NCi and ACi

NCi ⊆ ACi ⊆ NCi+1

18

slide-96
SLIDE 96

NCi and ACi

NCi ⊆ ACi ⊆ NCi+1 Clearly NCi ⊆ ACi

18

slide-97
SLIDE 97

NCi and ACi

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

18

slide-98
SLIDE 98

NCi and ACi

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

18

slide-99
SLIDE 99

NC and P

19

slide-100
SLIDE 100

NC and P

NC ⊆ P

19

slide-101
SLIDE 101

NC and P

NC ⊆ P Build the circuit in logspace (so poly time) and evaluate it in time polynomial in the size of the circuit

19

slide-102
SLIDE 102

NC and P

NC ⊆ P Build the circuit in logspace (so poly time) and evaluate it in time polynomial in the size of the circuit Open problem: Is NC = P?

19

slide-103
SLIDE 103

Motivation for NC

20

slide-104
SLIDE 104

Motivation for NC

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

20

slide-105
SLIDE 105

Motivation for NC

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

20

slide-106
SLIDE 106

Motivation for NC

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

20

slide-107
SLIDE 107

Motivation for NC

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

20