Graph Theoruy Flashcards
Define a simple undirected graph
A non empty set V of vertices, nodes, and a set of undirected edges. Every edge has two distinct vertices, u and v, as endpoints.
Define a directed graph
A non empty set V of vertices and a set of directed edges. Each directed edge has a start vertices u and an end vertex v.
What is the degree of a vertex?
The number of edges connected to it
What is the neighbourhood of a vertex?
The number of vertices connected to a vertex
Handshaking Theorem
2m = SUM( Degrees of all the vertices )
Where m is the number of edges
Define a complete graph
All possible edges exist (Complete graph with n nodes is denoted by Kn)
Define a bipartite graph
Two distinct sets of nodes where no two nodes in the same set are directly connected by an edge
Define a path
A series of nodes in a graph
Define a cycle
A series of nodes in a graph with vertices v1 v2 … vk
Where v1 = vk and k > 2
Define a tree
An undirected graph without a cycle
Undirected graph theorem
THEOREM. Let G be an undirected graph on n nodes. Any two of the following statements I G is connected; I G does not contain a cycle; I G has n − 1 edges; imply the third.
What is an M-ary tree?
A rooted tree is called an m-ary tree if every node has at most m children
Minimum spanning tree
A tree which connects all the nodes in a graph with the shortest weights possible
Prim’s algorithm
Choose any vertex v1. Let T = {v1}. E = {}.
2. Choose the neighbour to v1 of least weight (nearest
neighbour) v2 and add to T. Add the edge from v1 to v2 to E.
3. Next add the nearest neighbour to T = {v1, v2}. This must
not create a cycle.
4. Stop when all vertices have been reached (and so
|E| = V − 1).