# Linear Diophantine Equation #4

Linear Diophantine Equations- C + D = B + E
- B + C = A + E
- A - D = E - 2

## Hint

Sometimes, under the pressure of time, you need to make a trade-off between solving it analytically and solving it with trial and error. In this case, a combination of both will leads to the quickest solution. First, sum up all three equations, in order to eliminate 3 out 5 variables.## Answer

Sometimes, under the pressure of time, you need to make a trade-off between solving it analytically and solving it with trial and error. In this case, a combination of both will leads to the quickest solution. First, sum up all three equations, in order to eliminate 3 out 5 variables.C+ D = B + E

B + C = A + E

A - D = E - 2

——————— +

2C + B + A = 3E + B + A - 2

Which we can simplify as:

- 2C = 3E - 2

- If C= 1, 3E should equal 4, which isn't possible with integers.
- If C= 2, 3E should equal 6, which isn't possible, because E = 2 would result in a non-unique solution.
- If C= 3, 3E should equal 8, which isn't possible with integers.
- If C= 4, 3E should equal 10, which isn't possible with integers.
- If C= 5, 3E should equal 12, which works! E = 4.

- C = 5
- E = 4

- 5 + D = B + 4 (or D = B - 1)
- B + 5 = A + 4 (or A = B + 1)

- D = 1
- B = 2
- A = 3

- A = 3
- B = 2
- C = 5
- D = 1
- E = 4