Path: news.mathworks.com!not-for-mail From: <HIDDEN> Newsgroups: comp.soft-sys.matlab Subject: Re: Linear Combination Date: Thu, 18 Dec 2008 03:03:03 +0000 (UTC) Organization: The MathWorks, Inc. Lines: 9 Message-ID: <giceh7$rtl$1@fred.mathworks.com> References: <giakd7$ri2$1@fred.mathworks.com> <gibs4e$cgd$1@fred.mathworks.com> <giccbq$cnf$1@fred.mathworks.com> Reply-To: <HIDDEN> NNTP-Posting-Host: webapp-05-blr.mathworks.com Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit X-Trace: fred.mathworks.com 1229569383 28597 172.30.248.35 (18 Dec 2008 03:03:03 GMT) X-Complaints-To: news@mathworks.com NNTP-Posting-Date: Thu, 18 Dec 2008 03:03:03 +0000 (UTC) X-Newsreader: MATLAB Central Newsreader 1187260 Xref: news.mathworks.com comp.soft-sys.matlab:507645 "je w" <wangjing_sg@hotmail.com> wrote in message <giccbq$cnf$1@fred.mathworks.com>... > ........ > Yes both the coefficients for linear combinations and the elements of the array are *integers*; however, we are limiting the array to around 9 elements at most (the example array has 5 elements) in this case, hence, we are expecting a finite number of combinations. > ......... I believe when John said "infinitely many such linear combinations" he was referring to the fact that if you allow your integer coefficients to have either sign (as he stated,) then any given linear combination of two terms can be replaced by infinitely many other possible combinations of the same two values. For example, suppose your two values are 15 and 24 and you are looking for a linear combination of them such that c1*15+c2*24 = 93. One solution is c1 = 3 and c3 = 2. However another is c1 = -5 and c2 = 7. Yet another is c1 = -13 and c3 = 12, and there are infinitely more that follow this same pattern, c1 dropping or increasing by 8's and c2 changing in the opposite direction by 5's. Is it possible you had only positive-valued coefficients in mind when you spoke of "a finite number of combinations"? Roger Stafford