Graph algorithms | NP-complete problems

Zero-weight cycle problem

In computer science and graph theory, the zero-weight cycle problem is the problem of deciding whether a directed graph with weights on the edges (which may be positive or negative or zero) has a cycle in which the sum of weights is 0. A related problem is to decide whether the graph has a cycle in which the sum of weights is less than 0. This related problem can be solved in polynomial time using the Bellman–Ford algorithm. In contrast, detecting a cycle of weight exactly 0 is an NP-complete problem. The problem is in NP since, given a cycle, it is easy to verify that its weight is 0. The proof of NP-hardness is by reduction from the subset sum problem. In this problem we are given a set of numbers, positive and some negative, and have to decide whether there exists a subset whose sum is exactly 0. Given an instance of subset-sum with n numbers, construct an instance of zero-weight-cycle as follows. Construct a graph with 2n vertices. For each number ai the graph contains two vertices: ui and vi. From each ui, there is only one outgoing edge, which goes to vi and has weight ai. From each vi, there are n outgoing edges, which go to each uj and have weights 0. Any cycle in this graph have the form u1-v1-u2-v2-...-uk-vk. The weight of a cycle is 0, iff the sum of all weights between each ui and its corresponding vi is 0, iff the sum of all corresponding ai is 0, iff there is a subset with a sum of 0. (Wikipedia).

Video thumbnail

What is the multiplicity of a zero?

👉 Learn about zeros and multiplicity. The zeroes of a polynomial expression are the values of x for which the graph of the function crosses the x-axis. They are the values of the variable for which the polynomial equals 0. The multiplicity of a zero of a polynomial expression is the number

From playlist Zeros and Multiplicity of Polynomials | Learn About

Video thumbnail

What are zeros of a polynomial

👉 Learn about zeros and multiplicity. The zeroes of a polynomial expression are the values of x for which the graph of the function crosses the x-axis. They are the values of the variable for which the polynomial equals 0. The multiplicity of a zero of a polynomial expression is the number

From playlist Zeros and Multiplicity of Polynomials | Learn About

Video thumbnail

What is multiplicity and what does it mean for the zeros of a graph

👉 Learn about zeros and multiplicity. The zeroes of a polynomial expression are the values of x for which the graph of the function crosses the x-axis. They are the values of the variable for which the polynomial equals 0. The multiplicity of a zero of a polynomial expression is the number

From playlist Zeros and Multiplicity of Polynomials | Learn About

Video thumbnail

Overview of Multiplicity of a zero - Online Tutor - Free Math Videos

👉 Learn about zeros and multiplicity. The zeroes of a polynomial expression are the values of x for which the graph of the function crosses the x-axis. They are the values of the variable for which the polynomial equals 0. The multiplicity of a zero of a polynomial expression is the number

From playlist Zeros and Multiplicity of Polynomials | Learn About

Video thumbnail

Learn how and why multiplicity of a zero make sense

👉 Learn about zeros and multiplicity. The zeroes of a polynomial expression are the values of x for which the graph of the function crosses the x-axis. They are the values of the variable for which the polynomial equals 0. The multiplicity of a zero of a polynomial expression is the number

From playlist Zeros and Multiplicity of Polynomials | Learn About

Video thumbnail

Overview of zeros of a polynomial - Online Tutor - Free Math Videos

👉 Learn about zeros and multiplicity. The zeroes of a polynomial expression are the values of x for which the graph of the function crosses the x-axis. They are the values of the variable for which the polynomial equals 0. The multiplicity of a zero of a polynomial expression is the number

From playlist Zeros and Multiplicity of Polynomials | Learn About

Video thumbnail

Tao Hou (5/13/20): Computing minimal persistent cycles: Polynomial and hard cases

Title: Computing minimal persistent cycles: Polynomial and hard cases Abstract: Persistent cycles, especially the minimal ones, are useful geometric features functioning as augmentations for the intervals in the purely topological persistence diagrams (also termed as barcodes). In our ear

From playlist AATRN 2020

Video thumbnail

Why is dividing by zero undefined

👉 Learn about zeros and multiplicity. The zeroes of a polynomial expression are the values of x for which the graph of the function crosses the x-axis. They are the values of the variable for which the polynomial equals 0. The multiplicity of a zero of a polynomial expression is the number

From playlist Zeros and Multiplicity of Polynomials | Learn About

Video thumbnail

What is a polynomial function

