Physics and phase transitions in parallel computational complexity - - PowerPoint PPT Presentation

physics and phase transitions in parallel computational
SMART_READER_LITE
LIVE PREVIEW

Physics and phase transitions in parallel computational complexity - - PowerPoint PPT Presentation

Physics and phase transitions in parallel computational complexity Jon Machta University of Massachusetts Amherst and Santa Fe Institute Physics of Algorithms August 31, 2009 Tuesday, September 1, 2009 Collaborators Ray Greenlaw,


slide-1
SLIDE 1

Physics and phase transitions in parallel computational complexity

Jon Machta

University of Massachusetts Amherst

and

Santa Fe Institute

Physics of Algorithms August 31, 2009

Tuesday, September 1, 2009

slide-2
SLIDE 2

Collaborators

  • Ray Greenlaw, Armstrong Atlantic University
  • Cris Moore, University of New Mexico, SFI
  • Stephan Mertens, Otto-von-Guericke University

Magdeburg, SFI

  • Students:

– Ken Moriarty – Xuenan Li – Ben Machta – Dan Tillberg

Tuesday, September 1, 2009

slide-3
SLIDE 3

Outline

  • Parallel computing and computational complexity
  • Parallel complexity of models in statistical physical
  • Random circuit value problem: complexity of solving

and sampling

Tuesday, September 1, 2009

slide-4
SLIDE 4

Parallel Random Access Machine

1 2 3 m Controller Global Memory Processors PRAM

  • Each processor runs the

same program but has a distinct label

  • Each processor

communicates with any memory cell in a single time step.

  • Primary resources:
  • Parallel time
  • Number of processors

Tuesday, September 1, 2009

slide-5
SLIDE 5

Parallel Computing

Adding n numbers can be carried out in O(log n) steps using O(n) processors. +

X1 X2

+

X3 X4

+

X5 X6

+

X7 X8

+ + + ΣXi log n Connected components of a graph can be found in O(log2n) steps using n2 processors.

Tuesday, September 1, 2009

slide-6
SLIDE 6

Complexity Classes and P-completeness

  • P is the class of feasible problems: solvable with

polynomial work.

  • NC is the class of problems efficiently solved in

parallel (polylog time and polynomial work, NC ⊆ P).

  • Are there feasible problems that cannot be solved

efficiently in parallel (P≠NC)?

  • P-complete problems are the hardest problems in P to

solve in parallel. It is believed they are inherently sequential: not solvable in polylog time.

  • The Circuit Value Problem is P-complete.

V V V V V V V V V

T T F

W

D

Tuesday, September 1, 2009

slide-7
SLIDE 7

Complexity Classes and P-completeness

  • P is the class of feasible problems: solvable with

polynomial work.

  • NC is the class of problems efficiently solved in

parallel (polylog time and polynomial work, NC ⊆ P).

  • Are there feasible problems that cannot be solved

efficiently in parallel (P≠NC)?

  • P-complete problems are the hardest problems in P to

solve in parallel. It is believed they are inherently sequential: not solvable in polylog time.

  • The Circuit Value Problem is P-complete.

V V V V V V V V V

T T F

T T T T T T F F F

T T F

Tuesday, September 1, 2009

slide-8
SLIDE 8

Sampling Complexity

  • Models and algorithms in

statistical physics convert random bits into typical system states.

Typical System State Random Bits

PRAM Algorithm

Tuesday, September 1, 2009

slide-9
SLIDE 9

Diffusion Limited Aggregation

  • Particles added one at a time

with sticking probabilities given by the solution of Laplace’s equation.

  • Self-organized fractal object

df=1.715… (2D)

  • Physical systems:

Fluid flow in porous media Electrodeposition Bacterial colonies

Witten and Sander, PRL 47, 1400 (1981)

Tuesday, September 1, 2009

slide-10
SLIDE 10

Random Walk Dynamics for DLA

Tuesday, September 1, 2009

