Trees and Cycles Flashcards

1
Q

Isomorphism

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Induced sub graph

A

A graph you get by selecting only some nodes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Counting paths of length n

A

Count graphs of path graphs on n+1 vertices

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Closed walk

A

First and last node are the same

Cycle

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Cycle

A

Walk where nodes pairwise disjoint except first and last

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Trees

Edges formula

Leaves properties

Connection properties

A

Minimally connected acyclic graph

N-1 edges

Min 2 leaves unless 1 node

Any 2 nodes connected by unique path

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Cut edge

A

Removing a cut edge produces more connected components.

NEVER part of a cycle

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Spanning tree

A

A tree that connects all vertices of a graph

If graph is connected it’s a tree of all vertices

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Edge pruning algorithm

A

Removing edges that are not cut until you get a tree

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Edge growing

A

Choosing vertices to include which do not form a cycle until reaching a tree

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Coloring

A

Partitioning the graph into colors.

Proper colorable when Andy 2 nodes connected by an edge are different colors

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Chromatic number

Properties

A

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!

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Bipartite

Properties

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Triangle inequality

A

Distance of v1 v2 <= distance v1 v3 + distance v2 v3

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Clique

A

A subset of graph where any two nodes are pairwise connected

Size is number nodes connected

Maximal clique if can’t be extended

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Independent set

A

Opposite of clique. Any two nodes not connected. Graphs are k colorable when there are k independent sets.

Leaves of a tree are an independent set

17
Q

Complement of graph

Formula for edges

A

Isomorphic with same vertices but different edges.

(N-2)(n-1)/2 = |e| in complement

18
Q

Rooted tree (directed)

Relationship to DAG

A

A pair of a single root node and a whole associated tree.

Any edge in the rooted tree matches any path from the root in the same direction radiating from the root

A DAG from a rooted tree has a root as source and leaves as sink

19
Q

Rooted directed tree properties

A

Parent/predecessor points to child/successor(s)

Height is distance from root to furthest leaf measured in number of edges

20
Q

Binary tree

Formula for maximum nodes, leaves, edges

A

Rooted tree where every node has AT MOST 2 children

A single node counts; in this case it is root and leaf

When it is completely full it has maximum number of nodes: 2^h+1 - 1 where h is height, and it has 2^h leaves, and 2^h+1 -2 edges

21
Q

Binary search tree

A

A binary tree ordered with a left and right child for each parent