| Algorithm 2: Computing Resource Allocation based on Fairness Perception |
| Input: , , tolerance |
| Output: , , |
| 1: for do |
| 2: for do |
| 3: ; |
| 4: ; |
| 5: while |
| 6: ; |
| 7: if |
| 8: ; |
| 9: else |
| 10: ; 11: end if |
| 12: end while |
| 13: ; |
| 14: end for |
| 15: , according to Equation (14); |
| 16: end for |
| 17: ; |
| 18: ; |