Tractable and intractable problems for parallel computers - PowerPoint PPT Presentation

About This Presentation
Title:

Tractable and intractable problems for parallel computers

Description:

Title: Slide 1 Author: igor Last modified by: igor Created Date: 4/21/2006 9:11:34 AM Document presentation format: On-screen Show Company: The University of Liverpool – PowerPoint PPT presentation

Number of Views:30
Avg rating:3.0/5.0
Slides: 14
Provided by: Igo54
Category:

less

Transcript and Presenter's Notes

Title: Tractable and intractable problems for parallel computers


1
Tractable and intractable problemsfor parallel
computers
  • COMP 308

2
Complete problems
  • A computational problem is complete for a
    complexity class when it is, in a formal sense,
    one of the "hardest" or "most expressive"
    problems in the complexity class.
  • Complexity classes are sets of all of the
    problems that can possibly be solved with at most
    a certain amount of some computational resource,
    and may include problems that actually require
    far less resources.
  • The complete problems, however, are the most
    resource-intensive problems in the class.

3
Complete problems encode all of the difficulty
of the complexity class
  • Besides being very resource-intensive, complete
    problems are very expressive in some sense, they
    "encode" all of the expressiveness or difficulty
    of the complexity class.
  • This is because, given a method of efficiently
    solving a complete problem, we can efficiently
    solve any other problem in the complexity class.
  • So, for example, many of the problems in EXPTIME,
    the exponential time class, are very hard, and we
    could never hope to find efficient solutions for
    them. But if we were given a magic box that
    quickly solved any EXPTIME-complete problem
    (called an oracle machine for that problem), we
    could quickly solve any other problem in EXPTIME

4
Hard and complete problems
  • When a problem has the property that it allows
    you to quickly solve any problem in a complexity
    class, we say that it is hard for that class.
  • Equivalently, we can say that there is a
    reduction from any problem in the class to the
    hard problem.
  • When a problem is both hard for a class, and a
    member of the class, it is complete for that
    class.

5
P (complexity)
  • In computational complexity theory, P is the
    complexity class containing decision problems
    which can be solved by a deterministic Turing
    machine using a polynomial amount of computation
    time, or polynomial time.
  • P is known to contain many natural problems,
    including linear programming, calculating the
    greatest common divisor, and finding a maximum
    matching.
  • In 2002, it was shown that the problem of
    determining if a number is prime is in P.

6
P-complete class
  • In complexity theory, the complexity class
    P-complete is a set of decision problems and is
    useful in the analysis of which problems can be
    efficiently solved on parallel computers.
  • A decision problem is in P-complete if it is
    complete for P, meaning that it is in P, and that
    every problem in P can be reduced to it in
    polylogarithmic time on a parallel computer with
    a polynomial number of processors.
  • In other words, a problem A is in P-complete if,
    for each problem B in P, there are constants c
    and k such that B can be reduced to A in time
    O((log n)c) using O(nk) parallel processors.

7
Motivation
  • The class P, typically taken to consist of all
    the "tractable" problems for a sequential
    computer, contains the class NC, which consists
    of those problems which can be efficiently solved
    on a parallel computer. This is because parallel
    computers can be simulated on a sequential
    machine.
  • It is not known whether NCP. In other words, it
    is not known whether there are any tractable
    problems that are inherently sequential.
  • Just as it is widely suspected that P does not
    equal NP, so it is widely suspected that NC does
    not equal P.

8
P-complete problems
  • The most basic P-complete problem is this
  • Given a Turing machine, an input for that
    machine, and a number T (written in unary), does
    that machine halt on that input within the first
    T steps?
  • It is clear that this problem is P-complete if
    we can parallelize a general simulation of a
    sequential computer, then we will be able to
    parallelize any program that runs on that
    computer.
  • If this problem is in NC, then so is every other
    problem in P.

9
  • This problem illustrates a common trick in the
    theory of P-completeness. We aren't really
    interested in whether a problem can be solved
    quickly on a parallel machine.
  • We're just interested in whether a parallel
    machine solves it much more quickly than a
    sequential machine. Therefore, we have to reword
    the problem so that the sequential version is in
    P. That is why this problem required T to be
    written in unary.
  • If a number T is written as a binary number (a
    string of n ones and zeros, where nlog(T)), then
    the obvious sequential algorithm can take time
    2n. On the other hand, if T is written as a unary
    number (a string of n ones, where nT), then it
    only takes time n. By writing T in unary rather
    than binary, we have reduced the obvious
    sequential algorithm from exponential time to
    linear time. That puts the sequential problem in
    P. Then, it will be in NC if and only if it is
    parallelizable.

10
P-complete problems
  • Many other problems have been proved to be
    P-complete, and therefore are widely believed to
    be inherently sequential. These include the
    following problems, either as given, or in a
    decision-problem form
  • In order to prove that a given problem is
    P-complete, one typically tries to reduce a known
    P-complete problem to the given one, using an
    efficient parallel algorithm.

11
Examples of P-complete problems
  • Circuit Value Problem (CVP) - Given a circuit,
    the inputs to the circuit, and one gate in the
    circuit, calculate the output of that gate
  • Game of Life - Given an initial configuration of
    Conway's Game of Life, a particular cell, and a
    time T (in unary), is that cell alive after T
    steps?
  • Depth First Search Ordering - Given a graph with
    fixed ordered adjacency lists, and nodes u and v,
    is vertex u visited before vertex v in a
    depth-first search?

12
Problems not known to be P-complete
  • Some problems are not known to be either
    NP-complete or P. These problems (e.g. factoring)
    are suspected to be difficult.
  • Similarly there are problems that are not known
    to be either P-complete or NC, but are thought to
    be difficult to parallelize.
  • Examples include the decision problem forms of
    finding the greatest common divisor of two binary
    numbers, and determining what answer the extended
    Euclidean algorithm would return when given two
    binary numbers.

13
Conclusion
  • Just as the class P can be thought of as the
    tractable problems, so NC can be thought of as
    the problems that can be efficiently solved on a
    parallel computer.
  • NC is a subset of P because parallel computers
    can be simulated by sequential ones.
  • It is unknown whether NC P, but most
    researchers suspect this to be false, meaning
    that there are some tractable problems which are
    probably "inherently sequential" and cannot
    significantly be sped up by using parallelism
  • The class P-Complete can be thought of as
    "probably not parallelizable" or "probably
    inherently sequential".
Write a Comment
User Comments (0)
About PowerShow.com