Graph coloring and directed edges

747 Views Asked by At

Proof that graph $G$ is $k$ colored if and only if we can indicate his edges acyclic such that new directed graph doesn't contain path with $k$ edges

I want to say something about my approach but this is one of these task where I have spent hours and didn't get nothing. I suspect that in "$ \implies $" we can show some strategy to build such graph. For example I have colors $$ c_1,c_2,c_3, ...,c_k $$ such that $$ c_1 < c_2 < ...<c_k $$ and use it for strategy. I tried for example choosing in each step smallest possible color but it is not good algorithm

1

There are 1 best solutions below

0
On BEST ANSWER

Claim 1 stated below is the "only if" direction, whereas Claim 2 stated below is the "if" direction. Make sure you see this.

Claim 1: If $G$ has a proper $k$ coloring then there is a way to orient each edge of $G$ so that he resulting graph has no directred path with $k$ edges.

Proof Sketch: Let us write $k$ colors as $1,2, \ldots, k$, and the vertices colored $i$ as $V_i$. Then for each edge $uv$, let $i$ and $j$ be such that $u \in V_i$ and $v \in V_j$. Note that $i \not = j$, so if $i<j$ direct the edge $uv$ from $u$ to $v$, and if $j<i$ direct the edge $uv$ from $v$ to $u$. Can you see that the resulting digraph has no directed path with $k$ or more edges.

Claim 2: If $G$ is a DAG that has no directed path with $k$ or more edges then there is a proper $k$-coloring of $G$.

Proof Sketch: Indeed, use induction. Note that, as $G$ is acyclic, every maximal directed path in $G$ has a vertex of indegree 0 [make sure you see this for yourself!]. So let $V_1$ be the set of vertices of $G$ with indegree 0. Then note the following: $G \setminus V_1$ is a DAG and has no directed path with $k-1$ or more edges [make sure you see this for yourself], so $G \setminus V_1$ is $(k-1)$-colorable by induction. Also note that there are no arcs in $G$ from one vertex in $V_1$ to another i.e., $V_1$ is an independent set in $G$. So color every vertex in $V_1$ with the $k$-th color; this and the proper coloring of $G \setminus V_1$ that uses only the first $k-1$ colors, prescribes a proper $k$-coloring of $G$.