 |
 |
 |
 |
 |
 |
 |
 |
 |
option
1: check classes in decreasing balance order
|
|
|
|
let b_ij = min(B_ij, h), where h is a
|
|
|
relatively small #
|
|
|
R_ij += b_ij, and draw b_ij from
j's
|
|
|
bank account
|
|
|
t_i += b_ij
|
|
|
until t_i >= T_i
|
|
|
option
2: check all classes in case 4 above with balance >= 0
|
|
|
allocate
T_i - t_i tickets to these classes
|
|
|
proportional
to their bank account, and draw
|
|
|
from bank
account accordingly
|
|