Definition

A graph is a set, consisting of two smaller subsets for nodes and edges. It is notated as . is a set of vertices, and is a binary relation on .

Note that not all nodes need to be connected.

Terms

Node Terms
  • Two nodes are said to be adjacent if an edge exists between them
  • Degree : The number of edges connected to a given node is it’s degree. Depending if the graph is directed, the degree may be separated into:
    • In-degree: Number of edges pointing at the node,
    • Out-degree: Number of edges exiting the node
Graph Terms
  • Order: Number of vertices or nodes, i.e. the cardinality of =
  • Size: Number of edges of a graph, i.e. the cardinality of =
  • Diameter: The number of edges in the longest, shortest path between any pair of nodes. The diameter of a disconnected graph is always infinity.
  • Graph Density: Define as the ratio of the size of the graph to the maximum possible size of a graph =
  • Transitive Closure: The transitive closure of on . That is, a superset of is transitive, where an edge is created if a path exists from to , through intermediate nodes.

Graph Types

Graph Types

Graph Traversal

Graph Traversal