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


Top Users Sep 2017
  1. Habibkhan

    6334 Points

  2. Warrior

    2202 Points

  3. Arjun

    2150 Points

  4. nikunj

    1980 Points

  5. manu00x

    1726 Points

  6. SiddharthMahapatra

    1718 Points

  7. Bikram

    1706 Points

  8. makhdoom ghaya

    1650 Points

  9. A_i_$_h

    1518 Points

  10. rishu_darkshadow

    1512 Points


25,979 questions
33,554 answers
79,348 comments
31,011 users