Re: Looking for an algorithm to accomplish the following



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/

.



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 ... > 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: 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)
  • Re: qubits
    ... One cycle of the algorithm would collapse ... Most np-Complete problems have been ... Thus any Qubit ... Though Qubits has obvious potential for increasing computing power at ...
    (comp.object)