All Topics  
Tree (graph theory)

 

   Email Print
   Bookmark   Link






 

Tree (graph theory)



 
 
In mathematics
Mathematics

Mathematics is the study of quantity, structure, space, change, and related topics of pattern and form. Mathematicians seek out patterns whether found in numbers, space, natural science, computers, imaginary abstractions, or elsewhere....
, more specifically graph theory
Graph theory

In mathematics and computer science, graph theory is the study of graph : mathematical structures used to model pairwise relations between objects from a certain collection....
, a tree is a graph
Graph (mathematics)

In mathematics a graph is an abstract representation of a set of objects where some pairs of the objects are connected by links. The interconnected objects are represented by mathematical abstractions called vertices, and the links that connect some pairs of vertices are called edges....
 in which any two vertices
Vertex (graph theory)

In graph theory, a vertex or node is the fundamental unit out of which graphs are formed: an undirected graph consists of a set of vertices and a set of edges , while a directed graph consists of a set of vertices and a set of arcs ....
 are connected by exactly one path
Path (graph theory)

In graph theory, a path in a graph is a sequence of vertex such that from each of its vertices there is an edge to the next vertex in the sequence....
. Alternatively, any connected
Connectedness

In mathematics, connectedness is used to refer to various properties meaning, in some sense, "all one piece". When a mathematical object has such a property, we say it is connected; otherwise it is disconnected....
 graph with no cycles
Cycle (graph theory)

Cycle in graph theory and computer science has several meanings:* A closed walk, with repeated vertex allowed. See path . * A closed path, with no other repeated vertices than the starting and ending vertices....
 is a tree. A forest is a disjoint union
Disjoint union

In set theory, a disjoint union is a modified union operation which indexes the elements according to which set they originated in.Formally, let be a family of sets indexed by I....
 of trees. Trees are widely used in computer science
Computer science

Computer science is the study of the theoretical foundations of information and computation, and of practical techniques for their implementation and application in computer systems....
 data structures such as binary search tree
Binary search tree

In computer science, a binary search tree is a binary tree data structurewhich has the following properties:* Each node has a distinct value....
s, heap
Heap

Heap may refer to:In computer science:* heap , a tree-like data structure* The heap is the area of memory used for dynamic memory allocation...
s, trie
Trie

In computer science, a trie, or prefix tree, is an ordered tree data structure data structure that is used to store an associative array where the keys are usually string s....
s, Huffman trees for data compression
Data compression

In computer science and information theory, data compression or source coding is the process of encoding information using fewer bits than an code representation would use through use of specific encoding schemes....
, etc.

i>G has finitely many vertices, say n of them, then the above statements are also equivalent to any of the following conditions:

An undirected simple graph G is called a forest if it has no simple cycles.

The term hedge sometimes refers to an ordered sequence of trees.

A directed tree is a directed graph
Directed graph

A directed graph or digraph is a pair G= of:* a Set V, whose element are called vertices or nodes,* a set A of ordered pairs of vertices, called arcs, directed edges, or arrows....
 which would be a tree if the directions on the edges were ignored.






Discussion
Ask a question about 'Tree (graph theory)'
Start a new discussion about 'Tree (graph theory)'
Answer questions from other users
Full Discussion Forum



Encyclopedia


In mathematics
Mathematics

Mathematics is the study of quantity, structure, space, change, and related topics of pattern and form. Mathematicians seek out patterns whether found in numbers, space, natural science, computers, imaginary abstractions, or elsewhere....
, more specifically graph theory
Graph theory

In mathematics and computer science, graph theory is the study of graph : mathematical structures used to model pairwise relations between objects from a certain collection....
, a tree is a graph
Graph (mathematics)

In mathematics a graph is an abstract representation of a set of objects where some pairs of the objects are connected by links. The interconnected objects are represented by mathematical abstractions called vertices, and the links that connect some pairs of vertices are called edges....
 in which any two vertices
Vertex (graph theory)

In graph theory, a vertex or node is the fundamental unit out of which graphs are formed: an undirected graph consists of a set of vertices and a set of edges , while a directed graph consists of a set of vertices and a set of arcs ....
 are connected by exactly one path
Path (graph theory)

In graph theory, a path in a graph is a sequence of vertex such that from each of its vertices there is an edge to the next vertex in the sequence....
. Alternatively, any connected
Connectedness

In mathematics, connectedness is used to refer to various properties meaning, in some sense, "all one piece". When a mathematical object has such a property, we say it is connected; otherwise it is disconnected....
 graph with no cycles
Cycle (graph theory)

