Lesson 2 Flashcards
A _G, consists of two sets V and E.
V is a finite non-empty set of vertices. V(G) = {Vi, Vj…Vn} E is the set of pairs of vertices. E(G) = {(Vi,Vj),(Vk,Vl…)} These pair of vertices are called edges.
Graphs
Kinds of Graphs
Undirected Graph
Directed Graph
The pair of vertices representing any edge in unordered.
Uses a pair of parentheses to denote an edge in an _ graph
(V1, V2) = (V2, V1)
Undirected Graph
The pair of vertices representing any edge is ordered.
Uses angled brackets to denote edges in a _ graph
Also known as digraph
<V1,V2> != <V2, V1>
<V1,V2> where V1 = tail, V2 = head.
Directed Graph
The maximum number of edges in any n vertex is n(n-1)/2
Undirected Graph
The maximum number of edges in any n vertex is n(n-1).
Directed Graph
A “walk” from one vertex to another along directed edges.
Path
A path wherein all vertices except the first and the last are distinct.
Simple Path
A simple path where the first and the last vertices are the same.
Cycle
Degree of a vertex (Directed Graph)
In-degree
Out-degree
The number of edges for which the vertex is the head/2nd component.
In-degree
The number of edges for which the vertex is the tail/1st component.
Out-degree
Number of edges incident to that vertex.
Degree of a vertex (Undirected Graph)
An undirected/directed graph is said to be connected if for every pair of distinct
vertices Vi, Vj in V(G), there is a path from
Vi to Vj.
Connected
A directed graph is said to be strongly connected if for every pair of vertices Vi, Vj in V(G), there is a directed path from Vi to
Vj and from Vj to Vi
Strongly Connected (Directed graph)