Introduction to Graphs
Learn about graphs, their applications, and their operations.
We'll cover the following
Graphs overview
In this module, we study two representations of graphs and basic algorithms that use these representations.
Mathematically, a (directed) graph is a pair where is a set of vertices and is a set of ordered pairs of vertices called edges. An edge is directed from to ; is called the source of the edge and is called the target. A path in is a sequence of vertices such that, for every , the edge is in . A path is a cycle if, additionally, the edge is in . A path (or cycle) is simple if all of its vertices are unique. If there is a path from some vertex to some vertex then we say that is reachable from . An example of a graph is shown below:
A graph with twelve vertices. Vertices are drawn as numbered circles and edges are drawn as pointed curves pointing from source to target.
Create a free account to access the full course.
By signing up, you agree to Educative's Terms of Service and Privacy Policy