lec14 - MIT OpenCourseWare http://ocw.mit.edu 6.006...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: MIT OpenCourseWare http://ocw.mit.edu 6.006 Introduction to Algorithms Spring 2008 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms . Lecture 14 Searching III 6.006 Spring 2008 Lecture 14: Searching III: Toplogical Sort and NP-completeness Lecture Overview: Search 3 of 3 & NP-completeness BFS vs. DFS job scheduling topological sort intractable problems P, NP, NP-completeness Readings CLRS, Sections 22.4 and 34.1-34.3 (at a high level) Recall: Breadth-First Search (BFS): level by level Depth-First Search (DFS): backtrack as necc. both O ( V + E ) worst-case time = optimal BFS computes shortest paths (min. edges) DFS is a bit simpler & has useful properties 1 Lecture 14 Searching III 6.006 Spring 2008 Job Scheduling: Given Directed Acylic Graph (DAG), where vertices represent tasks & edges represent dependencies, order tasks without violating dependencies G A H B C F D E I 1 2 3 4 7 8 9 5 6 Figure...
View Full Document

Page1 / 6

lec14 - MIT OpenCourseWare http://ocw.mit.edu 6.006...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online