Find integer solution

108 Views Asked by At

I have given $5$ integers from $1$ to $5$ which are unique. They solve the following equations:

$$\begin{align} c+d&=b+e \\ b+c&=a+e \\ a-d&=e-2 \end{align}$$

However, I can't find the solution. I have tried various combinations but none seem to work.

4

There are 4 best solutions below

0
On BEST ANSWER

Since $d+e = a + 2$, we have:

$$2b + e = b + c + d = a + e + d = 2a + 2$$

so that $e = 2a + 2 - 2b$, and $d = -a + 2b$. We thus have:

$$c = a + e - b = 3a + 2 - 3b$$

so that we have a 2-parameter set of solutions.

In summary, we have $a = a, b = b, c = 3a - 3b + 2, d = -a + 2b$, and $e = 2a - 2b + 2$.

Now in order to find the required answer, we run through the possible values for $a, b$ in order to ensure that $c, d, e$ are in the required range and that $a, b, c, d, e$ are all distinct. One sees that $a = 3, b = 2$ works.

As a sanity check:

$$a = 3$$ $$b = 2$$ $$c = 3^*3 - 3^*2 + 2 = 5$$ $$d = - 3 + 2^*2 = 1$$ $$e = 2^*3 - 2^*2 + 2 = 4$$

and so $c + d = 6 = b + e$, $b + c = 7 = a + e$, and $a - d = 2 = e - 2$, as required.

0
On

Using the three equations in the order they are stated you get $$c=b+e-d=(a+e-c)+e-d=((d+e-2)+e-c)+e-d$$ and, hence, $$2(c+1)=3e.$$ This proves that $c+1$ must be divisible by 3 and $e$ must be divisible by 2. If $c+1$ were equal to 3, then $c$ would have to be equal to 2 and, hence, $e$ would have to be equal to 2. Since $c=e$ is not allowed, we must have $c=5$ and $e=4$. It is now easy to derive the values for $a$, $b$, and $d$ from the three equations: $a=3$, $b=2$, and $d=1$.

0
On

I have got $$a=C_1,b=C_2,c=2+3C_1,d=-C_1+2C_2,e=2+2C_1-2C_2$$ where $$C_1,C_2$$ are integer numbers.

0
On

Brute-forcing in Haskell:

λ> filter (\(a,b,c,d,e) -> c+d==b+e && b+c==a+e && a-d==e-2) [ (a,b,c,d,e) | a <- [1..5], b <- [1..5], c <- [1..5], d <- [1..5], e <- [1..5] ]
[(1,1,2,1,2),(2,2,2,2,2),(3,2,5,1,4),(3,3,2,3,2),(4,3,5,2,4),(4,4,2,4,2),(5,4,5,3,4),(5,5,2,5,2)]

Of the eight solutions, the only $5$-tuple that is admissible (no repetitions) is $(3,2,5,1,4)$, which is the solution found by Nethesis and Gerhard.