gumgum's Garden🌼

Introduction to Graphs

A data structure consisting of nodes connected to other nodes with edges

  • Order: The number of vertices in the graph
  • Size: The number of edges in the graph
  • Vertex degree: The number of edges that are incident to a vertex
  • Isolated vertex: A vertex that is not connected to any other vertices in the graph
  • Self-loop: An edge from a vertex to itself
  • Directed graph: A graph where all the edges have a direction indicating what is the start vertex and what is the end vertex
  • Undirected graph: A graph with edges that have no direction
  • Weighted graph: Edges of the graph has weights
  • Unweighted graph: Edges of the graph has no weights