title: graph coloring using BFS - greedy coloring?
body: <p>Thinking if I can implement graph coloring using BFS, I came up with the approach pseudo coded below.</p>
  
  <p>Though it does appear like a greedy algorithm, I am not sure of it's correctness. Any expert comments? </p>
  
  <pre><code>colors[MAX_COLORS];
  colorsUsedSoFar[] = NIL;
  like BFS, color first node u with colors[0] i.e color[u] = colors[0];
  colorsUsedSoFar[] += colors[0];
  
  for each node v adjacent to u{
    (if v not already colored){
       color[v] = color from the colorsUsedSoFar[] but NotUsedByItsAdjacents
       If all the colors in colorsUsedSoFar[] are used by adjacents, assign a new color to v)
    }
  }
  </code></pre>
  
  <p>By 'like BFS', I meant using a Queue and processing until Queue exhausts.</p>