While solving a complex problem I have ended up with this simplified problem:  

There are eight straight lines in the plane. They are notated as follows:
\begin{gather}
\tag{1}
\label{1}
y=k\_1 x+b\_1\\
y=k\_1 x+b\_2\\
y=k\_1 x+b\_3\\
y=k\_1 x+b\_4
\end{gather}
\begin{gather}
\tag{2}
\label{2}
y=k\_2 x+b\_5\\
y=k\_2 x+b\_6\\
y=k\_2 x+b\_7\\
y=k\_2 x+b\_8
\end{gather}
The slopes are $k\_1$ and $k\_2$, the intercepts on the $y$ axis are $b\_1,b\_2,b\_3,\dotsc,b\_8$, and $k\_i,b\_j \in (0 ,1)$, $i=1,2$; $j=1,2,\dotsc,8$ and $b\_1+b\_3=b\_2+b\_4$, $b\_5+b\_7=b\_6+b\_8$.


Suppose there are four vectors of independent variables $X$, denoted as $X\_1,X\_2,X\_3,X\_4$, where $X\_p=(x\_{p1},x\_{p2},\dotsc,x\_{ps},\dotsc,x\_{pn})$ corresponds to a collection of the abscissas of $n$ points, and $X\_1+X\_3=X\_2+X\_4$. Substituting $X\_1, X\_2, X\_3, X\_4$ into equations \eqref{1} and \eqref{2} in turn to obtain eight vectors of dependent variables $Y$, denoted as $Y\_1, Y\_2,\dotsc, Y\_8$, and $Y\_q =(y\_{q1},y\_{q2},\dotsc,y\_{qs},\dotsc,y\_{qn})$ corresponds to a collection of the ordinates of $n$ points, which are notated as follows:
\begin{gather}
\tag{3}
\label{3}
Y\_1=k\_1 X\_1+b\_1 I\\
Y\_2=k\_1 X\_2+b\_2 I\\
Y\_3=k\_1 X\_3+b\_3 I\\
Y\_4=k\_1 X\_4+b\_4 I
\end{gather}
\begin{gather}
\tag{4}
\label{4}
Y\_5=k\_2 X\_1+b\_5 I\\
Y\_6=k\_2 X\_2+b\_6 I\\
Y\_7=k\_2 X\_3+b\_7 I\\
Y\_8=k\_2 X\_4+b\_8 I.
\end{gather}
where $I$ is $n$-dimensional all-ones vector.  

**Question:**


1. How to solve these equation to obtain the **coefficients** $k\_i$, $b\_j$, under the condition of $Y$ **known** and $X$ **unknown**? Closed form solution or numerical solution?
2. What's the minimum number of $n$ for which these equations are solvable?




---


**ADDED** Additional information  

$\forall x\_{p,s}\in X\_p,x\_{p,s} \in (0,1)$  

$b\_q=c\_q d\_1$ and $b\_{q+4}=c\_q d\_2$,$c\_q,d\_i \in (0,1)$, $q \in \{1,2,3,4\}$,$i \in \{1,2\}$ .



How to solve a system of nonlinear equation, with y known and x or its coefficients unknown?
First we notice that the relations $b\_1+b\_3=b\_2+b\_4$, $b\_5+b\_7=b\_6+b\_8$, and $X\_1+X\_3=X\_2+X\_4$ imply that $Y\_1+Y\_3=Y\_2+Y\_4$ and $Y\_5+Y\_7=Y\_6+Y\_8$. If the these relations do not hold for given $Y\_q$, there are no solutions. So, we assume that they do hold, in which case the fourth ($Y\_4=\dots$) and eights ($Y\_8=\dots$) equations can be considered redundant, while $b\_4$ and $b\_8$ are expressed from the others $b\_i$ as $b\_4 = b\_1+b\_3 - b\_2$ and $b\_8 = b\_5 + b\_7 - b\_8$.


So, we need to the remaining 6 equations with respect to $k\_1,k\_2,b\_1,b\_2,b\_3,b\_5,b\_6,b\_7$. From these equations we obtain:
$$\begin{cases}
k\_2 Y\_1 - k\_1 Y\_5 = (k\_2 b\_1 - k\_1 b\_5) I, \\
k\_2 Y\_2 - k\_1 Y\_6 = (k\_2 b\_2 - k\_1 b\_6) I, \\
k\_2 Y\_3 - k\_1 Y\_7 = (k\_2 b\_3 - k\_1 b\_7) I.
\end{cases}
$$
Denoting $Y'\_q := (y\_{q,1}-y\_{q,n}, y\_{q,2}-y\_{q,n}, \dots, y\_{q,n-1}-y\_{q,n})$, we can rewrite the above system in the following equivalent form:
$$(\star)\qquad
\begin{cases}
k\_2 Y'\_1 - k\_1 Y'\_5 = 0, \\
k\_2 Y'\_2 - k\_1 Y'\_6 = 0, \\
k\_2 Y'\_3 - k\_1 Y'\_7 = 0, \\
k\_2 y\_{1,n} - k\_1 y\_{5,n} = k\_2 b\_1 - k\_1 b\_5, \\
k\_2 y\_{2,n} - k\_1 y\_{6,n} = k\_2 b\_2 - k\_1 b\_6, \\
k\_2 y\_{3,n} - k\_1 y\_{7,n} = k\_2 b\_3 - k\_1 b\_7.
\end{cases}
$$
That is, viewing $Y'\_q$ as column-vectors, we conclude that
$$M\cdot \begin{bmatrix} k\_2 \\ -k\_1 \end{bmatrix} = 0,$$
where
$$
M:=\begin{bmatrix}
Y'\_1 & Y'\_3 \\
Y'\_2 & Y'\_6 \\
Y'\_3 & Y'\_7 
\end{bmatrix}
$$
is $3(n-1) \times 2$ matrix. In other words, $\begin{bmatrix} k\_2 \\ -k\_1 \end{bmatrix}$ belongs to the kernel of $M$.


When $k\_1$ and $k\_2$ are determined, the last three equations of $(\star)$ represent a linear system with respect to $b\_i$, which we can solve. If we are interested in just any solution, we can simply take $b\_i = y\_{i,n}$.




---


**ADDED.** The OP indicated in the comments that the given $Y\_q$ are noisy, and thus we need to solve the equation approximately rather than exactly. In this case, it is worth to keep all 8 equations for better accuracy.


First, we can estimate the value of $\alpha:=\frac{k\_2}{k\_1}$ as the average of
$$\frac{y\_{q,i} - y\_{q,j}}{y\_{q+4,i} - y\_{q+4,j}}$$
over all $q\in\{1,2,3,4\}$ and $i\ne j$ from $\{1,2,\dots,n\}$.
Notice there is no way to estimate $k\_1$ and $k\_2$ individually from the given data, but we can fix any value for $k\_1$, say $k\_1=1$, to obtain the estimation $k\_2=\alpha k\_1$.


Then, we can estimate $b\_q$ by just averaging $y\_{q,i}$ over all $i\in\{1,2,\dots,n\}$.


