For a program I am writing, I would find it useful to find the least possible positive solution to a linear equation, using only -1 and 1 for roots.

For example...

```
0.25a + 0.5b + 0.75c + 1d + 2e = 0
```

When

```
a = -1, b = 1, c = 1, d = 1, e = -1
```

However, if we take the example

```
3a + 1b + 5c
```

It is still beneficial to know that

```
a = -1, b = -1, c = 1
```

Provides the least possible positive solution (1)

How can I algorithmically find these solutions? I would rather not use a brute force technique, my goal is to optimize the program by finding the solutions.

Forgive me for the lack of tags, I have no idea what kind of math this relates to, if any at all.

1more comment