We are given a 1 dimensional dataset. The points between $2k$ and $2k+1$ are labeled by X. The points between $2k+1$ and $2k+2$ are labeled by O. You can see their representation in the following image : 
What I am trying to do is to find a 1 dimensional transformation to make these data points linearly separable.
My idea was to use a function that would be a identity function for the points between 2k and 2k+1, and return the inverse for the points between $2k+1$ and $2k+2$. But that only works in the case of positive values. I am a bit lost since I am not even sure these points can become linearly separable. Does such a tranformation exist ? Or is there any way to prove that such a transformation doesn't exist?
Thank you
If I understand the question correctly, applying the function $\sin(\pi x)$ will result in the red Xs being positive and the green Os being negative.