Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| courses:cs211:winter2018:journals:martinj:3.2.6 [2018/02/07 04:37] – martinj | courses:cs211:winter2018:journals:martinj:3.2.6 [2018/02/07 04:55] (current) – martinj | ||
|---|---|---|---|
| Line 2: | Line 2: | ||
| ===== Brief summary | ===== Brief summary | ||
| - | 3.2 covered graph connectivity and graph traversal, including breadth-first and depth-first searches, which determine s-t connectivity, | + | 3.2 covered graph connectivity and graph traversal, including breadth-first and depth-first searches, which determine s-t connectivity, |
| | | ||
| - | ===== Motivations ===== | ||
| - | |||
| ===== Algorithms: brief sketches, intuitions, implementations, | ===== Algorithms: brief sketches, intuitions, implementations, | ||
| ==== Breadth-First Search ==== | ==== Breadth-First Search ==== | ||
| Line 30: | Line 28: | ||
| * Node m is an ancestor of node n if n was marked as explored after m (I think) | * Node m is an ancestor of node n if n was marked as explored after m (I think) | ||
| * If x & y are two nodes that are connected by an edge in the original graph, but not connected its BFS tree, one of them is an ancestor of the other | * If x & y are two nodes that are connected by an edge in the original graph, but not connected its BFS tree, one of them is an ancestor of the other | ||
| - | Runtime: O( | ||
| - | |||
| - | ===== Questions ===== | ||
| ===== Stuff I want to remember ===== | ===== Stuff I want to remember ===== | ||
| Line 40: | Line 35: | ||
| A queue is a set form which we extract elements in FIFO (first in, first out) order = the order in which they were added | A queue is a set form which we extract elements in FIFO (first in, first out) order = the order in which they were added | ||
| * Stack = same, but opposite (LIFO) | * Stack = same, but opposite (LIFO) | ||
| - | ===== How readable / interesting the section was ===== | + | |
| - | 3.2 was surprisingly easy to read. I liked all the examples equating BFS and DFS to navigating a kind of maze of hallways and rooms. | + | |