slide-11
SLIDE 11

Tuesday, September 1, 2009

slide-12
SLIDE 12

#1 #3 #2 #1 #3 #2

Parallel dynamics ignores interference between 1 and 3 Sequential dynamics

The Problem with Parallelizing DLA

Tuesday, September 1, 2009

slide-13
SLIDE 13

Caveats: 1. P≠NC not proven 2. Average case may be easier than worst case 3. Alternative dynamics may be faster than random walk dynamics for sampling DLA

Complexity of DLA

Theorem: Determining the shape of an aggregate from the random walks of the constituent particles is a P-hard problem.

Proof idea: Reduce the Circuit Value Problem to DLA dynamics.

a b c input 1 input 2 power

  • utput

d

Gadet for NOR gate

Tuesday, September 1, 2009

slide-14
SLIDE 14

Sequential models with polylog parallel complexity

Eden growth Invasion percolation

  • Eden growth
  • Invasion percolation
  • Scale free networks
  • Ballistic deposition
  • Bak-Sneppen model
  • Internal DLA

Scale free network

Tuesday, September 1, 2009

slide-15
SLIDE 15

Internal DLA

Particles start at the origin, random walk and stick where they first leaves the cluster.

  • Shape approaches a circle with logarithmic fluctuations.
  • P-completeness proof fails. (However, IDLA is CC-complete)

Tuesday, September 1, 2009

slide-16
SLIDE 16

Parallel Algorithm for IDLA

1. Start with seed particle at the origin and N walk trajectories 2. Place particles at expected positions along their trajectories. 3. Iteratively move particles until holes and multiple occupancies are eliminated

Average parallel time polylogarthmic or possibly a small power in N.

Cluster of 2500 particles made in 6 parallel steps.

1 2 4 3 5 6

  • C. Moore and JM, J. Stat. Phys. 99, 661 (2000)

Tuesday, September 1, 2009

slide-17
SLIDE 17

Random Monotone CVP

V V V V V V V V V

T T F

W

D

  • Circuit arranged in levels with W

gates on a level and D levels.

  • =fraction of TRUE inputs.
  • p =fraction of OR gates.
  • Gates at level n+1 randomly take k

inputs from gates at level n (with replacement).

τ0

Monotone CVP is P-complete but how hard is it on average to evaluate the circuit in parallel?

Tuesday, September 1, 2009

slide-18
SLIDE 18
  • Let be the expected fraction of gates

evaluating to TRUE at level n.

Recursion relations, k=2

τn τn+1 = p(1 − (1 − τn)2) + (1 − p)τ 2

n

  • τ = 1

τ = 0

Absorbing fixed points at and .

Tuesday, September 1, 2009

slide-19
SLIDE 19
  • Let be the expected fraction of gates

evaluating to TRUE at level n.

Recursion relations, k=2

τn τn+1 = p(1 − (1 − τn)2) + (1 − p)τ 2

n

  • 1

τn

p < 1/2

1

τn

p > 1/2

mainly AND mainly OR

Tuesday, September 1, 2009

slide-20
SLIDE 20

τn+1 = 2pτn + O(τ 2

n)

T ∼ ln W − ln(2p)

Linearize around fixed points

Near the fixed point for p<1/2 the linearized recursion relations are:

τ = 0

τT ≈ 1/W

Let T be the time to saturation to all FALSE,

Tuesday, September 1, 2009

slide-21
SLIDE 21

4 5 6 7 8 9 10

log L

50 100 150 200

n p = 0.52 p = 0.53 p = 0.55 p = 0.60

T Time to saturation T as a function of circuit width W for various fractions p of OR gates. ln W

Tuesday, September 1, 2009

slide-22
SLIDE 22

0.5 0.55 0.6 0.65

p

10 20 30

m

slope Slope of the logarithmic scaling of the saturation time vs. p. The solid line is the prediction, -1/ln(2(1-p)).

Tuesday, September 1, 2009

