Research Article
Double Auction-Based Two-Level Resource Allocation Mechanism for Computation Offloading in Mobile Blockchain Application
Algorithm 1
G-TRAP: resource allocation algorithm.
| (i) | Input: bid information of C-ESPs M and users N | | (ii) | Calculate bid density of user and calculate bid density of | | (iii) | Sort users in nonincreasing order of their and sort C-ESPs in nondecreasing order of their | | (iv) | | | (v) | for do | | (vi) | | | (vii) | while and do | | (viii) | if then | | (ix) | access true | | (x) | for do | | (xi) | if then | | (xii) | access false | | (xiii) | break | | (xiv) | if access then | | (xv) | for do | | (xvi) | if then | | (xvii) | if then | | (xviii) | | | (xix) | | | (xx) | | | (xi) | | | (xii) | else | | (xiii) | | | (xiv) | else | | (xv) | | | (xvi) | | | (xvii) | | | (xviii) | | | (xix) | else | | (xx) | if then | | (xxi) | | | (xxii) | else | | (xxiii) | | | (xxiv) | continue | | (xxv) | end if | | (xxvi) | end if | | (xxvii) | end if | | (xxviii) | end while | | (xxxi) | end for | | (xxx) | Output: set of winners W, relation matrix |
|