How to find a linear formula with integer coefficients to split two groups of data?

37 Views Asked by At

For example, I have two groups of data:

group 1:

x y
1 1
22 23
38 42
100 200

group 2:

x y
2 1
4 0
37 13
108 5

I want to find a linear formula with integer coefficients to distinguish these two groups, for example: group 1 satisfies $y - x + 1 > 0$, group 2 satisfies $y - x + 1 \le 0$ enter image description here

So how to find this formula? The number of variables could be greater than 2, maybe $\{x_1, x_2, \dots, x_n\}$, and output is the linear formula with integer coefficients like $$ a_0 + \sum_{i=1}^n a_i x_i > 0, \quad a_0, a_1, \dots, a_n \in \mathbb Z $$

The given data make sure the existence of this formula, and I just want to find one of all satisfying formulas.