Tree structure: Difference between revisions

Content deleted Content added
the tree is generally shown upside down compared with a real tree, that is to say with the root at the top and the leaves at the bottom.
tweaks only
Line 3:
<div style="width: 302px; float: right;">[[Image:binary-tree-structure.png]]<br>''Illustration: A tree structure showing the possible hierarchical organization of an encyclopedia. This specific example happens to a [[binary tree]], which means all nodes have exactly zero or two child nodes.''</div>
 
The lines connecting elements are called ''branches'', the elements themselves are called ''[[node|nodes]]''. Nodes without children are called ''end-nodes'' or ''leafsleaves''.
 
The names of relationships between nodes are modelled after family relations. In computer sciences, traditionally only names for male family members have been used. In linguistics, the names of female family members are used. It is said that this was an express counter movement to the traditional naming convention, started by the female students of linguist [[Noam Chomsky]].
Line 9:
The starting node is often called the ''root''.
 
* A node is a ''parent'' of another node, if it is the node one step higher up in the hierarchy and closer to the root node.
* A node is a ''sibling'' (''brother'' or ''sister'') of another node, if they have the same parent nodes.
 
* A given node is aconsidered ''sibling''to (''brother''be oran ''sisterancestor'') of anotherall node,the iflower theylevel havenodes to which the samegiven parentnode nodesis connected.
 
In the example, 'encyclopedia' is the parent of 'science' and 'culture', its children. 'Art' and 'craft' are siblings, and children of 'culture'.
 
A given node is considered to be an ''ancestor'' of all the lower level nodes to which the given node is connected.
 
Tree structures are used to depict all kinds of [[taxonomy|taxonomical]] knowledge, such as family trees, the grammatical structure of a language (the famous example being S -> NP VP, meaning a sentence is a noun phrase and a verb phrase), the way web pages are logically ordered in a web site, et cetera.