Longest path problem

Longest path problem

In graph theory, the longest path problem is a problem of finding the longest path in a graph. Unlike the shortest path problem, this problem is NP-complete which means that the optimal solution cannot be found in polynomial time unless P=NP.

The longest path problem has an efficient dynamic programming solution in a directed acyclic graph using topological sort. It can also be solved by inverting the weights and using the Bellman-Ford algorithm (this approach does not work in general because it creates negative-weight cycles).

Related problems

* Travelling salesman problem
* Shortest path problem

External links

* [http://www.ics.uci.edu/~eppstein/161/960312.html NP-Completeness]


Wikimedia Foundation. 2010.

Игры ⚽ Поможем написать реферат

Look at other dictionaries:

  • Shortest path problem — A graph with 6 vertices and 7 edges In graph theory, the shortest path problem is the problem of finding a path between two vertices (or nodes) in a graph such that the sum of the weights of its constituent edges is minimized. An example is… …   Wikipedia

  • Longest uncrossed knight's path — The longest uncrossed (or nonintersecting) knight s path is a mathematical problem involving a knight on a standard 8 times; 8 chessboard or, more generally, on a square n times; n board. The problem is to find the longest path the knight can… …   Wikipedia

  • Longest common subsequence problem — Not to be confused with longest common substring problem. The longest common subsequence (LCS) problem is to find the longest subsequence common to all sequences in a set of sequences (often just two). Note that subsequence is different from a… …   Wikipedia

  • Travelling salesman problem — The travelling salesman problem (TSP) is an NP hard problem in combinatorial optimization studied in operations research and theoretical computer science. Given a list of cities and their pairwise distances, the task is to find a shortest… …   Wikipedia

  • Hamiltonian path — This article is about the overall graph theory concept of a Hamiltonian path. For the specific problem of determining whether a Hamiltonian path or cycle exists in a given graph, see Hamiltonian path problem. A Hamiltonian cycle in a dodecahedron …   Wikipedia

  • Induced path — An induced path of length four in a cube. Finding the longest induced path in a hypercube is known as the snake in the box problem. In the mathematical area of graph theory, an induced path in an undirected graph G is a path that is an induced… …   Wikipedia

  • Clique problem — The brute force algorithm finds a 4 clique in this 7 vertex graph (the complement of the 7 vertex path graph) by systematically checking all C(7,4)=35 4 vertex subgraphs for completeness. In computer science, the clique problem refers to any of… …   Wikipedia

  • Chess problem — Part of a series on Puzzles …   Wikipedia

  • List of mathematics articles (L) — NOTOC L L (complexity) L BFGS L² cohomology L function L game L notation L system L theory L Analyse des Infiniment Petits pour l Intelligence des Lignes Courbes L Hôpital s rule L(R) La Géométrie Labeled graph Labelled enumeration theorem Lack… …   Wikipedia

  • Dijkstra's algorithm — Not to be confused with Dykstra s projection algorithm. Dijkstra s algorithm Dijkstra s algorithm runtime Class Search algorithm Data structure Graph Worst case performance …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”