2-Coloring a tree with 2n vertices with additional constraint. Suppose given a tree T with n pair of vertices V={(p_0, q_0), …,(p_n, q_n)}.

Beckett Henry

Beckett Henry

Answered question

2022-09-06

2-Coloring a tree with 2n vertices with additional constraint
Suppose given a tree T with n pair of vertices T . But my problem is as follow:
I want coloring T with 2 colors such that each pair ( p i , q i ) has different color. Are there any proof or paper that show us it's possible or not?

Answer & Explanation

Dwayne Small

Dwayne Small

Beginner2022-09-07Added 12 answers

Step 1
It's in general not possible. Take the simple tree with one root r and three child leaves c 1 , c 2 , c 3 .
Step 2
If we take V = { ( r , c 1 ) , ( c 2 , c 3 ) } we can't get a 2-coloring as you want. If c 2 and c 3 have a different color, r - which is neighbor of c 2 and c 3 - needs a third color so that it works out.
Clarence Mills

Clarence Mills

Beginner2022-09-08Added 18 answers

Step 1
Such a coloring exists if and only if the distance between any of the ( p i , q i ) is odd. The distance between two vertices is the number of edges in a shortest path between them.
Step 2
Proof Suppose that indeed all such distance are odd, and color the tree T . Take a path from p i to q i , say p i , v 1 , , v k , q i . As the coloring of the tree is proper, v 1 has a different color than p i , and v 2 has a different color than v 1 , etc. As the path will have an odd number of edges, k is even, and so v k has the same color as p i and q i has different color then v k . So p i and q i have different colors.
Now suppose that the distance from p i to q i is even, and let p i , v 1 , , v k , q i be the path connecting them with k odd. Suppose that we have a proper coloring of the tree where p i and q i have different color. Then v 1 and v k must also have different colors. And v 2 and v k 1 must also have different colors, etc. And v ( k 1 ) / 2 and v ( k + 1 ) / 2 + 1 must also have different colors. But then there is no color that v ( k + 1 ) / 2 can have that is distinct from the colors of these last two vertices.

Do you have a similar question?

Recalculate according to your conditions!

New Questions in Discrete math

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?