A tree is an abstract idea, a common kind of structure which we find across many different applications. A tree models a relation between pairs of things:
- A section of an article contains another section,
- A directory contains another directory,
- An HTML tag contains other HTML tags,
- An employee manages another employee,
- A process spawns another process.
A “relation between pairs of things” is very abstract and very general — in almost any context, there are relations between pairs of things which we might want to model in a computer program. However, not every relation defines a tree structure.