Tree structure

Last updated
A tree structure showing the possible hierarchical organization of an encyclopedia Binary tree structure.svg
A tree structure showing the possible hierarchical organization of an encyclopedia
The original Encyclopedie (1752) used a tree diagram to show the way in which its subjects were ordered. ENC SYSTEME FIGURE.jpeg
The original Encyclopédie (1752) used a tree diagram to show the way in which its subjects were ordered.

A tree structure, tree diagram, or tree model is a way of representing the hierarchical nature of a structure in a graphical form. It is named a "tree structure" because the classic representation resembles a tree, although the chart is generally upside down compared to a biological tree, with the "stem" at the top and the "leaves" at the bottom.

Contents

A tree structure is conceptual, and appears in several forms. For a discussion of tree structures in specific fields, see Tree (data structure) for computer science; insofar as it relates to graph theory, see tree (graph theory) or tree (set theory). Other related articles are listed below.

Terminology and properties

The tree elements are called "nodes". The lines connecting elements are called "branches". Nodes without children are called leaf nodes, "end-nodes", or "leaves".

Every finite tree structure has a member that has no superior. This member is called the "root" or root node. The root is the starting node. But the converse is not true: infinite tree structures may or may not have a root node.

The names of relationships between nodes model the kinship terminology of family relations. The gender-neutral names "parent" and "child" have largely displaced the older "father" and "son" terminology. The term "uncle" is still widely used for other nodes at the same level as the parent, although it is sometimes replaced with gender-neutral terms like "ommer". [1]

In the example, "encyclopedia" is the parent of "science" and "culture", its children. "Art" and "craft" are siblings, and children of "culture", which is their parent and thus one of their ancestors. Also, "encyclopedia", as the root of the tree, is the ancestor of "science", "culture", "art" and "craft". Finally, "science", "art" and "craft", as leaves, are ancestors of no other node.

Tree structures can depict all kinds of taxonomic knowledge, such as family trees, the biological evolutionary tree, the evolutionary tree of a language family, the grammatical structure of a language (a key example being S → NP VP, meaning a sentence is a noun phrase and a verb phrase, with each in turn having other components which have other components), the way web pages are logically ordered in a web site, mathematical trees of integer sets, et cetera.

The Oxford English Dictionary records use of both the terms "tree structure" and "tree-diagram" from 1965 in Noam Chomsky's Aspects of the Theory of Syntax . [2]

In a tree structure there is one and only one path from any point to any other point.

Computer science uses tree structures extensively (see Tree (data structure) and telecommunications.)

For a formal definition see set theory, and for a generalization in which children are not necessarily successors, see prefix order.

Examples of tree structures

A tree map used to represent a directory structure as a nested set Tree Map.png
A tree map used to represent a directory structure as a nested set
information diagram in the shape of a tree illustrating the "evolution" of thermionic tubes (a type of vacuum tube) between 1883 and 1934 1934-Thermionic-Tube-Chart.jpg
information diagram in the shape of a tree illustrating the "evolution" of thermionic tubes (a type of vacuum tube) between 1883 and 1934

Representing trees

There are many ways of visually representing tree structures. Almost always, these boil down to variations, or combinations, of a few basic styles:

Classical node-link diagrams, that connect nodes together with line segments:

encyclopedia
/
culture
\
science
/
art
\
craft

Nested sets

Nested sets that use enclosure or containment to show parenthood; examples include TreeMaps, fractal maps, and Euler diagrams:

Blank.png encyclopedia
Blank.png Blank.png
Blank.png culture
Blank.png Blank.png
art   craft
science 

Layered "icicle" diagrams

Layered "icicle" diagrams that use alignment/adjacency.

encyclopedia
culturescience
artcraft

Outlines and tree views

Lists or diagrams that use indentation, sometimes called "outlines" or "tree views".

An outline:

encyclopedia
culture
art
craft
science

A tree view:

  • encyclopedia
    • culture
      • art
      • craft
    • science

Nested parentheses

A correspondence to nested parentheses was first noticed by Sir Arthur Cayley:

((art,craft)culture,science)encyclopedia
or
encyclopedia(culture(art,craft),science)

Radial trees

Trees can also be represented radially:

art
    \
craft
/   
culture
|
encyclopedia
|
science

See also

Kinds of trees
Related articles

Related Research Articles

<span class="mw-page-title-main">Binary tree</span> Limited form of tree data structure

In computer science, a binary tree is a tree data structure in which each node has at most two children, referred to as the left child and the right child. That is, it is a k-ary tree with k = 2. A recursive definition using set theory is that a binary tree is a tuple (L, S, R), where L and R are binary trees or the empty set and S is a singleton set containing the root.

A hierarchy is an arrangement of items that are represented as being "above", "below", or "at the same level as" one another. Hierarchy is an important concept in a wide variety of fields, such as architecture, philosophy, design, mathematics, computer science, organizational theory, systems theory, systematic biology, and the social sciences.

<span class="mw-page-title-main">Tree (data structure)</span> Abstract data type simulating a hierarchical tree structure and represented as a set of linked nodes

In computer science, a tree is a widely used abstract data type that represents a hierarchical tree structure with a set of connected nodes. Each node in the tree can be connected to many children, but must be connected to exactly one parent, except for the root node, which has no parent. These constraints mean there are no cycles or "loops", and also that each child can be treated like the root node of its own subtree, making recursion a useful technique for tree traversal. In contrast to linear data structures, many trees cannot be represented by relationships between neighboring nodes in a single straight line.

