Basic Graphs Flashcards
Handshaking lemma:
- Formula
- Parity
The sum of degrees of all nodes is 2x the number of edges.
The number of nodes with odd degree must be even.
Complete graph
Notation
Formula edges
K_n
|v| = n
|E| n choose 2
Path graph
Notation
Edges
P
N-1 edges
A tree with 2 leaves!
Cycle graph
Formula edges
Degrees
C
|v| = |e|
All nodes degree 2
Grid graph
Formula vertices
Property degrees and formula
G_m,n
M x N vertices
Corners deg 2, all others 3 or 4
Total degrees: 2mn-m-n
Walk
A sequence of nodes linked by edges
LENGTH IS NUMBER OF EDGES
can have repeat nodes
Path
A walk where all nodes are distinct
Well ordering principle
Every non empty set of numbers has a least element
Connectivity
Nodes are connected if there is a walk between them
Reflexive-node connects to self
Transitive - x-y and y-z then x-z
Symmetric: x and y connect to each other
Connected component
A subset of nodes that are MAXIMALLY connected and cannot form a bigger group
Connected graph
Counting formula
At least one connection.
Number of CCs at MINIMUM nodes-edges
Edges >= nodes-CCs, must be less than nodes choose 2
Disconnected graph
More than one CC or edgeless
Distance
Shortest path between any 2 nodes