[Math] Labeling vertices in a graph

combinatoricsgraph theory

I don't fully understand what labeling vertices is for.

Why would I want to label a graph? And why for example, does Cayley's formula only apply to cases with labeled vertices?

I understand it's meant to differentiate the vertices from each other, but how does this influence the number of trees on labeled vertices?

Best Answer

Consider the very simple tree with one vertex of degree $2$ and two vertices of degree $1$. If I don’t label the vertices, all such trees are isomorphic: for all practical purposes there is only one such tree, though I can draw it in various ways. Two of these ways are shown below:

            *                     
           / \                  *--*--*  
          *   *

No matter how I draw it, the vertex of degree $2$ is adjacent to each of the other two vertices.

If I label the vertices with the numbers $1,2$, and $3$, however, there are $3$ distinguishable trees: the vertex of degree $2$ can always be distinguished from the other two vertices, since they have a different degree, so labelling that vertex $1$ is different from labelling it $2$ or $3$. The three labelled trees shown below are not the same when the labelling is taken into account:

        1--2--3           2--1--3              1--3--2

However, the first of these is indistinguishable from

        3--2--1

which is just the same labelled tree turned around: both have vertex $2$ as the unique vertex of degree $2$, and it is adjacent to each of vertices $1$ and $3$. It’s still the same labelled tree when I draw it in either of these ways:

           2                   2  
          / \                 / \  
         3   1               1   3

To give a concrete, everyday example, a family tree for one person extending back to the grandparents looks (in almost all cases) like this:

         D   E   F   G  
          \ /     \ /
           B       C
            \     /
             \   /
              \ /  
               A

The vertices are labelled with the names of the people involved. If you shift the labels around, you get a different family tree. A is a child of B, but if you interchange the labels A and B, you have a tree showing B as the child of A, a very different thing.