I want to find all the possible ways to fill a 1-dimensional array A (of size say 30) with only -1, 0, or 1 to each element, such that sum(abs(A)) is less than say 5. Simple loops don't seem to be very efficient. Any suggestions?

Reply via email to