PlanetMath (more info)
 Math for the people, by the people.
Encyclopedia | Requests | Forums | Docs | Wiki | Random | RSS  
Login
create new user
name:
pass:
forget your password?
Main Menu
Owner confidence rating: Medium Entry average rating: No information on entry rating
tree (Definition)

Formally, a forest is an undirected, acyclic graph. A forest consists of trees, which are themselves acyclic, connected graphs. For example, the following diagram represents a forest, each connected component of which is a tree.

$\displaystyle \begin{xy} *!C\xybox{ \xymatrix{ \bullet & \bullet \ar@{-}[d] & \... ...] \ & \bullet & \bullet & \bullet & \bullet \ar@{-}[r] & \bullet } } \end{xy}$

All trees are forests, but not all forests are trees. As in a graph, a forest is made up of vertices (which are often called nodes interchangeably) and edges. Like any graph, the vertices and edges may each be labelled -- that is, associated with some atom of data. Therefore a forest or a tree is often used as a data structure.

Often a particular node of a tree is specified as the root. Such trees are typically drawn with the root at the top of the diagram, with all other nodes depending down from it (however this is not always the case). A tree where a root has been specified is called a rooted tree. A tree where no root has been specified is called a free tree. When speaking of tree traversals, and most especially of trees as datastructures, rooted trees are often implied.

The edges of a rooted tree are often treated as directed. In a rooted tree, every non-root node has exactly one edge that leads to the root. This edge can be thought of as connecting each node to its parent. Often rooted trees ae considered directed in the sense that all edges connect parents to their children, but not vice-versa. Given this parent-child relationship, a descendant of a node in a directed tree is defined as any other node reachable from that node (that is, a node's children and all their descendants).

Given this directed notion of a rooted tree, a rooted subtree can be defined as any node of a tree and all of its descendants. This notion of a rooted subtree is very useful in dealing with trees inductively and defining certain algorithms inductively.

Because of their simple structure and unique properties, trees and forests have many uses. Because of the simple definition of various tree traversals, they are often used to store and lookup data. Many algorithms are based upon trees, or depend upon a tree in some manner, such as the heapsort algorithm or Huffman encoding. There are also a great many specific forms and families of trees, each with its own constraints, strengths, and weaknesses.



"tree" is owned by Logan.
(view preamble | get metadata)

View style:

See Also: graph, tree traversals, binary tree, balanced tree, spanning tree, null tree, graph theory

Also defines:  free tree, rooted tree, forest
Log in to rate this entry.
(view current ratings)

Cross-references: Huffman encoding, heapsort, properties, simple, algorithms, descendant, children, parent, tree traversals, root, structure, atom, edges, nodes, vertices, graph, connected component, represents, diagram, connected graphs, acyclic graph
There are 45 references to this entry.

This is version 6 of tree, born on 2002-02-25, modified 2002-03-02.
Object id is 2697, canonical name is Tree.
Accessed 16464 times total.

Classification:
AMS MSC05C05 (Combinatorics :: Graph theory :: Trees)

Pending Errata and Addenda
None.
[ View all 1 ]
Discussion
Style: Expand: Order:
forum policy

No messages.

Interact
post | correct | update request | add derivation | add example | add (any)