An introduction: Graphs are mathematical structures used to model pairwise relationships between
objects. They consist of vertices (nodes) and edges (links) and serve as a unifying language across
discrete mathematics, computer science, and applied fields such as networks and logistics. This
summary emphasizes key definitions, properties, common algorithms, and practical reasoning steps to
analyze graphs. Examples and references use contexts familiar in the United States, such as social
networks, transportation systems, and electrical grids.
Basic Definitions and Types of Graphs
A graph consists of a vertex set V and an edge set E ; write a graph as G=(V , E) .
Simple graph: edges connect two distinct vertices with no multiple edges or loops. Multigraph: allows
multiple edges; pseudograph: may include loops.
Directed graph (digraph): each edge has an orientation, written as ordered pairs (u , v ). Undirected
graph: edges are unordered pairs u , v .
Weighted graph: each edge has a numerical weight representing cost, distance, or capacity.
Special classes: complete graph K n (all possible edges between n vertices), bipartite graph (vertex
set partitionable into two independent parts), tree (connected acyclic graph), forest (acyclic graph,
possibly disconnected), and planar graph (drawable without edge crossings).
Graph Representation
Adjacency matrix: an n × n matrix A where Aij =1 (or edge weight) if an edge exists from vertex i to j ;
efficient for dense graphs, uses O(n 2) memory.
Adjacency list: for each vertex, store a list of adjacent vertices; efficient for sparse graphs, memory
roughly proportional to O(n+ m) where m is number of edges.