slide-23
SLIDE 23

Critical point at p=1/2

The number of gates, Xn evaluating to TRUE at level n obeys a stochastic recursion relation, Here B(n,p) is a binomial random variable.

Xn+1 = B(W, Xn/W)

After taking the continuum limit, one obtains a diffusion process with absorbing endpoints and a diffusion coefficient that vanishes at the endpoints.

Tuesday, September 1, 2009

slide-24
SLIDE 24

Critical Saturation Time

Using known results for mean first passage times with the spatially non-uniform diffusion coefficient we obtain a linear saturation time:

D(x) = x 2 (1 − x W ) T = −2W [τ0 ln τ0 + (1 − τ0) ln(1 − τ0)]

Tuesday, September 1, 2009

slide-25
SLIDE 25

0.4 0.5 0.6 0.7 0.8 0.9 1

τ

0.0 0.5 1.0 1.5 2.0

m

slope

T = −2W [τ0 ln τ0 + (1 − τ0) ln(1 − τ0)]

τ0

2 Slope of the linear scaling of the saturation time vs. W.

Tuesday, September 1, 2009

slide-26
SLIDE 26

Summary for two input gates

  • For

p = 1/2 T ∼ ln W

Circuit evaluation easy Circuit evaluation hard

p = 1/2 T ∼ W

  • For

Tuesday, September 1, 2009

slide-27
SLIDE 27

k >2

  • For p<1/k or p>1-1/k have T ~ ln W ➜

Fast circuit evaluation.

  • For 1/k < p < 1-1/k have non-trivial fixed

point: Circuit does not saturate to a single value except via a large deviation ➜ Slow circuit evaluation.

0 < τ ∗ < 1

Tuesday, September 1, 2009

slide-28
SLIDE 28

Generating Circuit+Solution Pairs

  • Q: How difficult is it to simultaneously

generate an instance of random monotone CVP together with its evaluation?

  • A: For any values of the parameters, a random

instance chosen from the correct distribution and its evaluation can be generated in polylog parallel time

  • n a PRAM.

V V V V V V V V V T T F

T T T T T T F F F

T T F

Tuesday, September 1, 2009

slide-29
SLIDE 29

Fast Parallel Sampling of Circuit +Evaluation Pairs

  • Idea: In parallel generate an instance of each level--

gates and their inputs and outputs--then put the levels together into a complete circuit+evaluation.

  • Difficulty: Inputs to layer n+1 are not known until layer

n is evaluated.

  • Solution: The number of TRUE inputs is all that is

required to generate a random level. In parallel construct W+1 instances of each level, one for each number of TRUE inputs.

Tuesday, September 1, 2009

slide-30
SLIDE 30

Construct one level

V V V

2 TRUE, 1 FALSE T F F

Given:

Tuesday, September 1, 2009

slide-31
SLIDE 31

Attaching levels into a circuit+evaluation

V V V

2 TRUE, 1 FALSE T F F

V V V

0 TRUE, 3 FALSE F F F

V V V

1 TRUE, 2 FALSE F F T

V V V

3 TRUE, 0 FALSE T T T

V V V

3 TRUE, 0 FALSE T T T

V V V

2 TRUE, 1 FALSE F T T

V V V

1 TRUE, 2 FALSE F F T

V V V

0 TRUE, 3 FALSE F F F

T T F

Tuesday, September 1, 2009

slide-32
SLIDE 32

V V V

2 TRUE, 1 FALSE T F F

Wiring the circuit

T T F V V V

1 TRUE, 2 FALSE F F T Tuesday, September 1, 2009

slide-33
SLIDE 33

Conclusion

  • Parallel computational complexity

provides a unique perspective on models in statistical physics.

  • Simple methods yield interesting results

for random ensembles of CVP revealing phase transitions in complexity.

  • Although CVP is hard to solve in

parallel, it is easy to generate random instances and solutions simultaneously.

Tuesday, September 1, 2009