Appendix B: Weighted allocation function for a single service
This appendix defines a pure function \(\mathcal{F}^{\mathrm{wt}}\).
\(\mathcal{F}^{\mathrm{wt}}(C, n, \rho_c, \tau_c, B, w_k)\) returns the tuple of tax allocation factors \((F_0,\dots,F_n)\), where:
- \(C\) is a set of consumers,
- \(n \in \mathbb{Z}\) and \(n \gt 0\) is the maximum score,
- \(\rho_c \in \{-n,\dots,-1,0,1,\dots,n\}\) is the score assigned by consumer \(c \in C\),
- \(\tau_c \ge 0\) is the tax available from consumer \(c \in C\),
- \(B \ge 0\) is the budget of the service,
- \(w_k \ge 0\) is a weighting factor for each positive score \(k \in \{1,\dots,n\}\), with at least one \(w_k > 0\) whenever \(\sum_{k=1}^n T_k > 0\).
Definitions
Let \(K = \{0,1,\dots,n\}\) be the set of non‑negative scores.
For each \(k \in K\), let \(T_k\) be the total available tax from consumers who assigned score \(k\):
\[ T_k = \sum_{\substack{c \in C \\ \rho_c = k}} \tau_c. \]
Let \(M_{>0} = \sum_{k=1}^n T_k\) be the total tax available from all positive‑score groups.
Allocation rule
The allocation proceeds in two stages:
- Positive‑score groups contribute first, using an iterative weighted water‑filling process.
- The neutral group contributes only to minimise a shortfall against the service's tax budget, and never when positive groups can meet that budget in full.
Stage 1: Iterative weighted water‑filling among positive groups
Initialise:
- \(R = B\) (remaining budget),
- \(S = \{1,\dots,n\}\) (the set of active positive‑score groups),
- \(F_k = 0\) for all \(k\).
While \(R > 0\) and \(S \neq \varnothing\):
- Compute the total weighted capacity of active groups: \[ W_S = \sum_{k \in S} w_k T_k. \]
- If \(W_S = 0\), then set \(F_k = 0\) for all \(k \in S\) and terminate Stage 1.
- Compute the provisional factors: \[ F_k^{\mathrm{prov}} = \frac{R}{W_S} \, w_k \quad \text{for all } k \in S. \]
- Let \[ C = \{k \in S \mid F_k^{\mathrm{prov}} \ge 1\} \] be the set of groups that would exceed their cap.
- If \(C = \varnothing\), then:
- Set \(F_k = F_k^{\mathrm{prov}}\) for all \(k \in S\),
- Set \(R = 0\),
- Terminate Stage 1.
- If \(C \neq \varnothing\), then:
- Set \(F_k = 1\) for all \(k \in C\),
- Reduce the remaining budget: \[ R = R - \sum_{k \in C} T_k, \]
- Remove capped groups from the active set: \[ S = S \setminus C. \]
Let
\[ C_{\text{pos}} = \sum_{k=1}^n F_k T_k. \]
Stage 2: Neutral group contribution (deficit‑only)
The remaining deficit is:
\[ D = \max(0,\, B - C_{\text{pos}}). \]
The neutral group contributes only to reduce this deficit:
\[ F_0 = \begin{cases} 0, & D = 0, \\[4pt] \min\!\left(1,\; \dfrac{D}{T_0}\right), & D > 0. \end{cases} \]
Negative‑score groups never contribute.
Post‑conditions
- Range: \(0 \le F_k \le 1\) for all \(k\).
- Neutral deficit‑only: \(F_0 = 0\) whenever \(C_{\text{pos}} \ge B\).
- Total allocation: \[ \sum_{k=0}^n F_k T_k = \min(B,\, M_0). \]
- Negative scores excluded: consumers with \(\rho_c < 0\) do not contribute.