NP-hard - Pheeds.com


NP-hard - NP-hard In computational complexity theory, NP-hard (Non-deterministic Polynomial-time hard) refers to the class of decision problems that contains all problems H such that for all decision problems L in NP there is a polynomial-time many-one reduction to H. Informally this class can be described as containing the decision problems that are at least as hard as any problem in NP. This intuition is supported by the fact that if we can find an algorithm A that solves one of these problems H in polynomial time then we can construct a polynomial time algorithm for every problem in NP by first executing the reduction from this problem to H and then executing the algorithm A. Assuming language L to be NP-complete, 1. L is in NP 2..

Complexity classes P and NP - Complexity classes P and NP Computational complexity theory is part of the theory of computation dealing with the resources required during computation to solve a given problem. The most common resources are time (how many steps does it take to solve a problem) and space (how much memory does it take to solve a problem). In this theory, the class P consists of all those decision problems that can be solved on a deterministic sequential machine in an amount of time that is polynomial in the size of the input; the class NP consists of all those decision problems whose positive solutions can be verified in polynomial time given the right information, or equivalently, whose solution can be found in polynomial time on a non-deterministic machine. The biggest.

NP-complete - NP-complete In complexity theory, the NP-complete problems are the hardest problems in NP, in the sense that they are the ones most likely not to be in P. The reason is that if you could find a way to solve an NP-complete problem quickly, then you could use that algorithm to solve all NP problems quickly. (A more formal definition is given below. See also Complexity classes P and NP). One example of an NP-complete problem is the subset sum problem which is: given a finite set of integers, determine whether any non-empty subset of them adds up to zero. A supposed answer is very easy to verify for correctness, but no-one knows a faster way to solve the problem than to try every single possible.

NP-easy - NP-easy In complexity theory, NP-easy is a set of problems similar to NP, except that NP-easy problems do not have to be decision problems. A problem X is in NP-easy if and only if there exists some problem Y in NP such that X is Turing reducible to Y. This means that given a black box that solves instances of Y in unit time, there exists an algorithm that solves X in polynomial time by repeatedly using that black box. An example of an NP-easy problem is the problem of sorting a list of strings. The decision problem "is string A greater than string B" is in NP. There are algorithms such as Quicksort that can sort the list using only a polynomial number of calls.

NP-equivalent - NP-equivalent In complexity theory, NP-equivalent is the set of problems that are both NP-easy and NP-hard. NP-equivalent is similar to NP-complete, except the problems in NP-equivalent do not have to be decision problems. For example, the problem FIND-SUBSET-SUM is in NP-equivalent. Given a set of integers, FIND-SUBSET-SUM is the problem of finding some subset of the integers that adds up to zero (or returning the empty set if there is no such subset). This optimization problem is similar to the decision problem SUBSET-SUM. Given a set of integers, SUBSET-SUM is the problem of finding whether there exists a subset summing to zero. SUBSET-SUM is NP-complete. To show that FIND-SUBSET-SUM is NP-equivalent, we must show that it is both NP-hard and NP-easy. Clearly it is NP-hard. If.

Knapsack problem - = V Notice that in this special case, the problem is equivalent to this: given a set of integers, does any subset of it add up to exactly C? Or, if negative costs are allowed and C is chosen to be zero, the problem is: given a set of integers, does any subset add up to exactly 0? This special case is called the subset sum problem. For some reason, it is traditional in cryptography to say "knapsack problem" when it is actually the "subset sum problem" that is meant. The knapsack problem is often solved using dynamic programming, though no polynomial-time algorithm is known for the general problem. Both the general knapsack problem and the subset sum problem are NP-hard, and this has led to attempts to use subset sum.

Integer factorization - relevant for many modern systems in cryptography. If a fast method were found for solving the integer factorization problem, then several important cryptographic systems would be broken, including the RSA public-key algorithm and the Blum Blum Shub random number generator. Although fast factoring is one way to break these systems, there may be other ways to break them that don't involve factoring. So it is possible that the integer factorization problem is truly hard, yet these systems can still be broken quickly. A rare exception is the Blum Blum Shub generator. It has been proved to be exactly as hard as integer factorization. There is no way to break it without also solving integer factorization quickly. If a large, n-bit number is the product of two primes that are roughly the.