<span class="mw-page-title-main">Parse tree</span> Tree in formal language theory

A parse tree or parsing tree or derivation tree or concrete syntax tree is an ordered, rooted tree that represents the syntactic structure of a string according to some context-free grammar. The term parse tree itself is used primarily in computational linguistics; in theoretical syntax, the term syntax tree is more common.

A phylogenetic tree, phylogeny or evolutionary tree is a graphical representation which shows the evolutionary history between a set of species or taxa during a specific time. In other words, it is a branching diagram or a tree showing the evolutionary relationships among various biological species or other entities based upon similarities and differences in their physical or genetic characteristics. In evolutionary biology, all life on Earth is theoretically part of a single phylogenetic tree, indicating common ancestry. Phylogenetics is the study of phylogenetic trees. The main challenge is to find a phylogenetic tree representing optimal evolutionary ancestry between a set of species or taxa. Computational phylogenetics focuses on the algorithms involved in finding optimal phylogenetic tree in the phylogenetic landscape.

<span class="mw-page-title-main">Scene graph</span>

A scene graph is a general data structure commonly used by vector-based graphics editing applications and modern computer games, which arranges the logical and often spatial representation of a graphical scene. It is a collection of nodes in a graph or tree structure. A tree node may have many children but only a single parent, with the effect of a parent applied to all its child nodes; an operation performed on a group automatically propagates its effect to all of its members. In many programs, associating a geometrical transformation matrix at each group level and concatenating such matrices together is an efficient and natural way to process such operations. A common feature, for instance, is the ability to group related shapes and objects into a compound object that can then be manipulated as easily as a single object.

<span class="mw-page-title-main">Directed acyclic graph</span> Directed graph with no directed cycles

In mathematics, particularly graph theory, and computer science, a directed acyclic graph (DAG) is a directed graph with no directed cycles. That is, it consists of vertices and edges, with each edge directed from one vertex to another, such that following those directions will never form a closed loop. A directed graph is a DAG if and only if it can be topologically ordered, by arranging the vertices as a linear ordering that is consistent with all edge directions. DAGs have numerous scientific and computational applications, ranging from biology to information science to computation (scheduling).

<span class="mw-page-title-main">Graph drawing</span> Visualization of node-link graphs

Graph drawing is an area of mathematics and computer science combining methods from geometric graph theory and information visualization to derive two-dimensional depictions of graphs arising from applications such as social network analysis, cartography, linguistics, and bioinformatics.

<span class="mw-page-title-main">Graphviz</span> Software package for graph visualization

Graphviz is a package of open-source tools initiated by AT&T Labs Research for drawing graphs specified in DOT language scripts having the file name extension "gv". It also provides libraries for software applications to use the tools. Graphviz is free software licensed under the Eclipse Public License.

Tree diagram may refer to:

<span class="mw-page-title-main">Tree (set theory)</span>

In set theory, a tree is a partially ordered set (T, <) such that for each tT, the set {sT : s < t} is well-ordered by the relation <. Frequently trees are assumed to have only one root (i.e. minimal element), as the typical questions investigated in this field are easily reduced to questions about single-rooted trees.

<span class="mw-page-title-main">Infographic</span> Graphic visual representation of information

Infographics are graphic visual representations of information, data, or knowledge intended to present information quickly and clearly. They can improve cognition by using graphics to enhance the human visual system's ability to see patterns and trends. Similar pursuits are information visualization, data visualization, statistical graphics, information design, or information architecture. Infographics have evolved in recent years to be for mass communication, and thus are designed with fewer assumptions about the readers' knowledge base than other types of visualizations. Isotypes are an early example of infographics conveying information quickly and easily to the masses.

<span class="mw-page-title-main">Node (computer science)</span> Basic unit of a data structure

A node is a basic unit of a data structure, such as a linked list or tree data structure. Nodes contain data and also may link to other nodes. Links between nodes are often implemented by pointers.

In mathematics, and, in particular, in graph theory, a rooted graph is a graph in which one vertex has been distinguished as the root. Both directed and undirected versions of rooted graphs have been studied, and there are also variant definitions that allow multiple roots.

<span class="mw-page-title-main">Hyperbolic tree</span> Mathematical tree in the hyperbolic plane

A hyperbolic tree is an information visualization and graph drawing method inspired by hyperbolic geometry.

A tree is a perennial woody plant.

<span class="mw-page-title-main">Diagrammatic reasoning</span>

Diagrammatic reasoning is reasoning by means of visual representations. The study of diagrammatic reasoning is about the understanding of concepts and ideas, visualized with the use of diagrams and imagery instead of by linguistic or algebraic means.

<span class="mw-page-title-main">Unrooted binary tree</span>

In mathematics and computer science, an unrooted binary tree is an unrooted tree in which each vertex has either one or three neighbors.

In computer science, a weak heap is a data structure for priority queues, combining features of the binary heap and binomial heap. It can be stored in an array as an implicit binary tree like a binary heap, and has the efficiency guarantees of binomial heaps.

References

  1. "Ethereum Glossary". GitHub. Archived from the original on 25 April 2019. Retrieved 17 April 2019.
  2. "tree" . Oxford English Dictionary (Online ed.). Oxford University Press.(Subscription or participating institution membership required.)
  3. "What is the Document Object Model?". W3C Architecture domain. Archived from the original on 2012-02-12. Retrieved 2006-12-05.

Further reading

Identification of some of the basic styles of tree structures can be found in: