How to transform set of values to reach a desired distribution

31 Views Asked by At

I have $k$ sets each containing $n$ numbers which are distributed in the following way:

if I accumulate all the $k \cdot n$ numbers and retrieve the top n entries, I will get values from all k sets evenly.

Now, I want to multiply each set of numbers with a multiplier (denoted $p_1, p_2,\, \ldots\, , p_k$) such that, after transformation, if I retrieve top $n$ entries, I should get $t_1$% result from set $1$, $t_2$% results from set $2$, .... , $t_k$% results from set $k$ where

$t_1 + t_2 + \ldots + t_k = 100$

Input: $~k, n, t_1, t_2,\, \ldots\, , t_k$, and all the $k \cdot n$ set of numbers.

Output: $~p_1, p_2,\, \ldots,\, p_k$

How should I proceed with this problem? Can anybody help me out here?