Graphs Flashcards
Graph Definition
a collection of vertices (or nodes) and the connections between them
simple graph G = (V, E)
consists of a nonempty set V of vertices and a possibly empty set E of edges, each edge being a set of two vertices from V.
The number of vertices and edges is denoted by ___ and ____, respectively.
|V|, |E|
A directed graph, or a digraph, G = (V, E)
consists of a nonempty set V of vertices and a set E of edges (also called arcs), where each edge is a pair of verices from V.
One edge of a simple graph is of the form ___ and ____ = _____
{vi, vj}; {vi, vj} = {vj, vi}
In a digraph, each edge is of the form ___ and ____ != _____
(vi, vj); (vi, vj) != (vj, vi)
Miltigraph
- a graph in which two vertices can be joing by multiple edges
a multigraph G = (V, E, f) is composed of a set of vertices V, a set of edges E, and a function f: E → {{vi,vj} : vi,vj ∈ V and vi != vj}
Pseudograph
a multigraph that allows edges that connect vertices to themselves – these edges are known as loops
Path
a path from v1 to vn is a sequence of edges edge(v1 v2), edge(v2 v3), . . . ,
edge (vn-1 vn) and is denoted as a sequence of vertices v1, v2, v3, . . . , vn-1 , vn
Circiut
a path where v1 = vn and no edge is repeated
Cycle
path where all vertices in a circuit are different
Weighted Graph
A graph where each edge has an assigned number.
The number assigned to an edge is called its weight, cost, distance, length . . . depending on the context
Complete Graph
A graph with n vertices such that for each pair of distinct vertices there is exactly one edge connecting them; that is, each vertex can be connected to any other vertex.
degree of a vertex
The degree of a vertex v, deg(v), is the number of edges incident with v.
isolated vertex
vertex where degree is 0
( deg(v) = 0 )