Research Article

User Recruitment Algorithm for Maximizing Quality under Limited Budget in Mobile Crowdsensing

Algorithm 1

Greedy repair algorithm (GRA).
Input: , Q[0,…n], F[i], , B, Cost, j
Output: Q′[0,…n]
(1)  ⟵ 0,F[i] ⟵ 0, j ⟵ 0;
(2)Cost ⟵ 0,i ⟵ 0;
(3)In the l round, sorts candidate participants in descending order and stores them in the array Q[0,…n]
(4)for(i ⟵ 0 to n) do
(5)Cost=Cost+;
(6)If (Cost ≤ B and F[i] = 0)
(7)F[i]  ⟵ 1, Q′[j++] = Q[i]
(8)else
(9)Cost=Cost-
(10)return Q′[j]