Graph coloring - microprocessor, frequency assignment in mobile radios, and pattern matching. In general, techniques for graph coloring concentrate on finding the least number of colors needed to color the graph ie. its chromatic number . For example the chromatic number of a complete graph of vertices(a graph with an edge between every two vertices), is . The problem of finding a minimum coloring of a graph is NP-hard. The corresponding decision problem(Is there a coloring which uses at most colors?) is NP-complete. There are however some efficient approximation algorithms that employ Semidefinite programming. Some properties of 1. iff G is totally disconnected. 2. iff G has a cycle of odd length 3. is greater than the cardinality of the largest complete subgraph of G. 4. ,where is the maximum degree of any vertex.

Dijkstra's algorithm - ej to S maintains the property that the distances of all the vertices within S from s are known to be minimum. A few subroutines for use with Dijkstra's algorithm: Initialize-Single-Source(G,s) 1 for each vertex v in V[G] 2 do d[v] := infinite 3 previous[v] := 0 4 d[s] := 0 Relax(u,v,w) 1 if d[v] > d[u] + w(u,v) 2 then d[v] := d[u] + w(u,v) 3 previous[v] := u v = Extract-Min(Q) searches for the vertex v in the vertex set Q that has the least d[v] value. That vertex is removed from the set Q and then returned. The algorithm: Dijkstra(G,w,s) 1 Initialize-Single-Source(G,s) 2 S := empty set 3 Q := set of all vertexes 4 while Q is not an empty set 5 do u := Extract-Min(Q) 6.

Tetris - approximation of gravity (see above) forces the player to leave a hole in a corner. Suppose you then get a large sequence of identical Z-shaped pieces. Eventually, you'll be forced to leave a hole in the opposite corner, without clearing your previous hole. Now, things go back to the original orientation for a while and so on until the pieces stack up to the top. Since the pieces are distributed randomly, this sequence will, eventually, occur. So, if you play long enough, and your random number source is theoretically perfect, you will lose the game. (See also a more detailed discussion of this issue at http://www.geom.umn.edu/java/tetris/explanation.html, along with an implementation written in Java that has been modified to deal only S and Z pieces.) Practically, this does not occur because the.

Automatic label placement - - require good placement of labels. Naively placed labels overlap a lot, resulting in a map that's very hard to read. Therefore, a GIS must allow a few possible placements of each label, and often also an option of resizing, rotating, or even removing the label. Then, it must select a set of placements that results in the least overlap, and has other desirable properties. For every but the most trivial setups, the problem is NP-Hard. The simplest greedy algorithm places consecutive labels on the map in positions that result in minimal extra overlap of labels. Its results are not satisfactory even for very simple problems, but it is extremely fast. Slightly more complex algorithms rely on local optimization to reach a local optimum of a placement evaluation function - in.

Bottleneck traveling salesman problem - as follows: Find the Hamiltonian cycle in a weighted graph with the minimal length of the longest edge. The problem is known to be NP-hard. Related topics Travelling salesman problem.

Computational complexity theory - exactly in the middle - then the problem is reduced to the half). Decision problems Much of complexity theory deals with decision problems. A decision problem is a problem where the answer is always YES/NO. For example, the problem IS-PRIME is: given an integer written in binary, return whether it is a prime number or not. A decision problem is equivalent to a language, which is a set of finite-length strings. For a given decision problem, the equivalent language is the set of all strings for which the answer is YES. Decision problems are often considered because an arbitrary problem can always be reduced to a decision problem. For example, the problem HAS-FACTOR is: given integers n and k written in binary, return whether n has any prime factors less than.

Collision detection - posteriori algorithms. n-body pruning For problems where several bodies are moving at the same time (such as billiards,) a preliminary pruning step serves to reduce the number of pairs of objects we need to consider for collision. If one has objects then there are pairs of objects that could possibly collide. One can iterate through all such pairs, and this gives an algorithm. In our billiards example, say there are thirteen balls on the table, then ninety-one pairs of balls need to be checked. However, if there are seven balls in the north half of the table, and six in the south half, then we only need to check the seven balls in the north half against each other, and the six balls in the south half against each other. In.

