I couldn't figure out an algorithm for following graph coloring problem:
Output color of each vertex for this graph:
Given a solved 9*9 sudoku board that is a 9-colored board, applied first three rules below( a 4*4 one is in the picture as example),
Output a new k-coloring(k > 9) for the graph made from the input when we also applied rule number four.
Edge incidence rules:
1. There exists an edge between every pair of cells that are in the same row.
- There exists an edge between every pair of cells that are in the same column.
- There exists an edge between every pair of cells that are in the same 3*3 square.
- There exists an edge between every pair of cells that have the same label in the input board, that is an edge connects every cell labeled with number 1 to every other cell with the label 1, and every 2 is connected to any other 2s, and ...
Edit:
I wondered whether there is an algorithm with tighter upper bound on k than the usual greed algorithm or not.
(The greedy algorithm's upper bound on k is maximum of degrees of vertices of the graph plus one)
Till now I just figured out that the subgraph that contains each color in the input is a clique when the rule four applied, That is there is a clique with vertices labeled 1, a clique with vertices all labeled 2, and so on.Since there is an edge between every pair of vertices with the same label so they are all connected, thus we have a complete subgraph, i.e. clique.