This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Introduction to Graph | |
A **graph** \( G \) is a mathematical structure consisting of a set of vertices (also called nodes) \( V \) and a set of edges \( E \), where each edge is a pair of vertices. Formally, a graph can be denoted as \( G = (V, E) \). | |
## Directed/Undirected Graphs | |
A **directed graph** (or digraph) \( G \) is a graph in which the edges have a direction associated with them. Each edge \( (u, v) \) in a directed graph goes from vertex \( u \) to vertex \( v \). In contrast | |
**undirected graph** is a graph in which the edges have no direction associated with them; they simply indicate a connection between two vertices. |