Re: Looking for an algorithm to accomplish the following
- From: "fadi" <fadi@xxxxxxxxxx>
- Date: Wed, 31 Aug 2005 14:58:01 GMT
"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.
.
- References:
- Looking for an algorithm to accomplish the following
- From: fadi
- Re: Looking for an algorithm to accomplish the following
- From: Philippe 92
- Looking for an algorithm to accomplish the following
- Prev by Date: Re: infinity
- Next by Date: Re: Cardinality of Real Numbers
- Previous by thread: Re: Looking for an algorithm to accomplish the following
- Next by thread: number sequence
- Index(es):
Relevant Pages
|