Suppose A and B are compact connected sets in the XY plane and XZ plane respectively in R^3. Suppose further that the the range of x-values taken by A and B are the same (i.e, projections of A and B onto the x-axis are the same closed interval). Is there always a connected set in R^3 whose projections onto XY and XZ planes are A and B respectively?



existence of a connected set with given connected projections.
The answer is yes.


Let $\alpha,\beta:[0,1]\to[0,1]\times \mathbb R$ be two paths;
$\alpha(t)=\left(\alpha\_1(t),\alpha\_2(t)\right)$ and $\beta(t)=\left(\beta\_1(t),\beta\_2(t)\right)$.
Assume that $\alpha\_1(0)=\beta\_1(0)=0$, $\alpha\_1(1)=\beta\_1(1)=1$.



> 
> **Claim.** The points $a=\left(0,\alpha\_2(0),\beta\_2(0)\right)$ and $b=\left(1,\alpha\_2(1),\beta\_2(1)\right)$ lie in the same connected coponent of the set $\Sigma\subset \mathbb R^3$ formed by points of the following type $ \left(\alpha\_1(t),\alpha\_2(t),\beta\_2(\tau)\right)$ such that $\alpha\_1(t)=\beta\_1(\tau)$.
> 
> 
> 


**Proof.** Note that for generic smooth choice of $\alpha$ and $\beta$ the set $\Sigma$ is a smooth 1-dimensional manifold which might be not connected, but it has only two boundary points in $a$ and $b$.
Thus, in this case one can connect these points by a curve.
The general case can be done by approximation. $\square$


The rest is easy: one can approximate $A$ and $B$ by path-connected sets $A'$ and $B'$ with the same property. 
Thus one can present $A'$ and $B'$ as a union of curves $\alpha$ and $\beta$ with the above property. 
Moreover we can assume that the ends of $\alpha$ and $\beta$ are fixed (i.e. $a$ and $b$ are fixed).
For each pair $(\alpha,\beta)$, choose the connected component of $a$ in $\Sigma$ and take the union of all of them.


