Re: proportionality problem



Digital Puer wrote:

Suppose I have a list of resources, where each resource is
assigned a quality value 1 to 10, inclusive, where 1 is the
highest quality. I want to assign resource requests to each
of these resources in proportion to their quality value.

For example, if I have two resources A and B with quality
values 1 and 4, respectively, I would assign requests to
A and B with a 4:1 ratio because A has 4x the value of B.

How can I extend this to the general case with multiple
resources? For example, if A, B, and C have values 1, 2,
3, how would requests be assigned to A, B, and C? I think
it would be 6:3:2. What's a good way to compute this?

Your examples indicate that you want:

Qualities Requests
1 to 4 1 to 0.25

Qualities Requests
1 to 2 to 3 1 to 0.5 to 0.3333...


If that is what you want, it looks pretty simple.


Best

Kai-Uwe Bux
.



Relevant Pages

  • Re: proportionality problem
    ... Suppose I have a list of resources, ... assigned a quality value 1 to 10, inclusive, where 1 is the ... I want to assign resource requests to each ... know if this is relevant to your real problem. ...
    (comp.programming)
  • Re: proportionality problem
    ... assigned a quality value 1 to 10, inclusive, where 1 is the ... I want to assign resource requests to each ... Each resource has specific limitations that determine the ... the limitation of the highest quality resource, ...
    (comp.programming)
  • Re: proportionality problem
    ... assigned a quality value 1 to 10, inclusive, where 1 is the ... I want to assign resource requests to each ... Doing a different class depending on what resource it is, makes for an extensibility headache, but either way you're gonna need a list for every type from which it is to be fetched separately. ... const int Bquality = 2; ...
    (comp.programming)
  • proportionality problem
    ... Suppose I have a list of resources, ... assigned a quality value 1 to 10, inclusive, where 1 is the ... highest quality. ... I want to assign resource requests to each ...
    (comp.programming)
  • EARTHSHAKER Clear Ramp Plastics : 2nd and Final Run
    ... I had requests to re-run these so here they are.. ... For those who wish to chime in on the quality, ...
    (rec.games.pinball)