Im not sure this is the right place to ask but it's a math problem so i think i'm at the right spot!
- list $L$ can hold $n$ items
- We have 3 groups $g_1$, $g_2$, $g_3$ each with their own $n$ items
List $L$ needs to be filled with the items from $g_1$, $g_2$ and $g_3$ but has limited space. So this means not all items can be in $L$. To distribute the number of $n$ items equally over the groups I'm doing the following.
summed $g$ items = 30 + 10 + 10 = 50
total $L$ space = 25
multiplier = 25/50 = 0.5
items from $g_1$ in $L$ 30*0.5 = 15
items from $g_2$ in $L$ 10*0.5 = 5
items from $g_3$ in $L$ 10*0.5 = 5
This makes a total of 25 items distributed equally over the groups
But now I want to make $g_1$ items more important than $g_2$ (and $g_3$) so that not 50% of the items are distributed but say 60% (in this case 30*0.6). This means $g_3$ and $g_3$ get les items distributed.
How can i accomplish this?
So far i have:
n : 25 n1: 30 n2: 10 n3: 10 q1: 2 q2: 1 q3: 1 pi: 0.5 p1: 0.625 p2: 0.3125 p3: 0.3125 c1: 18 c2: 3 c3: 4
This is a right solution.
But when i change $n$ into 42 or higher i get this:
n: 42 n1: 30 n2: 10 n3: 10 q1: 2 q2: 1 q3: 1 pi: 0.84 p1: 1.05 << higher than 1 p2: 0.525 p3: 0.525 c1: 31 << Not possible c2: 5 c3: 6