Algorithm 1.
Baseline(X, Y)
Require: Trajectories X = {x1, …, xm} and Y = {y1, …, yn}, ILM(X) and ALM(X), DGHs HICD and HAge | |
Return: Anonymized trajectory T̃, ILM(T̃) and ALM(T̃) | |
1: | T̃ ← Ø |
2: | i ← ILM(X); a ←- ALM(X) |
3: | s ← the length of the shorter of X and Y |
4: |
for all
j ∈ [1, s] do ▷Construct a pair containing the LCAs of xj and yj |
5: | p ← (lca(xj.icd, yj.icd, HICD), lca(xj.age,yj.age, HAge)) ▷Append the constructed pair to T̃ |
6: | T̃ ← T̃ ∪ p ▷Inf. loss incurred by generalizing xj with yj |
7: | i ← i + ILM(xj + yj, p.icd) |
8: | 𝒜 ← 𝒜 + ALM(xj + yj, p.age) |
9: | end for |
10: | Z ← the longer of X and Y |
11: |
for all
j ∈ [(s + 1), |Z|] do ▷Information loss incurred by suppressing zj |
12: | i ← i + ILM(zj, root(HICD)) |
13: | a ← a + ALM(zj, root(HAge)) |
14: | end for |
15: | return {T̃, i, a} |