332 Views

Download Presentation
## Joint work with :

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -

**An Introduction toParallel ComputationandΡ-Completeness**TheorybyRaymond Greenlaw Joint work with: Larry RuzzoDepartment of Computer ScienceUniversity of Washington Jim HooverComputing Science DepartmentUniversity of Alberta An Introduction to Parallel Computation and Ρ-Completeness TheoryRay Greenlaw, Jim Hoover, and Larry Ruzzo**Outline**• Introduction • Parallel Models of Computation • Basic Complexity • Evidence that NC Ρ • Ρ-Complete Problems • Comparator Circuit Class • Open Problems An Introduction to Parallel Computation and Ρ-Completeness TheoryRay Greenlaw, Jim Hoover, and Larry Ruzzo**Outline**• Introduction • Parallel Models of Computation • Basic Complexity • Evidence that NC Ρ • Ρ-Complete Problems • Comparator Circuit Class • Open Problems An Introduction to Parallel Computation and Ρ-Completeness TheoryRay Greenlaw, Jim Hoover, and Larry Ruzzo**Introduction**• Sequential computation: Feasible ~ nO(1) time (polynomial time). • Parallel computation: Feasible ~ nO(1) time and~ nO(1) processors. An Introduction to Parallel Computation and Ρ-Completeness TheoryRay Greenlaw, Jim Hoover, and Larry Ruzzo**Introduction**• Goal of parallel computation: Develop extremely fast ((log n)O(1) ) time algorithms using a reasonable number of processors. • Speedup equation: (best sequential time) (number of processors) Allow a polynomial number of processors. (parallel time). An Introduction to Parallel Computation and Ρ-Completeness TheoryRay Greenlaw, Jim Hoover, and Larry Ruzzo**Introduction**Roughly, • A problem is feasible if it can be solved by a parallel algorithm with worst case time and processor complexity nO(1). • A problem is feasiblehighly parallelif it can be solved by an algorithm with worst case time complexity (log n)O(1) and processor complexity nO(1). • A problem is inherentlysequentialif it is feasible but has no feasible highly parallel algorithm for its solution. An Introduction to Parallel Computation and Ρ-Completeness TheoryRay Greenlaw, Jim Hoover, and Larry Ruzzo**Outline**• Introduction • Parallel Models of Computation • Basic Complexity • Evidence that NC Ρ • Ρ-Complete Problems • Comparator Circuit Class • Open Problems An Introduction to Parallel Computation and Ρ-Completeness TheoryRay Greenlaw, Jim Hoover, and Larry Ruzzo**Parallel Models of Computation**• Parallel Random Access Machine Model • Boolean Circuit Model • Circuits and PRAMs An Introduction to Parallel Computation and Ρ-Completeness TheoryRay Greenlaw, Jim Hoover, and Larry Ruzzo**P0**C0 P1 C1 P2 C2 Parallel Random Access Machine RAM Processors Global Memory Cells An Introduction to Parallel Computation and Ρ-Completeness TheoryRay Greenlaw, Jim Hoover, and Larry Ruzzo**0**1 1 1 0 AND OR OR AND OR NOT AND Boolean Circuit Model An Introduction to Parallel Computation and Ρ-Completeness TheoryRay Greenlaw, Jim Hoover, and Larry Ruzzo**Circuits and PRAMS**Theorem: A function f from {0,1}* to {0,1}* can be computed by a logarithmic space uniform Boolean circuit family {n} with depth(n)є(logn)O(1) and size(n) єnO(1)if and only iff can be computed by a CREW-PRAM M on inputs of length n in time t(n) є (logn)O(1) using p(n) є nO(1). An Introduction to Parallel Computation and Ρ-Completeness TheoryRay Greenlaw, Jim Hoover, and Larry Ruzzo**Outline**• Introduction • Parallel Models of Computation • Basic Complexity • Evidence that NC Ρ • Ρ-Complete Problems • Comparator Circuit Class • Open Problems An Introduction to Parallel Computation and Ρ-Completeness TheoryRay Greenlaw, Jim Hoover, and Larry Ruzzo**Basic Complexity**• Decision, Function, and Search Problems • Complexity Classes • Reducibility • Completeness An Introduction to Parallel Computation and Ρ-Completeness TheoryRay Greenlaw, Jim Hoover, and Larry Ruzzo**Decision, Function, and Search Problems**4 4 Spanning Tree-DGiven: An undirected graph G = (V,E) with weights from N labeling edges in E and a natural number k.Problem: Is there a spanning tree of G with cost less than or equal to k ?Spanning Tree-FGiven: Same (no k ).Problem: Compute the weight of a minimum cost spanning tree.Spanning Tree-SGiven: Same.Problem: Find a minimum cost spanning tree. 3 6 3 6 3 4 4 An Introduction to Parallel Computation and Ρ-Completeness TheoryRay Greenlaw, Jim Hoover, and Larry Ruzzo**Complexity Classes**Definitions:P is the set of all languages L that are decidable in sequential time nO(1).NC is the set of all languages L that are decidable in parallel time (logn)O(1) and processors nO(1). FP is the set of all functions from {0,1}* to {0,1}* that are computable in sequential time nO(1).FNC is the set of all functions from {0,1}* to {0,1}* that are computable in parallel time (logn)O(1) and processors nO(1).NC k, k 1, is the set of all languages L such that L is recognized by a uniform Boolean circuit family {n} with size(n) = nO(1) and depth (n) = O((logn)k). An Introduction to Parallel Computation and Ρ-Completeness TheoryRay Greenlaw, Jim Hoover, and Larry Ruzzo**Many-One Reducibility**Definitions:A language L is many-one reducibleto a language L’, written L PL’ , if there is a function f such that x є L if and only if f(x) є L’. L is P many-one reducibleto L’, written L PL’ , if the function fis in FP.For k 1, L is NCk many-one reducibleto L’, written L NC kL’, if the function fis in FNCk. L is NC many-one reducibleto L’, written L NCL’, if the function fis in FNC. m m m m An Introduction to Parallel Computation and Ρ-Completeness TheoryRay Greenlaw, Jim Hoover, and Larry Ruzzo**Many-One Reducibility**Lemma:The reducibilities m, P, NC k(k 1), and NC are transitive. • If L’ є P and LP L’, LNC kL’ (k >1), or L NCL’ then L є P. • If L’ є NC k (k >1), and LNC kL’ then L є NC k. • If L’ є NC and LNCL’ then L є NC . m m m m m m m m An Introduction to Parallel Computation and Ρ-Completeness TheoryRay Greenlaw, Jim Hoover, and Larry Ruzzo**Turing Reducibility**Definition:L is NC Turing reducibleto L’, written LNCL’, if and only if the L’-oracle PRAM on inputs of length n uses time (logn)O(1) and processors nO(1). Lemma: The reducibility NC is transitive. • If LNCL’then LNCL’. • If LNCL’and L’ єNCthen L є NC. • If LNCL’and L’ єPthen L є P. T T m T T T An Introduction to Parallel Computation and Ρ-Completeness TheoryRay Greenlaw, Jim Hoover, and Larry Ruzzo**Completeness**Definitions: A language L is P-hard under NC reducibility if L’ NCL for every L’ є P. A language L is P-complete under NC reducibility if L є P and L is P-hard. Theorem:If any P-complete problem is in NC then NC equals P. T An Introduction to Parallel Computation and Ρ-Completeness TheoryRay Greenlaw, Jim Hoover, and Larry Ruzzo**Outline**• Introduction • Parallel Models of Computation • Basic Complexity • Evidence that NC Ρ • Ρ-Complete Problems • Comparator Circuit Class • Open Problems An Introduction to Parallel Computation and Ρ-Completeness TheoryRay Greenlaw, Jim Hoover, and Larry Ruzzo**Evidence That NCP**• General Simulations Are Not Fast • Fast Simulations Are Not General • Natural Approaches Provably Fail An Introduction to Parallel Computation and Ρ-Completeness TheoryRay Greenlaw, Jim Hoover, and Larry Ruzzo**Evidence That NC P**Gaps in Simulations An Introduction to Parallel Computation and Ρ-Completeness TheoryRay Greenlaw, Jim Hoover, and Larry Ruzzo**Outline**• Introduction • Parallel Models of Computation • Basic Complexity • Evidence that NC Ρ • Ρ-Complete Problems • Comparator Circuit Class • Open Problems An Introduction to Parallel Computation and Ρ-Completeness TheoryRay Greenlaw, Jim Hoover, and Larry Ruzzo**P-Complete Problems**There are approximately 175 P-complete problems (500 with variations).Categories: • Circuit complexity • Graph theory • Searching graphs • Combinatorial optimization and flow • Local optimality • Logic • Formal languages • Algebra • Geometry • Real analysis • Games • Miscellaneous An Introduction to Parallel Computation and Ρ-Completeness TheoryRay Greenlaw, Jim Hoover, and Larry Ruzzo**Circuit Value Problem**Given: An encoding of a Boolean circuit , inputs x1,…,xn, and a designated output y. Problem:Is output y of TRUE on input x1,…,xn? Theorem: [Ladner 75]The Circuit Value Problem is P-complete under NC1 reductions. m An Introduction to Parallel Computation and Ρ-Completeness TheoryRay Greenlaw, Jim Hoover, and Larry Ruzzo**P-Complete Variations of CVP**• Topologically Ordered [Folklore] • Monotone [Goldschlager 77] • Alternating Monotone Fanin 2, Fanout 2 [Folklore] • NAND [Folklore] • Topologically Ordered NOR [Folklore] • Synchronous Alternating Monotone Fanout 2 CVP [Greenlaw, Hoover, and Ruzzo 87] • Planar [Goldschlager 77] An Introduction to Parallel Computation and Ρ-Completeness TheoryRay Greenlaw, Jim Hoover, and Larry Ruzzo**NAND Circuit Value Problem**Given: An encoding of a Boolean circuit that consists solely of NAND gates, inputs x1,…,xn, and a designated output y. Problem:Is output y of TRUE on input x1,…,xn? Theorem:The NAND Circuit Value Problem is P-complete. An Introduction to Parallel Computation and Ρ-Completeness TheoryRay Greenlaw, Jim Hoover, and Larry Ruzzo**1**0 0 1 0 0 1 1 0 1 1 1 1 1 NAND OR NAND NAND AND OR OR NAND 1 0 1 1 NAND Circuit Value Problem Proof:Reduce AM2CVP to NAND CVP. Complement all inputs. Relabel all gates as NAND. An Introduction to Parallel Computation and Ρ-Completeness TheoryRay Greenlaw, Jim Hoover, and Larry Ruzzo**Graph Theory**• Lexicographically First Maximal Independent Set [Cook 85] • Lexicographically First ( + 1)-Vertex Coloring [Luby 84] • High Degree Subgraph [Anderson and Mayr 84] • Nearest Neighbor Traveling Salesman Heuristic [Kindervater, Lenstra, and Shmoys 89] An Introduction to Parallel Computation and Ρ-Completeness TheoryRay Greenlaw, Jim Hoover, and Larry Ruzzo**1**1 0 0 0 0 X 1 2 3 4 5 X X NOR NOR 1 2 3 4 5 6 7 0 6 7 X NOR 1 8 8 0 NOR 9 9 0 Lexicographically First Maximal Independent Set Theorem: [Cook 85]LFMIS is P-complete. Proof:Reduce TopNOR CVP to LFMIS. Add new vertex 0. Connect to all false inputs. An Introduction to Parallel Computation and Ρ-Completeness TheoryRay Greenlaw, Jim Hoover, and Larry Ruzzo**Searching Graphs**• Lexicographically First Depth-First Search Ordering [Reif 85] • Stack Breadth-First Search [Greenlaw 92] • Breadth-Depth Search [Greenlaw 93] An Introduction to Parallel Computation and Ρ-Completeness TheoryRay Greenlaw, Jim Hoover, and Larry Ruzzo**Context-Free Grammar Empty**Given: A context-free grammar G=(N,T,P,S). Problem: Is L(G)empty? Theorem: [Jones and Laaser 76], [Goldschlager 81], [Tompa 91]CFGempty is P-complete. Proof: Reduce Monotone CVP to CFGempty. Given construct G=(N,T,P,S) with N, T, S, and P as follows: An Introduction to Parallel Computation and Ρ-Completeness TheoryRay Greenlaw, Jim Hoover, and Larry Ruzzo**Context-Free Grammar Empty**N = {i | vi is a vertex in } T = {a} S = n, where vn is the output of . P as follows: 1. For input vi, i aif value of vi is 1, 2. i jkif vi vjΛ vk, and 3. i j | k if vi vj V vk . Then the value of vi is 1 if and only if i , where є {a}+. * An Introduction to Parallel Computation and Ρ-Completeness TheoryRay Greenlaw, Jim Hoover, and Larry Ruzzo**x1**x3 x2 x4 1 2 3 4 5 6 AND OR AND 7 CFGempty Example x1 = 0, x2 = 0, x3 = 1, and x4 = 1. G = (N, T, S, P), where N = {1, 2, 3, 4, 5, 6, 7} T = {a} S = 7 P = {3 a, 4 a, 5 1 | 2, 6 34, 7 56} An Introduction to Parallel Computation and Ρ-Completeness TheoryRay Greenlaw, Jim Hoover, and Larry Ruzzo**Outline**• Introduction • Parallel Models of Computation • Basic Complexity • Evidence that NC Ρ • Ρ-Complete Problems • Comparator Circuit Class • Open Problems An Introduction to Parallel Computation and Ρ-Completeness TheoryRay Greenlaw, Jim Hoover, and Larry Ruzzo**Comparator Circuit Class**Definition: [Cook 82] Comparator Circuit Value Problem (CCVP) Given: An encoding of a circuit composed of comparatorgates, plus inputs x1,…,xn, and a designated output y. Problem: Is output yof TRUE on input x1,…,xn? Definition: CC is the class oflanguages NC reducible to CCVP. An Introduction to Parallel Computation and Ρ-Completeness TheoryRay Greenlaw, Jim Hoover, and Larry Ruzzo**CC-Complete Problems**• Lexicographically First Maximal Matching [Cook 82] • Telephone Connection [Ramachandran and Wang 91] • Stable Marriage [Mayr and Subramanian 92] An Introduction to Parallel Computation and Ρ-Completeness TheoryRay Greenlaw, Jim Hoover, and Larry Ruzzo**Outline**• Introduction • Parallel Models of Computation • Basic Complexity • Evidence that NC Ρ • Ρ-Complete Problems • Comparator Circuit Class • Open Problems An Introduction to Parallel Computation and Ρ-Completeness TheoryRay Greenlaw, Jim Hoover, and Larry Ruzzo**Open Problems**Find an NC algorithm or classify as P-complete. • Edge Ranking • Edge-Weighted Matching • Restricted Lexicographically First Maximal Independent Set • Integer Greatest Common Divisor • Modular Powering An Introduction to Parallel Computation and Ρ-Completeness TheoryRay Greenlaw, Jim Hoover, and Larry Ruzzo