AlgoViz

Overview

A graph is a structure amounting to a set of objects in which some pairs of the objects are in some sense "related".

They consist of a fixed number of vertices (or nodes), which represent the data points and edges, which show the relation between vertices. These edges can be directed or undirected.

For example, if the vertices represent people at a party, and there is an edge between two people if they shake hands, then this graph is undirected because any person A can shake hands with a person B only if B also shakes hands with A. In contrast, if any edge from a person A to a person B corresponds to A owes money to B, then this graph is directed, because owing money is not necessarily reciprocated. The former type of graph is called an undirected graph while the latter type of graph is called a directed graph.

Typically, a graph is depicted in diagrammatic form as a set of dots or circles for the vertices, joined by lines or curves for the edges.

Graph Traversal

A graph traversal algorithm visits every vertex it can reach from its starting point, effectively traversing the entire graph if there are no disconnected vertices.

Minimum Spanning Tree

A minimum spanning tree (MST) is a subset of the edges of a connected, edge-weighted undirected graph that connects all the vertices together, without any cycles and with the minimum possible total edge weight.

Strongly Connected Components

A strongly connected component is a subset of vertices such that any two vertices of this subset are reachable from each other.

arrow_upward