Lecture 2 - Graph Basics Flashcards
What is an undirected graph?
One where the edges can go both ways.
What does it mean if vertices are adjacent ?
They have an edge between them.
What does it mean if a vertex is incident to edge?
Vertex is either source or destination of the edge.
What is a cycle?
A path which returns to starting vertex.
What is a vertex degree?
The amount of edges it is involved with.
What does it mean if a graph is connected ?
Every pair of vertices is joined by a path.
What is a non-connected graph?
Graph that has 2 or more separate connected components.
When is a graph a tree?
Connected and acyclic (has no cycles).
How many edges does a tree have if it has n edges?
n-1 max to be acyclic
When is a graph a forest?
Acyclic and all components are trees.
What is a complete graph?
One that has every pair of verticies joined by an edge.
When is a graph bipartite?
If there are 2 disjoint sets and each edge joins vertices from different sets.
What is a directed graph?
One where each edge has a direction.
How can we describe an adjacency of u -> w?
U is adjacent to w and w is adjacent from u.
What is an in-degree?
number of edges into vertex