Editing Tree

Jump to: navigation, search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 15: Line 15:
 
Some trees are '''rooted''', that is, they have one particular vertex designated the '''root'''. Others are '''unrooted''', perhaps because no significance can be attached to singling out one vertex to be a root. Here are examples, that serve to introduce and explain terminology:
 
Some trees are '''rooted''', that is, they have one particular vertex designated the '''root'''. Others are '''unrooted''', perhaps because no significance can be attached to singling out one vertex to be a root. Here are examples, that serve to introduce and explain terminology:
 
* In an organic tree, there are several points at which the trunk and its branches divide. Let these, along with the ground, and the endpoints of the smallest branches, be vertices, with the vertex at the ground being labelled the root, for obvious reasons, and let the trunk and branches be the edges. The significance of the rooting is that the trunk and all its branches are considered to emanate from the root (which makes sense given how trees actually grow). The vertices corresponding to the endpoints of the smallest branches, which always have degree one, are called '''leaves''', in strict analogy. The distance from the root node to any other node is sometimes called that node's '''height''', again in strict analogy, but, due to the practice in computer science of drawing trees upside-down, it is more commonly called the '''depth'''. The maximum height of any node in the tree is known as the tree's height.
 
* In an organic tree, there are several points at which the trunk and its branches divide. Let these, along with the ground, and the endpoints of the smallest branches, be vertices, with the vertex at the ground being labelled the root, for obvious reasons, and let the trunk and branches be the edges. The significance of the rooting is that the trunk and all its branches are considered to emanate from the root (which makes sense given how trees actually grow). The vertices corresponding to the endpoints of the smallest branches, which always have degree one, are called '''leaves''', in strict analogy. The distance from the root node to any other node is sometimes called that node's '''height''', again in strict analogy, but, due to the practice in computer science of drawing trees upside-down, it is more commonly called the '''depth'''. The maximum height of any node in the tree is known as the tree's height.
* The ''family tree'' consisting of all descendants of an individual: This, too, is named for its resemblance to an organic tree, and it is no surprise that it can be placed into analogy with a graph-theoretic tree as well. Let each person in the family tree be a vertex and let there be an edge between two vertices if one of the corresponding individuals is a child of the other. Label the vertex corresponding to the aforementioned individual as the root vertex. Then, all adjacent vertices represent that individual's child, and, in strict analogy, these nodes are said to be '''children''' of the root node. In general, in a rooted tree, if two nodes are adjacent, the one further away from the root is considered to be a child of the one closer, and the one closer is called the '''parent''' of the one further away. (A node will always have exactly one parent, unless it is the root.) Furthermore, given some node <math>u</math>, the node itself, its children, its children's children, and so on, are called the node's '''descendants'''; the term ''proper descendant'' is sometimes taken to mean the same but excluding <math>u</math> itself. Likewise, <math>u</math>, <math>u</math>'s parent, <math>u</math>'s parent's parent, and so on, are called '''ancestors''' (with the term ''proper ancestor'' being defined analogously). The root is ancestral to all nodes.
+
* The ''family tree'' consisting of all descendants of an individual: This, too, is named for its resemblance to an organic tree, and it is no surprise that it can be placed into analogy with a graph-theoretic tree as well. Let each person in the family tree be a vertex and let there be an edge between two vertices if one of the corresponding individuals is a child of the other. Label the vertex corresponding to the aforementioned individual as the root vertex. Then, all adjacent vertices represent that individual's child, and, in strict analogy, these nodes are said to be '''children''' of the root node. In general, in a rooted tree, if two nodes are adjacent, the one further away from the root is considered to be a child of the one closer, and the one closer is called the '''parent''' of the one further away. (A node will always have exactly one parent, unless it is the root.) Furthermore, given some node <math>u</math>, the node itself, its children, its children's children, and so on, are called the node's '''descendants'''; the term ''strict descendant'' is sometimes taken to mean the same but excluding <math>u</math> itself. Likewise, <math>u</math>, <math>u</math>'s parent, <math>u</math>'s parent's parent, and so on, are called '''ancestors''' (with the term ''strict ancestor'' being defined analogously). The root is ancestral to all nodes.
 
* In the ''tree of life'', each vertex represents a species and edges represent evolution of one species into another. The root of this tree is some universal common ancestor of life on Earth, and the leaves of this tree are either extant species or species that have gone extinct without radiating or transitioning to a newer species.
 
* In the ''tree of life'', each vertex represents a species and edges represent evolution of one species into another. The root of this tree is some universal common ancestor of life on Earth, and the leaves of this tree are either extant species or species that have gone extinct without radiating or transitioning to a newer species.
 
* A corporate hierarchy can theoretically be represented by a rooted tree, where each employee is a vertex and a vertex's children are those vertices corresponding to the employees managed by subordinates, and the vertex corresponding to the CEO (or equivalent) is the root of the tree. Hierarchies in general are easily representable by trees.
 
* A corporate hierarchy can theoretically be represented by a rooted tree, where each employee is a vertex and a vertex's children are those vertices corresponding to the employees managed by subordinates, and the vertex corresponding to the CEO (or equivalent) is the root of the tree. Hierarchies in general are easily representable by trees.

Please note that all contributions to PEGWiki are considered to be released under the Attribution 3.0 Unported (see PEGWiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

Cancel | Editing help (opens in new window)
Retrieved from "https://wcipeg.com/wiki/Tree"