Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Graphs: dots and lines
- minimum spanning tree: all vertices, no cycles, minimum edge weight
- Prims, Dijkstras, and Kruskals algorithms
- ===
- the actual graphs lesson
- what is a graph and whatnot
- graph-- G(v,e) vertices/edges
- directed vs undirected graph
- endpoints, incident, adjacent vertices, degree, multi edges, self edges, path/simple path
- subgraph
- connected vs complete-- connected: path from each to every other
- ===
- Graphs 2
- g = (v,e)
- v = n
- e = v-1
- no cycle
- take any 5 edges
- ncr for number of possible trees
- ===
- Prim's algorithm-- finds smallest connected edge
- Kruskal's: chooses edge with minimum weight and repeats until it's done
- but it picks all the minimum ones not just the ones that are connected
- can use a minheap to store the edges in a minheap
- dijkstra-- calculate cost from 1 to every other node; this is in pictures for math homework
- Dijkstra table: https://gyazo.com/4e512ec296a83ebb4570ed0988151a4e
Add Comment
Please, Sign In to add comment