
Summary
A new unit on graph theory begins with a review of fundamental concepts, including the definitions of graphs, vertices, and edges. The lecture covers two essential algorithms: breadth-first search (BFS) and depth-first search (DFS). BFS explores nodes level by level, while DFS dives deep into the graph, exploring as far as possible along each branch before backtracking.
The discussion highlights the reachability problem, where the goal is to determine which nodes can be accessed from a given source node. The lecture explains how DFS can effectively solve this problem by recursively visiting neighboring nodes and marking them as visited. The concept of a parent tree is introduced, which tracks the path taken to reach each node, allowing for the reconstruction of paths from the source to any reachable node.
The lecture also touches on the connectivity of graphs, emphasizing the importance of identifying connected components using DFS. By iterating through all vertices and applying DFS to unvisited nodes, one can discover all vertices within a connected component. Additionally, the lecture introduces directed acyclic graphs (DAGs) and the concept of topological ordering, which is essential for tasks such as scheduling. The relationship between finishing orders from DFS and topological orders is established, leading to a method for detecting cycles in directed graphs. If a cycle exists, it will manifest as an edge pointing back to an ancestor in the DFS traversal tree.
Show Notes
MIT 6.006 Introduction to Algorithms, Spring 2020Instructor: Justin SolomonView the complete course: https://ocw.mit.edu/6-006S20YouTube Playlist: https://www.youtube.com/playlist?list=PLUl4u3cNGP63EdVPNLG3ToM6LaEUuStEYUploaded 13-09-21This class builds on the previous lecture of breadth-first search (BFS) by introducing depth-first search (DFS) and full-BFS and full-DFS. The lecture continues with topological sorts and cycle detection.License: Creative Commons BY-NC-SAMore information at https://ocw.mit.edu/termsMore courses at https://ocw.mit.eduSupport OCW at http://ow.ly/a1If50zVRlQWe encourage constructive comments and discussion on OCW’s YouTube and other social media channels. Personal attacks, hate speech, trolling, and inappropriate comments are not allowed and may be removed. More details at https://ocw.mit.edu/comments. Learn more about your ad choices. Visit megaphone.fm/adchoices Learn more about your ad choices. Visit megaphone.fm/adchoices
More from MIT OpenCourseWare: Free Courses from the institute
MIT 14.12 Economic Applications of Game Theory, Fall 2025 Instructor: Ian Ball View the complete course: https://ocw.mit.edu/courses/14-12-economic-applications-of-game-theory-fall-2025/YouTube Playlist: https://www.youtube.com/playlist?list=PLUl4u3cNGP63quuKvMHCt3cmTmt0O2qpvUploaded 18-05-26This lecture explores how companies compete and decide what prices to charge. Using real-world examples like oil production and cell phone companies, the instructor explains why some markets have one dominant player (like a local monopoly) while others have many competitors. License: Creative Commons BY-NC-SAMore information at https://ocw.mit.edu/termsMore courses at https://ocw.mit.eduSupport OCW at http://ow.ly/a1If50zVRlQWe encourage constructive comments and discussion on OCW’s YouTube and other social media channels. Personal attacks, hate speech, trolling, and inappropriate comments are not allowed and may be removed. More details at https://ocw.mit.edu/comments. Learn more about your ad choices. Visit megaphone.fm/adchoices Learn more about your ad choices. Visit megaphone.fm/adchoices
MIT 8.701 Introduction to Nuclear and Particle Physics, Fall 2020Instructor: Markus Klute View the complete course: https://ocw.mit.edu/8-701F20YouTube Playlist: https://www.youtube.com/playlist?list=PLUl4u3cNGP60Do91PdN978llIsvjKW0auUploaded 24-06-21Discussion of the early history and people in nuclear and particle physics from the 1820s to 1939.License: Creative Commons BY-NC-SAMore information at https://ocw.mit.edu/termsMore courses at https://ocw.mit.eduSupport OCW at http://ow.ly/a1If50zVRlQWe encourage constructive comments and discussion on OCW’s YouTube and other social media channels. Personal attacks, hate speech, trolling, and inappropriate comments are not allowed and may be removed. More details at https://ocw.mit.edu/comments. Learn more about your ad choices. Visit megaphone.fm/adchoices Learn more about your ad choices. Visit megaphone.fm/adchoices
MIT 18.404J Theory of Computation, Fall 2020Instructor: Michael SipserView the complete course: https://ocw.mit.edu/18-404JF20YouTube Playlist: https://www.youtube.com/playlist?list=PLUl4u3cNGP60_JNv2MmK3wkOt9syvfQWYUploaded 06-10-21Quickly reviewed last lecture. Discussed a connection between games and quantifiers. Described the formula game and showed that generalized geography is PSPACE-complete. Introduced log space: L and NL. Defined the configuration graph to prove NL is a subset of P.License: Creative Commons BY-NC-SAMore information at https://ocw.mit.edu/termsMore courses at https://ocw.mit.eduSupport OCW at http://ow.ly/a1If50zVRlQWe encourage constructive comments and discussion on OCW’s YouTube and other social media channels. Personal attacks, hate speech, trolling, and inappropriate comments are not allowed and may be removed. More details at https://ocw.mit.edu/comments. Learn more about your ad choices. Visit megaphone.fm/adchoices Learn more about your ad choices. Visit megaphone.fm/adchoices
MIT 2.997 Direct Solar/Thermal To Electrical Energy Conversion Technologies, Fall 2009Instructor: Prof. Gang ChenUploaded 26-06-24View the complete course: https://ocw.mit.edu/courses/2-997-direct-solar-thermal-to-electrical-energy-conversion-technologies-fall-2009/YouTube Playlist: https://www.youtube.com/playlist?list=PLUl4u3cNGP62sv7_wYRKqvf1HsL4p54KjRichardson formulaThermionic engines: vacuum, solid-stateSchottky barrier and diodepn junction and diodeLicense: Creative Commons BY-NC-SAMore information at https://ocw.mit.edu/termsMore courses at https://ocw.mit.eduSupport OCW at http://ow.ly/a1If50zVRlQWe encourage constructive comments and discussion on OCW’s YouTube and other social media channels. Personal attacks, hate speech, trolling, and inappropriate comments are not allowed and may be removed. More details at https://ocw.mit.edu/comments. Learn more about your ad choices. Visit megaphone.fm/adchoices Learn more about your ad choices. Visit megaphone.fm/adchoices
MIT 14.12 Economic Applications of Game Theory, Fall 2025 Uploaded 18-05-26Instructor: Ian Ball View the complete course: https://ocw.mit.edu/courses/14-12-economic-applications-of-game-theory-fall-2025/YouTube Playlist: https://www.youtube.com/playlist?list=PLUl4u3cNGP63quuKvMHCt3cmTmt0O2qpvIn this lecture, Ian Ball discusses infinitely repeated games, which are scenarios where players engage in the same stage game indefinitely, allowing for cooperation that wouldn't exist in one-shot games. License: Creative Commons BY-NC-SAMore information at https://ocw.mit.edu/termsMore courses at https://ocw.mit.eduSupport OCW at http://ow.ly/a1If50zVRlQWe encourage constructive comments and discussion on OCW’s YouTube and other social media channels. Personal attacks, hate speech, trolling, and inappropriate comments are not allowed and may be removed. More details at https://ocw.mit.edu/comments. Learn more about your ad choices. Visit megaphone.fm/adchoices Learn more about your ad choices. Visit megaphone.fm/adchoices