Table of Contents

Chapter 3

3.1 Basic Definitions and Applications

Definitions, definitions and more definitions all about graphs.

I know what a graph is, but just to review - edges E, and vertices (u,v) in V make up a graph. e connects from u to v.

A graph can be:

Different types of graphs:

Theorems:

3.2 Graph Connectivity and Graph Traversal

Already learned what it means to be connected - now looking at what we can do with that

Breadth First Search

Theorem 3.3

Theorem 3.4

Theorem 3.5

Deapth First Search

Theorem 3.6

Theorem 3.7

Theorem 3.8

3.3 Implementing Graph Traversal Using Queues and Stacks

Representing Graphs

Queues and Stacks

Implementing BFS

Implementing DFS

A little confused about the finding the set of all connected components section, but I think when we talked about htis in class it made sense so I am not going to worry too much.

3.4 Testing Bipartiteness: An application of Breadth-First Search

Bipartite graph - can split nodes into two groups, nodes in group are not connected to each other, only connected to other group. USE BFS to implement. (each layer is a different color, our implementation in class was super helpful.

Theorem 3.14

Theorem 3.15

3.5 connectivity in Directed Graphs

Representatoin - variation of adjacency list from above. Node needs a list to what it points to and what points to it.

Graph search algorithms

Theorem 3.16:

Theorem 3.17

3.6 Directed Acyclic Graphs and Topological Ordering

Directed graph with no cycles - DAG, directed acyclic graph!

Theorem 3.18

theorem 3.20

I'm lost a little towards the end of 3.6, but I'm thinking once we get to it in class it will all be clear!

Update: Class did make this easier to understand. I actually remember using djikstra's alogirthm in a math class before!