|
Algorithm 2: Collaborative group selection |
|
Input.
|
|
Output: a group of users
|
|
Step 1: Initialization.
|
| 1:
|
|
Step 2.
|
| 2:
|
| 3: for do |
| 4:
|
| 5: if , then |
| 6:
|
| 7:
|
| 8: end if |
| 9: end for |
| 10:while ; and ; do |
| 11: for do |
| 12: if , then |
| 13:
|
| 14: else |
| 15: calculate
|
| 16: end if |
| 17: end for |
| 18: 18: For all , sort in a non-decreasing way. |
| 19: — has the least number of users
|
| 20:
|
| 21:
|
| 22: for do |
| 23:
|
| 24: if , then |
| 25:
|
| 26:
|
| 27: end if |
| 28: end |
| 29: end while |
| 30: return the user group:
|