Rank, term rank and chromatic number of a graph