Graphs

Graph: A graph is a data structure that consists of the following two components: 1. A finite set of vertices also called as nodes. 2. A finite set of ordered pair of the form (u, v) called as edge. The pair is ordered because (u, v) is not the same as (v, u) in case of a directed graph(di-graph). The pair of the form (u, v) indicates that there is an edge from vertex u to vertex v. The edges may contain weight/value/cost.

Terminology

  • Path: Sequence of vertices connected by edges.

  • Cycle: Path whose first and last vertices are the same.

  • Degree: Number of connected vertices for a node.

  • Euler Tour: Cycle that uses each edge exactly once.

  • Hamilton tour: Cycle that uses each vertex exactly once.

  • Biconnectivity: Vertex whose removal disconnects the graph.

Graph API

Graph Utility

Degree

****Number of vertices connected to vv

Max Degree

Average Degree

Self Loops

Last updated

Was this helpful?