I have a table with N rows and n unique elements. Let j denote the row index and i denote the element. In the table below $N=9, n=3$. Let $w_i$ denote the count of element i. For example, $w_1=4, w_2=3, w_3=2$, in the table below. $\sum_{i=1}^n w_i = N$.
I want to do a weighted sampling of $m$ elements without replacement from this table, where the weight of element $i$ is $w_i$. I have two schemes and want to know if they're equivalent i.e., if they have the same probability of sampling any tuple of $m$ unique elements.
Assume $m=2$ for the discussion. Here are the two algorithms.
Scheme1
Generate a uniform random number $U_j \in [0,1]$ for each row. Sort the rows in decreasing order by $U_j$, and pick the top $m$ unique elements. So I keep scrolling the table till I find $m$ unique elements. The figure below shows the table after sorting, and in this case I would pick $m=2$ elements $i=1,3$.
Scheme 2
The other scheme, which is typically used to perform weighted sampling without replacement (see Algorithm A in https://utopia.duth.gr/~pefraimi/research/data/2007EncOfAlg.pdf), is to roll up the j index, so we have a table containing the $n$ elements exactly once (group by operation on the above table). We then generate random numbers $U_i^{1/w_i}$, sort by these values, and pick the top 2 elements. In the table below, the elements $i=2,3$ would be selected.
Question
Are these two sampling schemes equivalent? How can I prove / verify this?