Library/Combinatorics/Graph Theory

Graph Theory

Practice
Overview
Important

A graph GG consists of a set of vertices VV and a set of edges EE, where each edge connects two vertices. Graphs can be used to model relationships and connections in many situations, such as networks, puzzles, and maps.

Important properties

  • Graphs can be undirected (edges have no direction) or directed (edges have a direction).

  • A path is a sequence of edges connecting a sequence of vertices.

  • A cycle is a path that starts and ends at the same vertex, with all edges and vertices (except the start/end) distinct.

  • A tree is a connected graph with no cycles.

  • The degree of a vertex is the number of edges connected to it.