Lecture 38 CSE 331 Dec 5, 2012. OHs today (only online 9:30-11)

Slides:



Advertisements
Similar presentations
Single Source Shortest Paths
Advertisements

CSE332: Data Abstractions Lecture 27: A Few Words on NP Dan Grossman Spring 2010.
Lecture 40 CSE 331 Dec 11, Announcements Solutions to HW 10 and graded HW 9 at end of the lecture Review session on Monday: see blog for details.
Hardness Results for Problems P: Class of “easy to solve” problems Absolute hardness results Relative hardness results –Reduction technique.
Lecture 38 CSE 331 Dec 7, The last few days Today: Solutions to HW 9 (end of lecture) Wednesday: Graded HW 9 (?), Sample final, Blog post on the.
Lecture 26 CSE 331 Nov 4, The week of Nov 16 Jeff will be out of town for a conference Recitations and office hour cancelled for that week Two extra.
Lecture 28 CSE 331 Nov 9, Flu and HW 6 Graded HW 6 at the END of the lecture If you have the flu, please stay home Contact me BEFORE you miss a.
Lecture 40 CSE 331 Dec 8, Finals 3:35-6:05pm KNOX 104 Tue, Dec 14 Blog post on the finals up.
NP-Complete Problems Reading Material: Chapter 10 Sections 1, 2, 3, and 4 only.
NP-Complete Problems Problems in Computer Science are classified into
CSE 326: Data Structures NP Completeness Ben Lerner Summer 2007.
Lecture 38 CSE 331 Dec 3, A new grading proposal Towards your final score in the course MAX ( mid-term as 25%+ finals as 40%, finals as 65%) .
Lecture 39 CSE 331 Dec 6, On Friday, Dec 10 hours-a-thon Atri: 2:00-3:30 (Bell 123) Jeff: 4:00-5:00 (Bell 224) Alex: 5:00-6:30 (Bell 242)
Lecture 24 CSE 331 Oct 30, Homework stuff Please turn in your HW 6 Graded HW 5 and HW 7 at the END of the lecture.
CSE 421 Algorithms Richard Anderson Lecture 27 NP Completeness.
Lecture 34 CSE 331 Nov 30, Graded HW 8 On Wednesday.
Lecture 39 CSE 331 Dec 9, Announcements Please fill in the online feedback form Sample final has been posted Graded HW 9 on Friday.
Hardness Results for Problems P: Class of “easy to solve” problems Absolute hardness results Relative hardness results –Reduction technique.
Lecture 28 CSE 331 Nov 5, HW 7 due today Q1 in one pile and Q 2+3 in another I will not take any HW after 1:15pm.
Hardness Results for Problems
Lecture 27 CSE 331 Nov 6, Homework related stuff Solutions to HW 7 and HW 8 at the END of the lecture Turn in HW 7.
MCS312: NP-completeness and Approximation Algorithms
CSCI 2670 Introduction to Theory of Computing November 29, 2005.
More Computational Complexity Shirley Moore CS4390/5390 Fall August 29,
1 CPSC 320: Intermediate Algorithm Design and Analysis July 28, 2014.
CSCI 3160 Design and Analysis of Algorithms Tutorial 10 Chengyu Lin.
1 Design and Analysis of Algorithms Yoram Moses Lecture 11 June 3, 2010
Lecture 38 CSE 331 Dec 2, Review Sessions etc. Atri: (at least ½ of) class next Friday Jiun-Jie: Extra office hour next Friday Jesse: Review Session.
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness and course wrap up.
Lecture 23 CSE 331 Oct 24, Reminder 2 points for Piazza participation 3 points for mini-project.
CSCI 2670 Introduction to Theory of Computing November 17, 2005.
CS6045: Advanced Algorithms NP Completeness. NP-Completeness Some problems are intractable: as they grow large, we are unable to solve them in reasonable.
Young CS 331 D&A of Algo. NP-Completeness1 NP-Completeness Reference: Computers and Intractability: A Guide to the Theory of NP-Completeness by Garey and.
Computational Complexity Shirley Moore CS4390/5390 Fall 2013 August 27, 2013.
CSE 331: Review.
Lecture. Today Problem set 9 out (due next Thursday) Topics: –Complexity Theory –Optimization versus Decision Problems –P and NP –Efficient Verification.
Lecture 20 CSE 331 July 30, Longest path problem Given G, does there exist a simple path of length n-1 ?
Lecture 33 CSE 331 Nov 20, HW 8 due today Place Q1, Q2 and Q3 in separate piles I will not accept HWs after 1:15pm Submit your HWs to the side of.
COSC 3101A - Design and Analysis of Algorithms 14 NP-Completeness.
P, NP, and NP-Complete Problems Section 10.3 The class P consists of all problems that can be solved in polynomial time, O(N k ), by deterministic computers.
34.NP Completeness. Computer Theory Lab. Chapter 34P.2.
CSE 331: Review August 1, Main Steps in Algorithm Design Problem Statement Algorithm Real world problem Problem Definition Precise mathematical.
ICS 353: Design and Analysis of Algorithms NP-Complete Problems King Fahd University of Petroleum & Minerals Information & Computer Science Department.
Lecture 32 CSE 331 Nov 16, 2016.
Lecture 5 Dynamic Programming
Lecture 23 CSE 331 Oct 26, 2016.
Lecture 5 Dynamic Programming
CSCI 2670 Introduction to Theory of Computing
Lecture 36 CSE 331 Nov 29, 2017.
Lecture 36 CSE 331 Nov 30, 2016.
Lecture 35 CSE 331 Nov 27, 2017.
Lecture 34 CSE 331 Nov 20, 2017.
Lecture 33 CSE 331 Nov 18, 2016.
Lecture 35 CSE 331 Nov 28, 2016.
Lecture 37 CSE 331 Dec 1, 2017.
Lecture 23 CSE 331 Oct 25, 2017.
Lecture 23 CSE 331 Oct 24, 2011.
Lecture 37 CSE 331 Nov 30, 2011.
Dynamic Programming Longest Path in a DAG, Yin Tat Lee
Lecture 32 CSE 331 Nov 15, 2017.
Lecture 34 CSE 331 Nov 21, 2016.
Lecture 22 CSE 331 Oct 15, 2014.
NP-Completeness Reference: Computers and Intractability: A Guide to the Theory of NP-Completeness by Garey and Johnson, W.H. Freeman and Company, 1979.
Lecture 39 CSE 331 Dec 5, 2011.
Lecture 36 CSE 331 Nov 28, 2011.
Lecture 36 CSE 331 Nov 30, 2012.
Lecture 37 CSE 331 Dec 2, 2016.
Lecture 40 CSE 331 Dec 7, 2011.
Lecture 36 CSE 331 Nov 22, 2013.
Lecture 37 CSE 331 Dec 3, 2018.
Presentation transcript:

