Tree/Graph

Graph

A graph is a collection of nodes and edges representing some sort of objects and their relationships with each other.

Metro Maps are a more practical application of maps. Nodes represent stations and edges represent lines from one station to the next.

Clustering in Social Networks

Traveling Salesman is a famous problem in graph theory whereby given a list of cities and their distances to each other, we want to find an optimal path to pass through every city.

3-Dimensional Graph

Bad Graph

Trees

Trees are a more restrictive type of graph whereby cycles are not allowed to exist.

Syntax trees divide sentences into word nodes based off of their part of speech, revealing their underlying syntactic structure. Simplistic versions of syntax trees such as the Reed-Kellogg diagram below are used to teach children grammar.

An abstract syntax tree (AST) are used within programming languages to parse and compile code.

Tries are a type of trees where each node represents a single character or letter. Following a path starting from the root of the tree to any given leaf will result in a valid word. Tries can be used to store and find patterns in DNA or protein sequences.

L-systems are a system of rules that play out recursively to construct some kind of geometric structure. The tree is more so a representation of this recursion than it is a data structure.

Good/Bad diagram?