# Finite linear combination of characteristic functions measurable implies each set is measurable?

Question : Let $$X$$ be a set and $$\mathcal{F}$$ be a sigma algebra for $$X$$. Let $$E_1$$, ...., $$E_k$$ be subsets of $$X$$. If $$g(x)$$ = $$\sum \alpha_j \chi_{E_j}$$ is measurable (where $$\alpha_j$$'s are distinct), is each $$E_j$$ measurable?

My approach: If $$E_j$$'s are disjoint, then this is obvious as $$E_j = g^{-1} (\{\alpha_j\})$$. If not, then the idea is to may be split $$E_j$$'s into disjoint sets.

For that, we define for each subset $$S$$ of $$\{1,2,3, .. ,k\}$$, $$A_S$$ = set of all $$x$$ which belong to $$E_s$$ for each $$s \in S$$ but not in $$E_t$$ for $$t \notin S$$. It is clear that $$A_S$$ and $$A_T$$ are disjoint for distinct subsets $$S$$ and $$T$$ of$$\{1,2,3, .. ,k\}$$. In addition, for each subset $$S$$ of $$\{1,2,3, .. ,k\}$$, define $$\beta_S = \sum_{i \in S} \alpha_i$$

Now we can check that $$g(x) = \sum_S \beta_S \chi_{A_S}(x)$$. This is because each $$x$$ contributes $$\alpha_i$$ to $$g(x)$$ if it is in $$E_i$$, otherwise $$0$$. Now all the $$A_S$$ are pairwise disjoint, but the $$\beta_S$$'s may not be distinct.

How can I proceed further?

Suppose $$X=[0,1]$$ and $$\mathcal{F}$$ is the Lebesgue $$\sigma$$-algebra on $$[0,1]$$. Let $$V$$ be the Vitali set on $$[0,1]$$. Define $$A=X\setminus V$$. Then $$\chi_{[0,1]} = \chi_V + \frac{3}{2}\chi_A-\frac{1}{2}\chi_A$$ is measurable, but $$\chi_V$$ is not measurable.