• A tree is an undirected graph that satisfies any of the following equivalent conditions:

    • is connected, acyclic (contain no cycles)
  • Let be an undirected graph with finite number of vertices.

    • Any two of the following statements imply the third:
      • is connected
      • is acyclic
    • The following statements are equivalent:
      • is tree
      • has no simple cycles, and
      • is connected, and
  • A rooted tree is a tree in which one vertex has been designated as the root

    • A vertex is the parent of a vertex if the edge is in the path from the root to , In this case is a child of .
    • A vertex is a descendant of a vertex if is in the path from the root to . In this case, is an ancestor of .
    • A leaf is a vertex of degree 1 that is not the root. Equivalently, a leaf is a vertex that has no descendants.
  • (q2.3) A tree with at least 2 vertices has at least 2 leaves

  • Every tree is bipartite

Forest

  • forest is an acyclic graph
  • forest is an graph in which any two vertices are connected by at most one path
  • every of component in forest is tree
  • is number of components (trees) in forest

Cayley’s formula

  • Cayley’s formula (2.9) - The number of labeled trees with vertices is

Prüfer sequence

  • Prüfer sequence of a labeled tree is a unique sequence associated with the tree. The sequence for a tree on vertices has length
  • There is Bijection between Prüfer Sequences and Labeled Trees. That is, every labeled tree has a unique Prüfer sequence that defines it, and every Prüfer sequence defines just one labeled tree.
  • The labels that appear in the Prüfer sequence are not leaves, and their deggree is the number of appearances in the sequence .
  • The labels that not appear in the sequence are leaves, that is their deggree is 1.

Prüfer Sequence to Labeled Tree

Given a Prüfer sequence, it is possible to generate a finite labeled tree corresponding to that sequence.

Let be a Prüfer sequence. This will be called the sequence.

It is assumed the sequence is not empty.

  1. Draw the nodes of the tree we are to generate, and label them from to . This will be called the tree.
  2. Make a list of all the integers . This will be called the list.
  3. If there are two numbers left in the list, connect them with an edge and then stop. Otherwise, continue on to step 4.
  4. Find the smallest number in the list which is not in the sequence, and also the first number in the the sequence. Add an edge to the tree connecting the nodes whose labels correspond to those numbers.
  5. Delete the first of those numbers from the list and the second from the sequence. This leaves a smaller list and a shorter sequence. Then return to step 3.

Labeled Tree to Prüfer Sequence

Given a finite labeled tree, it is possible to generate a Prüfer sequence corresponding to that tree.

Let be a labeled tree of order , where the labels are assigned the values to .

  1. If there are two (or less) nodes in , then stop. Otherwise, continue on to step 2.
  2. Find all the nodes of of degree . There are bound to be some, from Finite Tree has Leaf Nodes. Choose the one with the lowest label.
  3. Look at the node adjacent to , and assign the label of to the first available element of the Prüfer sequence being generated.
  4. Remove the node and its incident edge. This leaves a smaller tree . Go back to step 1.