3
$\begingroup$

This question is from a home assignment but it makes no sense to me.

Construct a sequence of trees $(T_n)^∞_{n=1}$ with an ordering of their vertices such that the greedy colouring algorithm uses n colours to find a proper colouring of $T_n$.

From what I can tell, the greedy coloring algorithm always ends up using just two colors when coloring a tree regardless of the ordering of vertices but this question assumes otherwise. Am I wrong? I'm completely stuck on this.

  • 0
    ***the greedy coloring algorithm always ends up using just two colors when coloring a tree regardless of the ordering of vertices*** What if the tree is a path of $4$ vertices, and you color the two end vertices first? How many colors do you end up using in that case?2017-01-04
  • 0
    @bof That still only uses 3 colors for a tree with 4 vertices though, right?2017-01-04
  • 0
    The problem doesn't say that $T_n$ is a tree with $n$ vertices. Hint: $T_{n+1}$ may have twice as many vertices as $T_n$.2017-01-04
  • 0
    @bof No, but I sort of assumed so based on our lecture notes. The professor uses notation that implies that $T_n$ has $n$ vertices. Partial credit is offered for doing the coloring for $n=2,3,4,5$ too, so it sort of makes sense.2017-01-04
  • 0
    Your title asks a different question to the one in the body. The number of vertices is specified in the first one and not in the second.2017-01-04
  • 0
    You guys, I hadn't even considered that the tree doesn't have $n$ vertices! I just assumed so because of the way he uses $T_n$ in his lecture notes. My mind is blown right now. The question finally makes sense. Thank you so much!2017-01-04
  • 0
    The interpretation that $T_n$ must have $n$ vertices is impossible. There is only one tree with $3$ vertices and however you order the vertices the greedy coloring will only use $2$ colors.2017-01-04
  • 0
    @bof I see that now, the professor always used $T_n$ to mean a tree with $n$ vertices in the lecture notes, which is why this question was so confusing to me!2017-01-04
  • 0
    If fact, if $G$ is a graph on $n$ vertices, and if there is some ordering for which the greedy algorithm uses $n$ colors, then $G=K_n.$2017-01-06

1 Answers 1

1

There is a simple recursive construction where $T_n$ is a tree of order $2^{n-1}.$ In each case we order the vertices so that vertices of lower degree are colored before vertices of higher degree.

For $n=1$ we can take $T_1=P_1=K_1.$

For $n=2$ we can take $T_2=P_2=K_2.$

For $n=3$ we can take $T_3=P_4;$ it has vertices $v_1,v_2,v_3,v_4$ and edges $v_1v_2,v_2v_3,v_3v_4.$

For $n=4$ start with the graph $T_3$ and add new vertices $v_1',v_2',v_3',v_4'$ and edges $v_1v_1',v_2v_2',v_3v_3',v_4v_4'.$