finding a positive linear combination of a list of vectors.

377 Views Asked by At

I'm interested in finding linear combinations of rows of the following matrix such that every entry is either zero or positive. I'm not exactly sure what the best way to approach this problem is.

[ 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 138 -102 0 122 244 -41 0 0 99 -205 41 122 -99 0 -244 183 -67 7]

[ 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 157 -116 -1 140 280 -47 0 0 113 -233 47 140 -113 0 -280 210 -76 8]

[ 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 176 -132 0 156 312 -52 0 0 126 -261 52 156 -126 -1 -312 236 -85 9]

[ 0 0 0 1 -1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 51 -35 0 41 85 -12 1 1 34 -70 12 43 -34 0 -85 58 -18 2]

[ 0 0 0 0 0 2 0 0 0 0 0 1 0 0 0 0 0 0 0 0 88 -63 0 75 153 -24 -1 1 61 -126 24 76 -61 0 -153 110 -37 4]

[ 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 151 -114 0 137 270 -46 0 0 110 -228 46 135 -110 0 -270 206 -77 8]

[ 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 161 -119 0 142 285 -46 1 0 115 -238 46 143 -115 0 -285 211 -76 8]

[ 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 101 -73 -1 89 178 -30 0 0 72 -148 30 89 -72 0 -178 133 -47 5]

[ 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 164 -120 0 143 286 -46 0 0 116 -240 46 143 -116 0 -286 212 -76 8]

[ 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 3 -2 0 2 5 0 1 0 2 -4 0 3 -2 0 -5 2 1 0]

[ 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 100 -74 0 88 176 -29 0 0 71 -147 29 88 -71 -1 -176 132 -47 5]

[ 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 162 -119 0 142 284 -46 0 0 114 -238 46 142 -115 0 -284 211 -76 8]

[ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 78 -58 0 69 138 -23 0 0 56 -116 23 69 -56 0 -138 104 -38 4]

[ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 160 -118 0 141 282 -46 0 0 114 -236 46 141 -114 0 -282 210 -76 8]

[ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 142 -104 0 125 250 -41 0 0 101 -209 41 125 -101 0 -250 186 -67 7]

[ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 123 -90 0 107 216 -35 0 0 87 -180 35 108 -87 0 -216 160 -57 6]

[ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 39 -29 0 35 70 -12 0 0 28 -58 12 35 -28 0 -70 53 -19 2]

[ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 101 -74 0 89 178 -29 0 0 72 -149 29 89 -72 0 -178 132 -48 5]

[ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 201 -148 0 177 354 -58 0 0 143 -296 58 177 -143 0 -354 264 -95 10]

as an example, this vector of coefficients gives a solution, (i.e. the left matrix product is a vector with non-negative entries)

[ 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 2 0 -2]

any ideas would be greatly appreciated!

1

There are 1 best solutions below

3
On BEST ANSWER

Given a set of $n$-component vectors $v_j$, $j=1\ldots,m$, the condition that the linear combination $\sum_j c_j v_j$ has all nonnegative entries is the set of linear inequalities $\sum_j c_j v_{jk} \ge 0$, $k = 1\ldots n$. You can use linear programming methods to try to satisfy these inequalities.

Of course there is the trivial solution: all $c_j = 0$, but you probably don't want that. You might add some constraint to avoid this solution (e.g. $\sum_j c_j \ge 1$).