D1 Flashcards
Simple graph
No loops or multiple arcs
Connected graph
All pairs of nodes are connected
Complete graph
All nodes connected by one arc to every other node (Kn = complete with n nodes)
Planar graph
Can be drawn in a plane, so that arcs only meet at nodes and don’t cross
Isomorphic graphs
Same nodes and arcs but different shapes
Trail
End node of an arc is the start node of the next
Path
No node used more than once
Cycle
Closed trail where only the first and last nodes are the same
Tree
Simple graph without cycles
Spanning tree equation for arcs
n nodes
= n-1 arcs
Euclerian
Closed trail
Every arc once
Every node has even order
Semi-Eulerian
Not closed
Every arc once
Only 2 nodes have odd order
Hamiltonian cycle
Passes every node of the graph once and returns to its starting node
Kruskal’s Algorithm
- Sort arcs into ascending order of weight
- Select least weight arc
- Select next lowest that doesn’t form cycle with anything
- Repeat until you have a spanning tree
Prim’s Algorithm
- Choose starting node
- Attach to arc of least weight
- Look at other nodes that aren’t in the tree and connect with minimum arc length to a node that’s in the tree
- Repeat until all nodes in the tree