Learn Before
Concept

Graph

A graph is a data structure that is made up of nodes (vertices) and are connected by arcs (edges). Graphs are most commonly used to represent a network of information. An example of a graph structure is a map of a city. The blocks or buildings represent nodes. These nodes are connected by roads that represent edges.

Graphs may be weighted or unweighted. Weighted graphs have a numerical value attached to each individual edge. This means that different edges may have different magnitudes. Unweighted graphs do not have weights related to each edge.

Graphs may also be directed or undirected. Directed graphs mean that each edge has a certain direction. As a result, these edges represent a one-way relationship since edges can only be traverse in one direction. On the other hand, undirected graphs mean that each edge has no direction. Therefore, these edges represent a two-way relationship since edges can be traversed in both directions.

0

1

Updated 2021-06-29

Contributors are:

Who are from:

Tags

Python Programming Language

Data Science