Introduction to Graph Theory

Understanding the structure and relationships of graphs

Graphs and Connections

  • Graphs depict connections between objects or nodes
  • Nodes, also known as vertices, can represent bus stops, cities, or other entities
  • Edges, or links, connect the nodes and represent relationships
  • Graphs can be either undirected or directed

Undirected Graphs

  • Undirected graphs have edges without a specific direction
  • Edges can be roads connecting cities or any two-way connections
  • Mathematically, an undirected graph is denoted as G with X vertices and edges

Directed Graphs

  • Directed graphs have edges with a specific direction
  • Edges can represent pipelines, one-way roads, or any directed connection
  • A directed graph is denoted as G with X vertices and edges

Incidence and Adjacency

  • Incidence refers to the connection between edges and vertices
  • Two vertices or two edges cannot be incident
  • Adjacent vertices share a common edge, and adjacent edges share a common vertex

Degrees and Paths

  • Degree refers to the number of edges incident to a vertex
  • Paths are sequences of adjacent edges that can repeat
  • Cycles are paths that start and end at the same vertex

Graph Representations

  • Graphs can be represented using adjacency matrices or weight matrices
  • Adjacency matrices describe the connections between vertices with 0s and 1s
  • Weight matrices assign values to edges to represent lengths or costs

Advanced Graph Concepts

  • Graphs can have multiple edges between the same vertices (multigraphs)
  • Loops are edges that start and end at the same vertex (pseudographs)
  • Simple paths do not repeat edges, while simple circuits start and end at the same vertex