Graph Theory

1. What is a Graph?

A graph is a mathematical structure consisting of vertices and edges.

Formally, a graph is written as:

\[ G = (V, E) \]

where \( V \) is the set of vertices and \( E \) is the set of edges.

2. Hamiltonian and Eulerian Graphs

A graph is Hamiltonian if it contains a cycle \( v_1 \to v_2 \to \cdots \to v_n \to v_1 \) that visits every vertex exactly once.

A graph is Eulerian if it contains a cycle that uses every edge exactly once.