Cycle in graph theory and computer science has several meanings:* A closed walk, with repeated vertex allowed. See path . * A closed path, with no other repeated vertices than the starting and ending vertices....
 is a tree. A forest is a disjoint union
Disjoint union

In set theory, a disjoint union is a modified union operation which indexes the elements according to which set they originated in.Formally, let be a family of sets indexed by I....
 of trees. Trees are widely used in computer science
Computer science

Computer science is the study of the theoretical foundations of information and computation, and of practical techniques for their implementation and application in computer systems....
 data structures such as binary search tree
Binary search tree

In computer science, a binary search tree is a binary tree data structurewhich has the following properties:* Each node has a distinct value....
s, heap
Heap

Heap may refer to:In computer science:* heap , a tree-like data structure* The heap is the area of memory used for dynamic memory allocation...
s, trie
Trie

In computer science, a trie, or prefix tree, is an ordered tree data structure data structure that is used to store an associative array where the keys are usually string s....
s, Huffman trees for data compression
Data compression

In computer science and information theory, data compression or source coding is the process of encoding information using fewer bits than an code representation would use through use of specific encoding schemes....
, etc.

Definitions


A tree is an undirected simple graph
Graph (mathematics)

In mathematics a graph is an abstract representation of a set of objects where some pairs of the objects are connected by links. The interconnected objects are represented by mathematical abstractions called vertices, and the links that connect some pairs of vertices are called edges....
 G that satisfies any of the following equivalent conditions:

  • G is connected and has no cycles.
  • G has no cycles, and a simple cycle is formed if any edge is added to G.
  • G is connected, and it is not connected anymore if any edge is removed from G.
  • G is connected and the 3-vertex complete graph
    Complete graph

    In graph theory, a complete graph is a simple graph in which every pair of distinct vertex is connected by an edge . The complete graph on n vertices has n vertices and n/2 edges, and is denoted by ....
      is not a minor
    Minor (graph theory)

    In graph theory, a graph H is called a minor of the graph G if H is Graph isomorphism to a graph that can be obtained by zero or more edge contractions on a subgraph of G....
     of G.
  • Any two vertices in G can be connected by a unique simple path
    Path (graph theory)

    In graph theory, a path in a graph is a sequence of vertex such that from each of its vertices there is an edge to the next vertex in the sequence....
    .
If G has finitely many vertices, say n of them, then the above statements are also equivalent to any of the following conditions:
  • G is connected and has n − 1 edges.
  • G has no simple cycles and has n − 1 edges.


An undirected simple graph G is called a forest if it has no simple cycles.

The term hedge sometimes refers to an ordered sequence of trees.

A directed tree is a directed graph
Directed graph

A directed graph or digraph is a pair G= of:* a Set V, whose element are called vertices or nodes,* a set A of ordered pairs of vertices, called arcs, directed edges, or arrows....
 which would be a tree if the directions on the edges were ignored. Some authors restrict the phrase to the case where the edges are all directed towards a particular vertex, or all directed away from a particular vertex (see arborescence
Arborescence (graph theory)

In graph theory, an arborescence is a directed graph in which, for a vertex called the root and any other vertex , there is exactly one directed path from to ....
.)

A tree is called a rooted tree if one vertex has been designated the root, in which case the edges have a natural orientation, towards or away from the root. The tree-order is the partial ordering on the vertices of a tree with u = v if and only if the unique path from the root to v passes through u. A tree which is a subgraph of some graph G is a normal tree if the ends of every edge in G are comparable in this tree-order . Rooted trees, often with additional structure such as ordering of the neighbors at each vertex, are a key data structure in computer science; see tree data structure. In a context where trees are supposed to have a root, a tree without any designated root is called a free tree.

A polytree
Polytree

In graph theory, a polytree is a Graph with at most one undirected path between any two vertices. In other words, a polytree is a directed acyclic graph for which there are no undirected cycles either....
 has at most one undirected path between any two vertices. In other words, a polytree is a directed acyclic graph
Directed acyclic graph

In computer science and mathematics, a directed acyclic graph, also called a DAG, is a with no ; that is, for any Vertex v, there is no nonempty directed path that starts and ends on v....
 (DAG) for which there are no undirected cycles either.

A labeled tree is a tree in which each vertex is given a unique label. The vertices of a labeled tree on n vertices are typically given the labels 1, 2, …, n. A recursive tree is a labeled rooted tree where the vertex labels respect the tree order (i.e., if u < v for two vertices u and v, then the label of u is smaller than the label of v).

An irreducible (or series-reduced) tree is a tree in which there is no vertex of degree 2.

An ordered tree is a tree for which an ordering is specified for the children of each node.

An n-ary tree
K-ary tree

