Introduction

A graph is a collection of points and lines connecting some (possibly empty) subset of them. The points of a graph are called graph vertices, “nodes” or simply “points.” Similarly, the lines connecting the vertices of a graph are called graph edges, “arcs” or “lines.”

A graph G can be defined as a pair (V,E), where V is a set of vertices, and E is a set of edges between the vertices E ⊆ {(u,v) | u, v ∈ V}.

Remarks

Graphs are a mathematical structure that model sets of objects that may or may not be connected with members from sets of edges or links.

A graph can be described through two different sets of mathematical objects:

Graphs can be either directed or undirected.

Introduction To Graph Theory

Storing Graphs (Adjacency Matrix)

Storing Graphs (Adjacency List)

Topological Sort

Detecting a cycle in a directed graph using Depth First Traversal

Thorup's algorithm