# Analytics on Anonymity for Privacy Retention in Smart Health Data +
## 3 Proposed Multi-Faceted Anonymity Analytics Approach
### Balancing Generalization with Data Retention in Anonymization
#### 3.3.2 Illustration  
We apply the algorithm described in Section 3.3.1 to Table 1 with a given anonymity requirement \(R=\sphericalangle\left[\text{Zip},\text{Age},\text{AC}\right]\), 3>. Based on the number of records of each row, Table 1 contains 6 rows with number of records less than 3. Thus, these rows, namely Rows 1, 4, 9, 10, 13 and 14, violate \(R\). Generalizing these violating rows of Table 1 on attribute Zip (and also generalizing Zip values for the rest of the rows since their Zip values are siblings of those in the violating rows), we obtained a table as shown in Table 4.  
As shown in Table 4, Row 1 and Row 9 can be merged to the first row of the resulting table. Rows 4 and 14 can be combined to satisfy R as a unique tuple from Shield attributes, i.e., (Low, 35, 5200\(*\)) has three records. However, the two rows cannot be merged. Therefore, \begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline
**Rows** & **Sex** & **Alcohol Cons.** & **Age** & **Zip** & **Weight** & **Race** & **Genetic Risk** & **\#Rec.** \\ \hline \hline
1,9 & F & Med & 35 & 5200 \(*\) & 143 & Black & No & 1 + 3 \\ \hline
2 & F & Low & 35 & 5200 \(*\) & 143 & Black & No & 3 \\
3 & M & Med & 50 & 5300 \(*\) & 166 & White & No & 4 \\
4 & M & Low & 35 & 5200 \(*\) & 143 & White & No & 1 \\
5 & M & Med & 68 & 5200 \(*\) & 190 & Hispanic & No & 3 \\
6 & M & High & 68 & 5200 \(*\) & 190 & Hispanic & No & 4 \\
7 & M & Med & 44 & 5200 \(*\) & 166 & Asian & Hereditary Thromophilia & 3 \\
8 & F & Low & 75 & 5200 \(*\) & 122 & Native Hawaiian & No & 4 \\
10 & F & High & 75 & 5200 \(*\) & 143 & White & Hereditary Thromophilia & 1 \\
11 & M & High & 44 & 5200 \(*\) & 166 & Asian & Hereditary Thromophilia & 3 \\
12 & F & Med & 38 & 5200 \(*\) & 166 & White & No & 4 \\
13 & F & High & 35 & 5200 \(*\) & 122 & American Indian & Hereditary Thromophilia & 1 \\
14 & F & Low & 35 & 5200 \(*\) & 122 & American Indian & Hereditary Thromophilia & 2 \\
15 & M & Med & 38 & 5200 \(*\) & 122 & White & No & 3 \\
16 & F & Med & 22 & 5400 \(*\) & 180 & Native Hawaiian & No & 3 \\
17 & M & High & 20 & 5400 \(*\) & 180 & American Indian & L.O. Alzheimer’s & 3 \\
18 & M & Low & 21 & 5400 \(*\) & 180 & Black & Parkinson’s & 3 \\
19 & F & High & 24 & 5400 \(*\) & 180 & Asian & Hereditary Thromophilia & 3 \\
20 & M & No & 25 & 5400 \(*\) & 122 & American Indian & Celiac & 3 \\
21 & M & No & 26 & 5400 \(*\) & 166 & Asian & L.O. Alzheimer’s & 3 \\
22 & F & High & 23 & 5400 \(*\) & 180 & Asian & Parkinson’s & 3 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: A generalized Table after generalizing \(T\) on the Zip attribute. the resulting Table 4 has reduced number of violating rows to two (i.e., Rows 10, 13) with a total number of rows to be 21. Let \(T(n,m)\) denote a generalized table \(T\), where \(n\) is the number of rows violating \(R\) and \(m\) is the number of rows in \(T\). Tables 1 and 4 are represented by \(T(6,22)\) and \(T_{1}(2,21)\), respectively. The generalization process repeats. The whole process can be viewed as a search starting from \(T(6,22)\) as a root and as shown in Figure 3.  
The search starts from the root \(T(6,22)\), i.e., Table 1 (or \(T\)) with6 violating rows and a total of 22 rows as shown in Figure 3. We first apply to \(T\), generalization on Zip, Age and AC to obtain tables \(T_{1}(2,21)\), \(T_{2}(4,21)\) and \(T_{3}(0,18)\), respectively. Recall that \(T_{1}(2,21)\) is actually Table 4.  
As seen in Table 4, after merging Rows 1 and 9, we have [(Med, \(35,5200\)+), 4]. Hence the violation in these two cases is eliminated. Rows 4 and 14 also have the same shield attribute values after the generalization that is [(Low, \(35,52,000\)), 3]. Therefore, \(T_{1}\) has 2 violating rows remained, namely Rows 10 and 13. Moreover, because Rows 1 and 9 merged, the number of rows in \(T_{1}\) becomes 21. Thus, \(T_{1}(2,21)\) is obtained. The rest of resulting tables can be obtained similarly. \(T_{3}(0,18)\) has zero violations, however we continue to search because there might be a table with more rows and zero violations.