How to solve a dynamic programming problem and the equation of state There are n numbers, they are divided into two groups, the number of the number in the two groups is equally divided as far as possible, and the minimum difference of the sum of the two groups is obtained 1 2 2 3 min=4-4=0

How to solve a dynamic programming problem and the equation of state There are n numbers, they are divided into two groups, the number of the number in the two groups is equally divided as far as possible, and the minimum difference of the sum of the two groups is obtained 1 2 2 3 min=4-4=0


Arrange n numbers from large to small
x1>=x2>=x3>=…… >=xn.
If X1 - (x2 + x3) > = 0, then X1 - (x2 + X3 + x4)?;
If X1 - (x2 + x3) = 0, X1 - (x2 + X3 + x4) > = 0, then X1 - (x2 + X3 + X4 + x5)?;
If X1 - (x2 + x3) > = 0, X1 - (x2 + X3 + x4)



I'm poor in mathematics, especially in the first year of the equation. I'm always confused about the shift. How to study the equation and how to find the relation? I'll add the solution to the problem and give the score
For example, how to do 1 / 3 (1-2x) = 2 / 7 (3x + 1)


First, we remove the denominator 1 / 3 (1-2x) = 2 / 7 (3x + 1) 21 * 1 / 3 (1-2x) = 21 * 2 / 7 (3x + 1) 7 (1-2x) = 6 (3x + 1) 7-14x = 18x + 6, move the term containing x to the left of the equal sign, and move the constant term to the right of the equal sign. The method is to add the opposite term of the original term: - 14x-18x = 6-7 - 32x = - 1, and the coefficient of both sides dividing the same denominator: - 32x / (- 32) =