Re: Looking for an algorithm to accomplish the following



"Philippe 92" <nospam@xxxxxxxxxxxx> wrote in message
news:mn.fa427d581219654a.22155@xxxxxxxxxxxxxxx
> fadi wrote :
>> Hello all,
>>
>> Lets say there are N number of sets and each set has the same number of
>> attributes as follows:
>>
>> Set1: W=10, X=15, Y=5, Z=25
>> Set2: W=10, X=5, Y=10, Z=20
>> Set3: W=10, X=10, Y=20, Z=0
>> Set4: W=10, X=30, Y=10, Z=5
>>
>> Now, to find the sets that if summed, you would get the following values:
>>
>> Result: W= 20, X=15, Y=30, Z=20
>>
>> Answer would be Set2 + Set3 of course, but is there an algorithm that I
>> can
>> follow that would find this answer for me?
>>
>> It is really more complicated than this where the desired Result can be
>> off
>> by certain factor and would have condition as to which can be added..etc,
>> but
>> an algorithm would be a starting point for a software I am writing
>> hopefully.
>>
>> Thanks!
>
> IMHO you are searching for (binary) values (a,b,c,d)
> such that a*Set1 + b*Set2 + c*Set3 + ... = Result
> all capital letters beeing vectors.
>
> that is consider the matrix
>
> (10, 15, 5, 25)
> M = (10, 5, 10, 20)
> (10, 10, 20, 0)
> (10, 30, 10, 5)
>
> (a,b,c,d...) * M = (20, 15, 30, 20)
>
> algorithms for computing the inverse (or quasi-inverse) of M
> wouldn't help ?
> (a,b,c,d...) = (20, 15, 30, 20) * M^(-1)
>
> Regards.
>
> --
> philippe
> mail : chephip at free dot fr
> site : http://chephip.free.fr/

Ah that I need to research some more to figure out, I have not attempted
this approach, although I feel it may not work but I need to validate that.


.



Relevant Pages

  • Re: Looking for an algorithm to accomplish the following
    ... fadi wrote: ... > an algorithm would be a starting point for a software I am writing hopefully. ... algorithms for computing the inverse (or quasi-inverse) of M ...
    (sci.math)
  • beta version of Victor Shoups book, "A Computational Introduction to Number Theory and Algebra&
    ... Computing with Large Integers ... The Basic Euclidean Algorithm ... Factoring and Computing Euler's phi-Function are Equivalent ... The Existence of Finite Fields ...
    (sci.crypt)
  • Re: Why does Cantor a target for cranks?
    ... and wildberger doesn't give this the recognition it deserves ... that if we have a computing process that generates a stream of ... then it's meaningful for such a specific process (algorithm) ... or conflating various groups of order 6 into the ...
    (sci.math)
  • Re: Correctness proving (Was: Clear and Unambiguous SOFTWARE requirements/specifications possible?)
    ... We come up with reasonable schemes that find "good" results (by some ... The bulk of OR techniques -- like linear programming, dynamic programming, Out Of Kilter, etc. -- all provide a deterministic solution for problems like Traveling Salesman that will always be the absolute optimum. ... Solving np-Complete problems requires both an algorithm and a representation of the problem that is appropriate for the algorithm. ... The issue here is proving correctness of programs that are well-formed within the constraints of the computing space. ...
    (comp.software.testing)
  • Re: Penroses Computing Pi Description?
    ... > <snip penrose> ... > digit as output. ... > "computing Pi" on its own, ... is the algorithm the computation of one particular digit or is ...
    (sci.logic)