1 / 8

Sequential Parallel Algorithms

Sequential Parallel Algorithms. Two kinds of Big-O (Big- ) performance: sequential performance parallel performance. Most (sequential) computer programs run in polynomial time. A problem known to be solvable by a polynomial time algorithm

Télécharger la présentation

Sequential Parallel Algorithms

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Sequential Parallel Algorithms Two kinds of Big-O (Big-) performance: sequential performance parallel performance

  2. Most (sequential) computer programs run in polynomial time. A problem known to be solvable by a polynomial time algorithm is called a Polynomial Problem (P problem). Polynomial Algorithms Algorithms that are worse than polynomial are often called superpolynomial or exponential.

  3. Most computer programs are deterministic • the program’s execution is determined • unambiguously by its code. Prior analysis assumes such determinism. Nondeterminism A nondeterministic algorithm is one that “guesses”.

  4. P Problems A problem is said to be nondeterministic polynomial (NP) if there exists a sequential nondeterministic algorithm to solve this problem with polynomial performance. Nondeterminisic Polynomial Such problems are called NP Problems. P  NP ?

  5. NP-completeness • The theory of NP-completeness is a solution to the practical problem of applying complexity theory to individual problems. NP-complete problems are defined in a precise sense as the hardest problems in P. Even though we don't know whether there is any problem in NP that is not in P, we can point to an NP-complete problem and say that if there are any hard problems in NP, that problems is one of the hard ones.

  6. Given a set of integers S = {s1, s2, s3, ... sk}, and an integer J, does a subset of S exist such that J = the sum of all values in the subset? NP Complete Problems Given a map (digraph with weighted arcs) of cities and connecting roads, what is the minimum cost walk that begins and ends at the same city and visits each city exactly once? (This is also known as a Hamiltonian cycle.) Does a given digraph contain a Hamiltonian cycle?

  7. Suppose you have a problem to solve, and you want to know if it is NP-complete. This takes two steps: • Prove that it is in NP. Typically the problem is couched as a yes or no problem involving a data structure, such as ``does there exist a simple cycle through a given directed graph?'' To prove it is in NP, you need to show that a yes solution can be checked in polynomial time. In the above example, you can check to see if a given path through the graph is indeed a simple cycle in linear time. Therefore, the problem is in NP. You don't have to prove anything about the no solutions.

  8. Second Step • Prove that you can transform any NP-complete problem to this problem in polynomial time. Suppose the problem in question is Q, and the P is a well-known NP-complete problem. You need to show that if you have any instance of problem P, you can transform it into an instance of problem Q in polynomial time. Thus, if you could solve problem Q in polynomial time, you could solve problem P in polynomial time.

More Related