Find combination of vectors from array that sum up to s I have an array of $n$ $m$-dimensional vectors (in my case, they're 27 dimensional). I also have an $m$-dimensional vector $s$. I want to find all combinations of $k$ vectors from my array whose vector sum is equal to $s$. How to do this efficiently?

The best I could do is just a brute force which is $O(n^k)$ and impossibly slow.

Any help is appreciated.
If $k$ is part of the input, the problem is NP-complete even when $m=1$ (and when we want to know if there's even a single solution). That is, when $m=1$, we essentially have a collection of $n$ values and our task is to decide if there is a subset of those that sum up to a target $s$. This is known as subset sum.

The Wikipedia page lists algorithms that you might be able to adapt to your more general case as well. Also, if $k$ is small enough, you might be able to do something better.