👉 Learn about zeros and multiplicity. The zeroes of a polynomial expression are the values of x for which the graph of the function crosses the x-axis. They are the values of the variable for which the polynomial equals 0. The multiplicity of a zero of a polynomial expression is the number

From playlist Zeros and Multiplicity of Polynomials | Learn About

Video thumbnail

Bipartite perfect matching is in quasi-NC - Fenner

Computer Science/Discrete Mathematics Seminar I Topic: Bipartite perfect matching is in quasi-NC Speaker: Stephen Fenner Date:Monday, February 8 We show that the bipartite perfect matching problem is in quasi 𝖭𝖢2quasi-NC2. That is, it has uniform circuits of quasi-polynomial size and O(

From playlist Mathematics

Video thumbnail

Lec 18 | MIT 6.046J / 18.410J Introduction to Algorithms (SMA 5503), Fall 2005

Lecture 18: Shortest Paths II: Bellman-Ford, Linear Programming, Difference Constraints View the complete course at: http://ocw.mit.edu/6-046JF05 License: Creative Commons BY-NC-SA More information at http://ocw.mit.edu/terms More courses at http://ocw.mit.edu

From playlist MIT 6.046J / 18.410J Introduction to Algorithms (SMA 5503),

Video thumbnail

12. Bellman-Ford

MIT 6.006 Introduction to Algorithms, Spring 2020 Instructor: Jason Ku View the complete course: https://ocw.mit.edu/6-006S20 YouTube Playlist: https://www.youtube.com/playlist?list=PLUl4u3cNGP63EdVPNLG3ToM6LaEUuStEY This lecture introduces a single source shortest path algorithm that wor

From playlist MIT 6.006 Introduction to Algorithms, Spring 2020

Video thumbnail

14. APSP and Johnson

MIT 6.006 Introduction to Algorithms, Spring 2020 Instructor: Jason Ku View the complete course: https://ocw.mit.edu/6-006S20 YouTube Playlist: https://www.youtube.com/playlist?list=PLUl4u3cNGP63EdVPNLG3ToM6LaEUuStEY This lecture focuses on solving any all-pairs shortest paths (APSP) in w

From playlist MIT 6.006 Introduction to Algorithms, Spring 2020

Video thumbnail

The Matching Problem in General Graphs is in Quasi-NC - Ola Svensson

Computer Science/Discrete Mathematics Seminar I Topic: The Matching Problem in General Graphs is in Quasi-NC Speaker: Ola Svensson Affiliation: École polytechnique fédérale de Lausanne Date: January 22, 2018 For more videos, please visit http://video.ias.edu

From playlist Mathematics

Video thumbnail

13. Dijkstra

MIT 6.006 Introduction to Algorithms, Spring 2020 Instructor: Jason Ku View the complete course: https://ocw.mit.edu/6-006S20 YouTube Playlist: https://www.youtube.com/playlist?list=PLUl4u3cNGP63EdVPNLG3ToM6LaEUuStEY This class discusses a fourth weighted single-source shortest path algor

From playlist MIT 6.006 Introduction to Algorithms, Spring 2020

Video thumbnail

Lecture 13 - Minimum Spanning Trees I

This is Lecture 13 of the CSE373 (Analysis of Algorithms) course taught by Professor Steven Skiena [http://www3.cs.stonybrook.edu/~skiena/] at Stony Brook University in 2016. The lecture slides are available at: https://www.cs.stonybrook.edu/~skiena/373/newlectures/lecture13.pdf More inf

From playlist CSE373 - Analysis of Algorithms 2016 SBU

Video thumbnail

What do the zeros roots tell us of a polynomial

👉 Learn about zeros and multiplicity. The zeroes of a polynomial expression are the values of x for which the graph of the function crosses the x-axis. They are the values of the variable for which the polynomial equals 0. The multiplicity of a zero of a polynomial expression is the number

From playlist Zeros and Multiplicity of Polynomials | Learn About

Video thumbnail

Minimal Cycle Representatives from Persistent Homology [Lu Li]

In this video, I'll give a brief introduction to minimal cycle representatives from persistent homology. In particular, I'll present four algorithms for finding minimal cycle representatives via linear programming: uniform-weighted edge-loss methods, length-weighted edge-loss methods, unif

From playlist Tutorial-a-thon 2021 Fall

Related pages

Bellman–Ford algorithm | Graph theory | Cycle (graph theory) | Directed graph | Subset sum problem