Research Article

A Novel Task Allocation Algorithm in Mobile Crowdsensing with Spatial Privacy Preservation

Algorithm 2

Allocation modification.
Input: subregions , participants , each community profile , each
workload
Output: the allocation for each
1:update each by ;
2:for each that   do
3:if    then  ;
4:each ;
5:sort by in descending order;
6:sort by in ascending order;
7:for each   do
8:compute ;
9:while    do
10:, , ;
11:for each   do
12:if   and
13:then compute ;
14:else continue;
15:if    then  ;
16:else if  
17:then  ;
18:if    then
19:;
20:else if    then
21:;
22:else fails;
23:, ;
24:, ;
25:if    then   deletes ;
26:if   or   then break;
27:compute ;