The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
0 votes
93 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 (70.1k points) | 93 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 (853 points)


Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

29,017 questions
36,844 answers
91,385 comments
34,723 users