Computational problems in graph theory | Network theory | Graph distance | Hamiltonian paths and cycles | NP-complete problems | Graph algorithms

Longest path problem

In graph theory and theoretical computer science, the longest path problem is the problem of finding a simple path of maximum length in a given graph. A path is called simple if it does not have any repeated vertices; the length of a path may either be measured by its number of edges, or (in weighted graphs) by the sum of the weights of its edges. In contrast to the shortest path problem, which can be solved in polynomial time in graphs without negative-weight cycles, the longest path problem is NP-hard and the decision version of the problem, which asks whether a path exists of at least some given length, is NP-complete. This means that the decision problem cannot be solved in polynomial time for arbitrary graphs unless P = NP. Stronger hardness results are also known showing that it is difficult to approximate. However, it has a linear time solution for directed acyclic graphs, which has important applications in finding the critical path in scheduling problems. (Wikipedia).

Video thumbnail

Longest Simple Path - Intro to Algorithms

This video is part of an online course, Intro to Algorithms. Check out the course here: https://www.udacity.com/course/cs215.

From playlist Introduction to Algorithms

Video thumbnail

Find the Shortest Path - Intro to Algorithms

This video is part of an online course, Intro to Algorithms. Check out the course here: https://www.udacity.com/course/cs215.

From playlist Introduction to Algorithms

Video thumbnail

OCR MEI MwA K: LP Solvers: 05 Longest Path Example 1

https://www.buymeacoffee.com/TLMaths Navigate all of my videos at https://sites.google.com/site/tlmaths314/ Like my Facebook Page: https://www.facebook.com/TLMaths-1943955188961592/ to keep updated Follow me on Instagram here: https://www.instagram.com/tlmaths/ Many, MANY thanks to Dea

From playlist TEACHING OCR MEI Modelling with Algorithms

Video thumbnail

Longest Simple Path - Intro to Algorithms

This video is part of an online course, Intro to Algorithms. Check out the course here: https://www.udacity.com/course/cs215.

From playlist Introduction to Algorithms

Video thumbnail

Find the Shortest Path - Intro to Algorithms

This video is part of an online course, Intro to Algorithms. Check out the course here: https://www.udacity.com/course/cs215.

From playlist Introduction to Algorithms

Video thumbnail

The Shortest Distance Between A and B, with Two Reflections.

We present the solution to the shortest path problem between two given points with the constraint that the path needs to touch both x-axis and y-axis. A related problem is the Heron's shortest path problem. We give an visual animation of the problem and high level proof ideas. Both types

From playlist Geometry Problems for AMC Prep

Video thumbnail

The Shortest Way Home- An Unexpected Result

A story about how I stumbled on a very surprising result on my way home. Apparently math isn't entirely useless! Sorry about the sound :(

From playlist Some fun math videos about approximation

Video thumbnail

Graph Theory: 20. Edge Weighted Shortest Path Problem

This video explains the problem known as the edge-weighted shortest path problem. The next two videos look at an algorithm which provides a solution to the problem. --An introduction to Graph Theory by Dr. Sarada Herke. For quick videos about Math tips and useful facts, check out my othe

From playlist Graph Theory part-4

Video thumbnail

OCR MEI MwA K: LP Solvers: 07 Longest Path Summary

https://www.buymeacoffee.com/TLMaths Navigate all of my videos at https://sites.google.com/site/tlmaths314/ Like my Facebook Page: https://www.facebook.com/TLMaths-1943955188961592/ to keep updated Follow me on Instagram here: https://www.instagram.com/tlmaths/ Many, MANY thanks to Dea

From playlist TEACHING OCR MEI Modelling with Algorithms

Video thumbnail

16. Dynamic Programming, Part 2: LCS, LIS, Coins

MIT 6.006 Introduction to Algorithms, Spring 2020 Instructor: Erik Demaine View the complete course: https://ocw.mit.edu/6-006S20 YouTube Playlist: https://www.youtube.com/playlist?list=PLUl4u3cNGP63EdVPNLG3ToM6LaEUuStEY This is the second of four lectures on dynamic programming. This int

From playlist MIT 6.006 Introduction to Algorithms, Spring 2020

Video thumbnail

5 Simple Steps for Solving Dynamic Programming Problems

