Trees and Cycles Flashcards
Isomorphism
When there is a 1:1 bijection between graphs
Any 2 complete or grid graphs with same number of nodes are isomorphic
Edges and vertices can be laid out differently but degrees must be same
Induced sub graph
A graph you get by selecting only some nodes
Counting paths of length n
Count graphs of path graphs on n+1 vertices
Closed walk
First and last node are the same
Cycle
Cycle
Walk where nodes pairwise disjoint except first and last
Trees
Edges formula
Leaves properties
Connection properties
Minimally connected acyclic graph
N-1 edges
Min 2 leaves unless 1 node
Any 2 nodes connected by unique path
Cut edge
Removing a cut edge produces more connected components.
NEVER part of a cycle
Spanning tree
A tree that connects all vertices of a graph
If graph is connected it’s a tree of all vertices
Edge pruning algorithm
Removing edges that are not cut until you get a tree
Edge growing
Choosing vertices to include which do not form a cycle until reaching a tree
Coloring
Partitioning the graph into colors.
Proper colorable when Andy 2 nodes connected by an edge are different colors
Chromatic number
Properties
The smallest number of colors that create a proper coloring
Path graph 2
Cycle 2 if even and 3 if odd nodes
Use PHP to find colors!
Bipartite
Properties
A 2 colorable graph.
No cycle of odd length
Any graph has only 2 sub graphs which are bipartite (2x each CC, 2^n if more CCs):
Ex-if you have nodes x, y, z, you can color them r,b,r or b,r,b so that’s two bipartite graphs
Trees bipartite
Triangle inequality
Distance of v1 v2 <= distance v1 v3 + distance v2 v3
Clique
A subset of graph where any two nodes are pairwise connected
Size is number nodes connected
Maximal clique if can’t be extended