Блог пользователя Vesper_Lynd

Автор Vesper_Lynd, история, 7 лет назад, По-английски

I was given the assignment problem related to finding chromatic number of the graph and i was able to write a solution at that time,but i realised from my friend that it is an NP hard problem and i used "BFS" to just implement so i think it should fail at some test case, so can anybody help me finding the test case to prove it wrong!!

/*Here is the code*/

LINK

Regards!!

  • Проголосовать: нравится
  • -17
  • Проголосовать: не нравится

»
7 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Auto comment: topic has been updated by Vesper_Lynd (previous revision, new revision, compare).

»
7 лет назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

Hello, actually I got a same question on Kattis, and the problem link is Problme Link

You can use Welsh-Powell Algorithm for this, it produces a better result. Here is the link to a paper Link