Students are partitioned into groups of equal size $m$ similar to Stable roommates problem except $m$ can be any natural number greater than 1. Each student ranks the other students in strict order of preferences.
For each person $i∈\{{1,…,n}\}$, $i$ can rank all other students from the most preferred to the least preferred. These preferences can be thought of as $p_{ij}$, where $p_{ij}$ is rank (1 highest) of $j$ in $i$'s ordering.
I'm trying to calculate the weighted rate of satisfaction a person would get mathematically from being in a group that contains his preference ranked at n. The weighted rate could be calculated with a function $f(m, p_{ij}) = ?$
The satisfaction rate is a number between 0 and 1 that multiplied by 100 could be converted to percentages.
Each preference should be weighted differently. If the student's group contains one of his preferences ranked at for example $p_{ij}=3$ he wouldn't be satisfied as much as a preference ranked at $p_{ij}=1$.
The ideal group for a person would consist of his preferences ranked at $p_{ij}=1$ to $p_{ij}=m-1$ (amount of students in a group except for $i$ himself) this would give him a satisfaction rate of 1 (meaning fully satisfied), or written mathematically:
$$\sum_{p_{ij}=1}^{m-1} f(m,p_{ij}) =1$$
So what could the definition of function $f(m, p_{ij})$ be?