Research Article

Hierarchical Combinatorial Auction in Computing Resource Allocation for Mobile Blockchain

Algorithm 1: A greedy algorithm for solving the WDP for MESPs.

1. Initialization: Set for each miner and for each MESP
2. For submitted bid for each miner and submitted ask for each MESP , calculate the “bid density.” Reorder the miners’ bid in a descending order and the MESPs’ ask in an ascending order:
                      
                     
3. Match up one by one according to corresponding order until MESPs do not have enough resources to allocate and set relative , .
Algorithm 1: A greedy algorithm for solving the WDP for MESPs.