In this video, we go over five steps that you can use as a framework to solve dynamic programming problems. You will see how these steps are applied to two specific dynamic programming problems: the longest increasing subsequence problem and optimal box stacking. The five steps in order ar

From playlist Problem Solving

Video thumbnail

CMU Discrete Mathematics 4/7

Due to the COVID-19 pandemic, Carnegie Mellon University is protecting the health and safety of its community by holding all large classes online. People from outside Carnegie Mellon University are welcome to tune in to see how the class is taught, but unfortunately Prof. Loh will not be o

From playlist CMU 21-228 Discrete Mathematics

Video thumbnail

How to Use Beads and Strings to Find the Diameter of a Tree

This video was made for the Summer of Math Exposition 1. Check out other cool videos there! https://www.3blue1brown.com/blog/some1 #SoME1 To make this video, we used manim: https://docs.manim.community/en/stable/ Our video is based on the following great book: Explaining Algorithms Using

From playlist Algorithms

Video thumbnail

Data Science with Mathematica -- Dynamic Programming

In this session of my Data Science with Mathematica track I provide an introduction to Dynamic Programming for the Data Scientist. DP is a very important, practical, flexible, and code-efficient way to solve problems in combinatorial optimization. Its applicability covers many fields: oper

From playlist Data Science with Mathematica

Video thumbnail

Graph Alg. IV: Intro to geometric algorithms - Lecture 9

All rights reserved for http://www.aduni.org/ Published under the Creative Commons Attribution-ShareAlike license http://creativecommons.org/licenses/by-sa/2.0/ Tutorials by Instructor: Shai Simonson. http://www.stonehill.edu/compsci/shai.htm Visit the forum at: http://www.coderisland.c

From playlist ArsDigita Algorithms by Shai Simonson

Video thumbnail

Proof: Two Longest Paths Have a Common Vertex | Graph Theory, Connected Graphs

In any connected graph, two longest paths will always have a common vertex! We'll prove this theorem in today's video graph theory lesson using contradiction! We suppose we have two longest paths in a connected graph that do NOT have a common vertex, and we'll be able to find a longer pat

From playlist Graph Theory

Video thumbnail

[Rust Programming] Advent of Code 2016 Day 17 - Two Steps Forward

My Rust solution for Day 17 of Advent of Code 2016. [NOTE: This video was streamed November 2022] I livestream these on twitch when I can, on occasional weekday mornings, starting between 7 and 7:30am Eastern/US time. I usually stream for about 1-2 hours, depending on how well my voice

From playlist Advent of Code 2016

Video thumbnail

OCR MEI MwA K: LP Solvers: 06 Longest Path Example 2

https://www.buymeacoffee.com/TLMaths Navigate all of my videos at https://sites.google.com/site/tlmaths314/ Like my Facebook Page: https://www.facebook.com/TLMaths-1943955188961592/ to keep updated Follow me on Instagram here: https://www.instagram.com/tlmaths/ Many, MANY thanks to Dea

From playlist TEACHING OCR MEI Modelling with Algorithms

Video thumbnail

19. Network routing (without failures)

MIT 6.02 Introduction to EECS II: Digital Communication Systems, Fall 2012 View the complete course: http://ocw.mit.edu/6-02F12 Instructor: Hari Balakrishnan This lecture covers networking routing in multi-hop networks. After an interactive simulation game, distributed routing, distance-v

From playlist MIT 6.02 Introduction to EECS II: Digital Communication Systems, Fall 2012

Related pages

Graph (discrete mathematics) | Travelling salesman problem | Snake-in-the-box | Gallai–Hasse–Roy–Vitaver theorem | Hamiltonian path problem | Partially ordered set | Planar graph | Permutation graph | Decision problem | Theoretical computer science | Critical path method | Cactus graph | Hypercube graph | Split graph | Depth-first search | Dynamic programming | Path (graph theory) | Complement graph | Citation graph | Hasse diagram | Ptolemaic graph | Graph theory | Circular-arc graph | Bipartite graph | Block graph | Vertex (graph theory) | Circle graph | Clique-width | Complete graph | Topological sorting | Color-coding | Graph coloring | Interval graph | Approximation algorithm | Directed acyclic graph | Induced path | Time complexity | Treewidth | Distance-hereditary graph | Price's model | Comparability graph | Longest uncrossed knight's path | Trémaux tree | Shortest path problem | Parameterized complexity