GATE CSE
First time here? Checkout the FAQ!
x
0 votes
56 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 (53.8k points)   | 56 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 (721 points)  


Top Users May 2017
  1. akash.dinkar12

    3308 Points

  2. pawan kumarln

    1884 Points

  3. Bikram

    1656 Points

  4. sh!va

    1640 Points

  5. Arjun

    1396 Points

  6. Devshree Dubey

    1272 Points

  7. Debashish Deka

    1162 Points

  8. Angkit

    1048 Points

  9. LeenSharma

    1010 Points

  10. Arunav Khare

    754 Points

Monthly Topper: Rs. 500 gift card
Top Users 2017 May 22 - 28
  1. Bikram

    742 Points

  2. pawan kumarln

    510 Points

  3. Arnab Bhadra

    490 Points

  4. bharti

    304 Points

  5. LeenSharma

    248 Points


22,832 questions
29,157 answers
65,233 comments
27,673 users