Lecture 38 CSE 331 Dec 5, 2012

OHs today (only online 9:30-11)

Extra OH this week

Shortest Path Problem Input: (Directed) Graph G=(V,E) and for every edge e has a cost c e (can be <0) t in V Output: Shortest path from every s to t s t Shortest path has cost negative infinity Assume that G has no negative cycle

When to use Dynamic Programming There are polynomially many sub-problems Optimal solution can be computed from solutions to sub-problems There is an ordering among sub-problem that allows for iterative solution Richard Bellman

Recurrence Relation OPT(i,u) = cost of shortest path from u to t with at most i edges OPT(i,u) = min { OPT(i-1,u), min (u,w) in E { c u,w + OPT(i-1, w) } } Path uses ≤ i-1 edges Best path through all neighbors

When to use Dynamic Programming There are polynomially many sub-problems Optimal solution can be computed from solutions to sub-problems There is an ordering among sub-problem that allows for iterative solution Richard Bellman

Today’s agenda Finish Bellman-Ford algorithm Analyze the run time Group talk time: Natural order among OPT(i,u) values? Group talk time: Natural order among OPT(i,u) values?

The recurrence OPT(i,u) = shortest path from u to t with at most i edges OPT(i,u) = min { OPT(i-1,u), min (u,w) in E { c u,w + OPT(i-1, w) } }

Some consequences OPT(i,u) = shortest path from u to t with at most i edges OPT(i,u) = min { OPT(i-1,u), min (u,w) in E { c u,w + OPT(i-1, w) } } OPT(n-1,u) is shortest path cost between u and t Group talk time: How to compute the shortest path between s and t given all OPT(i,u) values Group talk time: How to compute the shortest path between s and t given all OPT(i,u) values

Longest path problem Given G, does there exist a simple path of length n-1 ?

Longest vs Shortest Paths

Two sides of the “same” coin Shortest Path problem Can be solved by a polynomial time algorithm Is there a longest path of length n-1? Given a path can verify in polynomial time if the answer is yes

Poly time algo for longest path?

P vs NP question P : problems that can be solved by poly time algorithms NP : problems that have polynomial time verifiable witness to optimal solution Is P=NP? Alternate NP definition: Guess witness and verify!

Proving P ≠ NP Pick any one problem in NP and show it cannot be solved in poly time Pretty much all known proof techniques provably will not work

Proving P = NP Will make cryptography collapse Compute the encryption key! Prove that all problems in NP can be solved by polynomial time algorithms NP NP-complete problems Solving any ONE problem in here in poly time will prove P=NP!

If you are curious for more CSE431: Algorithms CSE 396: Theory of Computation