Combinatorial search - artificial intelligence, mathematics and software engineering. Combinatorial search algorithms solve instances of problems that are believed to be hard in general, by exploring the usually-large solution space of these instances. Combinatorial search algorithms achieve this by reducing the effective size of the space, and by exploring the space efficiently. Combinatorial search algorithms are normally implemented in an efficient imperative programming language, in an expressive declarative programming language such as Prolog, or some compromise, perhaps a functional programming language such as LISP or Haskell. Classic combinatorial search problems include the Eight Queens Puzzle. See also Brute-force search. A study of Computational complexity theory helps to motivate combinatorial search. Combinatorial search algorithms are typically concerned with problems that are NP-hard. Such problems are not believed to be efficiently solvable in general. However, the.

Traveling salesman problem - with the minimal length of the longest edge. Table of contents showTocToggle("show","hide") 1 Computational complexity 2 Algorithms 2.1 Exact algorithms 2.2 Heuristics 2.3 Special cases 2.3.1 TSP with triangle inequality 3 External Links Computational complexity The most direct solution would be to try all the combinations and see which one is cheapest, but given that the number of combinations is N! (the factorial of the number of cities), this solution rapidly becomes impractical. The problem has been shown to be NP-hard, and the decision version of it ("given the costs and a number x, decide whether there is a roundtrip route cheaper than x") is NP-complete. The bottleneck TSP is also NP-hard. The problem is of considerable practical importance, for example in printed circuit assembly automation, where holes or component locations.

Sharp-P - in complexity theory. It is the set of counting problems associated with the decision problems in the set NP. An NP problem is often of the form: Are there any solutions that satisfy certain constraints? For example: Are there any subsets of a list of integers that add up to zero? (subset sum problem) Are there any Hamiltonian cycles in a given graph with cost less than 100? (traveling salesman problem) Are there any variable assignments that satisfy a given DNF formula? (Boolean satisfiability problem) The corresponding #P problems ask "how many" rather than "are there any". For example: How many subsets of a list of integers add up to zero? How many Hamiltonian cycles in a given graph have cost less than 100? How many variable assignments satisfy a given.

Shortest path problem - all edge weights are greater than or equal to zero is Dijkstra's algorithm. Without worsening the run time, this algorithm can in fact compute the shortest paths from a given start point s to all other nodes. Another algorithm is the A* algorithm (or A* pathing algorithm.) A related problem is the traveling salesman problem, which is the problem of finding the shortest path that goes through every node exactly once, and returns to the start. That problem is NP-hard, so there is no known way to solve it in polynomial time..

Partition - which for every positive integer gives the number of different ways to partition that number (in the sense above). A partition of unity is a any set of functions whose sum is the constant function 1. The PARTITION problem is to divide a list of positive integers into two parts so that the sums of the numbers in the two parts are equal. It is a common example of an NP-complete problem, often useful in proving that other problems are NP-complete. Computer science Hard disk drive partitioning, dividing a hard disk storage space into independent parts called "partitions". Partition (IBM PC), one of those storage space parts. for dividing a big computer (e.g. a mainframe) into several independent virtual computers, see also LPAR, IBM mainframe, Sun E10.000, HP-UX. Some vendors (e.g..

Politics of Taiwan - election. The Control Yuan (CY) monitors the efficiency of public service and investigates instances of corruption. The 29 Control Yuan members are appointed by the president and approved by the Legislative Yuan; they serve 6-year terms. In recent years, the Control Yuan has become more activist, and it has conducted several major investigations and impeachments. The Judicial Yuan (JY) administers the ROC's court system. It includes a 16-member Council of Grand Justices (COGJ) that interprets the constitution. Grand Justices are appointed by the President, with the consent of the Legislative Yuan, to 9-year terms. The Examination Yuan (ExY) functions as a civil service commission and includes two ministries: the Ministry of Examination, which recruits officials through competitive examination, and the Ministry of Personnel, which manages the civil service. The President appoints.


©2004 and beyond - Pheeds.com