MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

rules on vector sequence


Dear all,
I need to generate all the vectors, of a given length N, that have  
these three properties:

1- the entries have to be among -2,-1,0,1,2
2- the sum of all the entries has to be 0
3- only two or four of the entries can be different from 0

do you have any suggestions on how i can do that? i tried something  
but without success.. expecially i don't know how to implement the  
third rule..
thank you in advance!
Filippo


  • Prev by Date: Re: Interpolation with Method->Spline
  • Next by Date: Re: finding all definitions matching a pattern
  • Previous by thread: Re: How include a online help for Package in the Documentation Center
  • Next by thread: Re: rules on vector sequence