Two coloring a tree

854 Views Asked by At

Suppose we color the nodes of a tree $T=(V,E)$ with two colors, red and blue, so that any two adjacent nodes have different colors.

Can we claim that

  1. If there is an even-length path between two nodes $u,v$, then they have different colours.

  2. If there is an odd-length path between two nodes $u,v$, then they have different colours.

For 1. I think it's false because if we assign the same colors to $u,v$, then we can't color $T$. My question is are there a stronger proof for 1 and 2? because i think maybe my proof is wrong.

1

There are 1 best solutions below

0
On

You are correct that 1 is false but your argument is not very clear.

If vertex $u$ is coloured red then any vertex, $v$, distance $1$ from $u$ must be coloured blue.

Then any vertex, $w$, distance $1$ from $v$ must be coloured red and so on ...

As an exercise you could write out a proof by induction that any vertex distance $n$ from $u$ is coloured blue if and only if $n$ is odd.