TITLE: Upper bound for chromatic number of partitioned graph.
QUESTION [5 upvotes]: Let $G=(V,E)$ be a graph that satisfies:
$(1)$ $V= \dot\cup_{k=1}^n V_k.$
$(2)$ For all $i,j \in \{1,...,n\}$ there exists a vertex in $V_i$ and a vertex in $V_j$ that are not an edge of $G$.
Then it holds that $\chi(G) \leq v-n+1,$ where $v$ denotes the number of vertices of $G$.
My idea was to use induction on $n$, where the base case $n=1$ follows since $\chi(G)$ has to be less or equal than $v$.
Now for the induction step, I can consider the parition $V=(\dot\cup_{k=1}^n V_k) \dot\cup V_{n+1}.$ Using the induction hypothesis yields $\chi(G') \leq v(G') - n+1$ and $\chi(G'') \leq v(G''),$ where $G'$ denotes the induced Graph on $V_1,...,V_k$ and $G''$ denotes the Graph induced by $V_{n+1}$. However, I am neither sure how to combine the two colorings to obtain the desired statement nor if this is a good approach. Thanks in advance for any help.

REPLY [2 votes]: I think I finally understand @kabenyuk's answer. I'm going to rewrite it in a way that I find easier to understand. To justify such a repetitive answer, I will state the result in a slightly more general form.
Theorem. Let $n$ be a positive integer. Let $G=(V,E)$ be a (finite) graph of order $v=|V|$. Suppose the vertex set $V$ is partitioned into $n$ disjoint subsets $V_1,\dots,V_n$. Let $W_i=V_1\cup V_2\cup\cdots\cup V_i$. Suppose that, for each $j$ ($1\lt j\le n$), there exist a set $X_j\subseteq W_{j-1}$ and a mapping $f_j:X_j\to V_j$ such that $|X_j|=j-1$ and $\{x,f_j(x)\}\notin E$ for all $x\in X_j$. Then $\chi(G)\le v-n+1$.
[This is more general because the set $X_j$ is not required to consist of one element from each of the sets $V_1,\dots,V_{j-1}$, just any $j-1$ elements of $W_{j-1}=V_1\cup\cdots\cup V_{j-1}$.]
The proof is by induction on $n$. The case $n=1$ being trivial, we assume $n\gt1$. By induction, the subgraph induced by $W_{n-1}$ can be properly colored with at most $|W_{n-1}|-n+2$ colors; let such a coloring be fixed.
By hypothesis we have a set $X_n\subseteq W_{n-1}$ and a mapping $f_n:X_n\to V_n$ such that $|X_n|=n-1$ and $\{x,f_n(x)\}\notin E$ for all $x\in X_n$. We consider two cases.
Case 1. Every color occurring in $X_n$ also occurs in $W_{n-1}\setminus X_n$.
Suppose $k$ different colors $c_1,\dots,c_k$ occur in $X_n$. Choose vertices $v_1,\dots,v_k\in W_{n-1}\setminus X_n$ with $v_i$ of color $c_i$. Then $\{v_1,\dots,v_k\}\cup X_n$ is a set of $k+n-1$ vertices of $G$ which is properly colored with $k$ colors, whence $\chi(G)\le v-n+1$ by giving distinct colors to all other vertices of $G$.
Case 2. Some color $c$ occurs in $X_n$ but not in $W_{n-1}\setminus X_n$.
By assigning a distinct new color to each vertex in $V_n$ we get a proper coloring of $G$ with at most $v-n+2$ colors. But since color $c$ occurs only in $X_n$, we can abolish color $c$ by recoloring each vertex $x$ of color $c$ with the color of the vertex $f_n(x)$, thus obtaining a proper coloring of $G$ with at most $v-n+1$ colors.