In graph theory, a k-ary tree is a rooted tree in which each node has no more than k children. It is also sometimes known as a k-way tree, an N-ary tree, or an M-ary tree....
 is a tree for which each node which is not a leaf has at most n children. 2-ary trees (resp. 3-ary trees) are sometimes called binary tree
Binary tree

In computer science, a binary tree is a Tree in which each node has at most two child node. Typically the child nodes are called left and right....
s (resp. ternary trees)

Example


The example tree shown to the right has 6 vertices and 6 − 1 = 5 edges. The unique simple path connecting the vertices 2 and 6 is 2-4-5-6.

Facts


  • Every tree is a bipartite graph
    Bipartite graph

    In the mathematics field of graph theory, a bipartite graph is a graph whose vertex can be divided into two disjoint sets U and V such that every edge connects a vertex in U to one in V; that is, U and V are independent sets....
     and a median graph
    Median graph

    In mathematics, and more specifically graph theory, a median graph is an undirected graph in which any three vertex a, b, and c have a unique median: a vertex m that belongs to shortest paths between any two of a, b, and c....
    . Every tree with only countably
    Countable set

    In mathematics, a countable set is a Set with the same cardinality as some subset of the set of natural numbers. The term was originated by Georg Cantor; it stems from the fact that the natural numbers are often called counting numbers....
     many vertices is a planar graph
    Planar graph

    In graph theory, a planar graph is a graph which can be graph embedding in the plane, i.e., it can be drawn on the plane in such a way that its edges intersect only at their endpoints....
    .


  • Every connected graph G admits a spanning tree
    Spanning tree (mathematics)

    In the mathematics field of graph theory, a spanning tree T of a connected graph, undirected graph G is a tree composed of all the vertices and some of the edges of G....
    , which is a tree that contains every vertex of G and whose edges are edges of G. Every connected graph even admits a normal spanning tree .


  • Every finite tree with at least two vertices, say n, has at least two leaves or vertices of degree 1. The minimal number of leaves corresponds to the path graph
    Path graph

    In the Mathematics field of graph theory, a path graph is a particularly simple example of a tree , namely one which is not branched at all, that is, contains only nodes of degree two and one....
     and the maximal number (n - 1) corresponds to the star graph.


  • For any three vertices in a tree, the three paths between them have at least one vertex in common.


Enumeration


Given n labeled vertices, there are nn−2 different ways to connect them to make a tree. This result is called Cayley's formula
Cayley's formula

In mathematics, Cayley's formula is a result in graph theory named after Arthur Cayley. It states that for any integer n, the number of Tree on n labeled vertex is...
. It can be proved by first showing that the number of trees with n vertices of degree d1,d2,...,dn is the multinomial coefficient
Multinomial theorem

In mathematics, the multinomial theorem says how to write a power of a sum in terms of powers of the terms in that sum. It is the generalization of the binomial theorem to polynomials....


Counting the number of unlabeled trees is a harder problem. No closed formula for the number t(n) of trees with n vertices up to
Up to

In mathematics, the phrase "up to xxxx" indicates that members of an equivalence class are to be regarded as a single entity for some purpose. "xxxx" describes a property or process which transforms an element into one from the same equivalence class, i.e....
 graph isomorphism
Graph isomorphism

In graph theory, an isomorphism of graph s G and H is a bijection between the vertex sets of G and Hsuch that any two vertices u and v of G are adjacent in G if and only if ? and ? are adjacent in H....
 is known. proved that with C = 0.53495… and a = 2.95576… (here, means that ).

Types of trees


See List of graph theory topics: Trees
List of graph theory topics

This is a list of graph theory topics, by Wikipedia page.See glossary of graph theory for basic terminologyExamples and types of graphs...
.


See also


  • Binary tree
    Binary tree

    In computer science, a binary tree is a Tree in which each node has at most two child node. Typically the child nodes are called left and right....
  • Decision tree
    Decision tree

    A decision tree is a decision support tool that uses a tree-like Diagram or Causal model of decisions and their possible consequences, including chance event outcomes, resource costs, and utility....
  • Pseudoforest
    Pseudoforest

    In graph theory, a pseudoforest is an undirected graph in which every Connected component has at most one Cycle . That is, it is a system of Vertex and Edge connecting pairs of vertices, such that no two cycles of consecutive edges share any vertex with each other, nor can any two cycles be connected to each other by a path of consecutiv...
  • Tree structure
    Tree structure

    A tree structure is a way of representing the hierarchy nature of a structure in a graphical form.It is named a "tree structure" because the graph looks a bit like a tree, even though 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....
  • Tree data structure