Does $\exists\ X\subset [0,1],\ a\neq 0,b\in\mathbb{R},\ $ such that $\ (Y:=) \{ ax+b: x\in X \} \cap X = \emptyset;\ X\cup Y = [0,1]\ $ or $(0,1)\ ?$ If $ X\subset [0,1],\ a\neq 0,b,\in\mathbb{R} $ then define$\ Y:= \{ax+b: x\in X \}.$

Does there exist $X\subset [0,1],\ a,b\in\mathbb{R},\ $ such that $\ Y
 \cap X = \emptyset;\ X\cup Y = [0,1]\ $ or $(0,1)\ ?$

If the question was to make $X\cup Y = [0,1)\ $ then $ X = \left[0,\frac{1}{2}\right)\ $ will do, with $a=1, b = \frac{1}{2}.$
But if the question is to make $X\cup Y = [0,1]\ $ or $X\cup Y = (0,1)\ $ then I am not sure how to do it/ if it can be done.
This question made me think of my question from a few months ago, but I don't see how alternating between rationals and irrationals helps with this question. For $X\cup Y = (0,1),\ $ can we arctan the function in Troposphere's answer to that question? I don't think that works.
 A: As has been suggested in the comments, this is easy enough to do for $(0,1)$ by taking $b=0$ and $X=\bigcup_{n=1}^\infty[a^{-2n},a^{-2n+1})$ for any $a>1$.  However, it is not possible for $[0,1]$.
To prove this, suppose such an $X$, $a$ and $b$ existed for $[0,1]$, and let $f(x)=ax+b$.  Note first that $f$ cannot have a fixed point in $[0,1]$, since then that fixed point could not be in either $X$ or $Y$.  It then follows that $f(x)-x$ has the same sign on all of $[0,1]$.  It follows then that for any $x\in[0,1]$, there exists $n\in\mathbb{N}$ such that $f^n(x)\not\in[0,1]$.  Indeed, if no such $n$ exists, $(f^n(x))$ would be a monotone bounded sequence which would converge to a point of $[0,1]$.  By continuity, this limit would be a fixed point of $f$ in $[0,1]$, which cannot exist.
Now for each $x\in[0,1]$, let $e(x)$ be the least $n\in\mathbb{N}$ such that $f^n(x)\not\in[0,1]$.  If $e(x)=1$ then $x$ cannot be in $X$ (since $f(x)\not\in[0,1]$) so $x\in Y$.  If $e(x)=2$ then $e(f(x))=1$ so $f(x)\in Y$ and thus $x\in X$.  Continuing similarly, we see that $X$ must consist of all $x\in[0,1]$ such that $e(x)$ is even and $Y$ must consist of all $x\in[0,1]$ such that $e(x)$ is odd.
As mentioned above, we know the sign of $f(x)-x$ is constant on $[0,1]$; let us assume $f(x)>x$ for all $x\in [0,1]$ (the other case is similar, and indeed equivalent by conjugating everything by $x\mapsto 1-x$).  Note that this implies $a>0$, since $f(0)\leq 1<f(1)$, so $f$ is increasing.  This also implies $f^{-1}(0)\not\in[0,1]$, so we must have $0\in X$, so $e(0)$ is even.  Note that $f^{e(0)-1}(f(0))=f^{e(0)}(0)>1$.  So by continuity, for sufficiently small $\epsilon>0$, $x=f(0)-\epsilon$ will still satisfy $f^{e(0)-1}(x)>1$.  Also, $f^{e(0)-2}(x)<f^{e(0)-2}(f(0))\leq 1$, and thus $e(x)=e(0)-1$ is odd for such $x$, so $x\in Y$.  But this means $f^{-1}(x)\in X$, which is impossible since $f^{-1}(x)<0$.
Here's a more conceptual way to think about this argument.  You can split $[0,1]$ into orbits of $f$.  Each of these orbits is a a finite increasing sequence of points, that ends when applying $f$ one more time would go above $1$ and begins when applying $f^{-1}$ one more time would go below $0$.  In order to be able to partition these orbits into $X$ and $Y$ with $f(X)=Y$, each orbit needs to contain an even number of elements, so every other element of the orbit goes in each set, starting with $X$ and ending with $Y$.  But now consider the orbit of $0$.  If you shift the orbit down a tiny bit, then the bottom point $0$ of the orbit will leave $[0,1]$, but none of the other points of the orbit will (and no new point will enter $[0,1]$ at the top).  This will give an orbit with one fewer element than the orbit of $0$, which is a contradiction since all the orbits need to have even size.
(In the case of an open interval $(0,1)$, you can do a similar argument assuming all the orbits are finite.  For instance, you could take the orbit of $f(0)$ and shift it up a tiny bit to get an orbit with one more element.  This shows that any example for $(0,1)$ must have an infinite orbit.  As argued in the second paragraph above, this implies $f$ has a fixed point in $[0,1]$, which must then be at $0$ or $1$ since there cannot be a fixed point in $(0,1)$.  This shows that the example of the first paragraph is essentially the only possible example for $(0,1)$.  To be precise, it is the only possible example where $0$ is the fixed point of $f$ and $a>1$ (as again, once you fix $f$, the set $X$ is uniquely determined by the parity of $e(x)$).  Taking $0<a<1$ instead just means replacing $f$ with its inverse and swapping the sets $X$ and $Y$.  And, there are also examples with $1$ as the fixed point instead of $0$, obtained from these examples by conjugating by $x\mapsto 1-x$.)
