GATE CSE
First time here? Checkout the FAQ!
x
0 votes
43 views
Consider a tree with n nodes, where a node can be adjacent to maximum 4 other nodes.Then the minimum number of color needed to color the tree, so that no two adjacent node gets same color?
asked in Algorithms by Veteran (49.7k points)   | 43 views
answer 2 ???
why? because it's a tree can take 1 color in each level,rt?
I think same

1 Answer

0 votes
2 colours are required as it is tree no cycle so one colour will be for each level 0 then one colour for level 1 then first colour for level 2 and so on...
answered by Junior (679 points)  
Top Users Jan 2017
  1. Debashish Deka

    8608 Points

  2. sudsho

    5398 Points

  3. Habibkhan

    4718 Points

  4. Bikram

    4522 Points

  5. Vijay Thakur

    4468 Points

  6. saurabh rai

    4222 Points

  7. Arjun

    4122 Points

  8. santhoshdevulapally

    3742 Points

  9. Sushant Gokhale

    3576 Points

  10. GateSet

    3394 Points

Monthly Topper: Rs. 500 gift card

19,177 questions
24,073 answers
52,975 comments
20,310 users