Theoremcore
NP-hardness of optimal k-anonymity
Also called Meyerson-Williams theorem.
Fewest suppressed cells for k-anonymity is NP-hard for each fixed k at least 3 (Meyerson-Williams), also with a ternary alphabet (Aggarwal et al.). 2-anonymity is in P.
To make a table k-anonymous by suppression, replace some cells by a star until each row is equal to at least other rows. Each suppressed cell loses information, so the natural goal is the fewest stars. Meyerson and Williams (2004) proved that this goal is NP-hard for each fixed , by a reduction from perfect matching in hypergraphs. They also proved it for the suppression of whole columns. Aggarwal et al. (2005) showed that the hardness for holds even when each cell has one of three values. For the problem is in P. So no exact polynomial algorithm is expected, and the practical algorithms are heuristics or approximations.
Statement
A table is a list of rows over an alphabet . A suppression replaces some entries by the symbol , which is not in . The result is k-anonymous if each row is equal to at least other rows. Its cost is the number of stars. The decision problem ENTRY-SUPPRESSION is: given a table and an integer , is there a k-anonymous suppression of cost at most ? The problem ATTRIBUTE-SUPPRESSION is the same, but each column is either kept in all rows or suppressed in all rows, and the cost is the number of suppressed columns.
Theorem 1 (Meyerson and Williams 2004, Theorem 3.1). For each fixed , ENTRY-SUPPRESSION is NP-complete when the alphabet may grow with the input. The proof below uses values for rows.
Theorem 2 (Meyerson and Williams 2004, Theorem 3.2). For each fixed , ATTRIBUTE-SUPPRESSION is NP-hard, already for a binary alphabet.
Theorem 3 (Aggarwal et al. 2005, Theorem 1). ENTRY-SUPPRESSION is NP-hard for the alphabet , with an unbounded number of columns.
In plain words
Give each person a row, and each candidate group a column. A person who is in the group gets a 0 in that column, and everyone else gets a value that is theirs alone. A group of rows can look the same only in a column where all of them have a 0, that is, in the column of a candidate group that holds all of them. Two rows that share two such columns would have to be in two candidate groups at once, and no rows can be. So in the cheapest release each row keeps one cell, and the groups of the release are candidate groups that do not overlap and cover everybody. Finding such a cover is a classic hard problem. So finding the cheapest release is at least as hard.
Proof
Membership in NP. A certificate is the suppressed table. A verifier counts the stars and sorts the rows to check that each class of equal rows has at least rows, in polynomial time.
The source problem. A -uniform hypergraph has a set of vertices and a set of distinct edges, each a set of exactly vertices. A perfect matching is a set of pairwise disjoint edges whose union is . PERFECT-MATCHING asks whether has one. For it is NP-complete: it contains 3-dimensional matching, the problem [SP1] of Garey and Johnson, where with and each edge has one vertex in each part. For , map a 3-dimensional matching instance to the -uniform hypergraph with vertex set , where each is a new copy of , and with the edge for each triple . Distinct triples give distinct edges. A perfect matching has edges, and the triples of disjoint edges are disjoint and cover , and ; conversely, a 3-dimensional matching gives disjoint edges that cover all copies, because the copies of follow . So PERFECT-MATCHING is NP-complete for each fixed .
The reduction (proof of Theorem 1). Let and , with . Build the table with rows and columns:
over the alphabet , and set . The table has entries and takes polynomial time to build. We show that has a perfect matching if and only if the table has a k-anonymous suppression of cost at most .
If. Let be a perfect matching. Each row lies in exactly one edge . In row , keep column and suppress the other entries. For each , its rows all have in column , so they are equal after the suppression: in column and elsewhere. Each class has rows, and the cost is .
Only if. Take a k-anonymous suppression of cost at most , and split the rows into classes of equal suppressed rows. Each class has at least rows.
Claim A: if row keeps column , then , and each row of its class has . Proof: each row of the class keeps column with the same value as row . Take in the class, which exists since the class has at least 2 rows. The entries of row are or , so the value cannot be in it. So the common value is , and for each row of the class, including .
Claim B: each row keeps at most one column. Proof: suppose row keeps the columns , and let be its class. By Claim A, the vertices of the rows of are in . So , and . This contradicts that the edges are distinct.
By Claim B each row has at least stars, so the cost is at least . As the cost is at most , each row keeps exactly one column. Let be a class, and let be the column its rows keep; all rows of keep the same column, since they are equal. By Claim A the vertices of are in , so , and the vertices of are exactly . The classes are disjoint and cover all rows, so their edges are disjoint and cover , and they form a perfect matching.
So PERFECT-MATCHING ENTRY-SUPPRESSION by a polynomial-time reduction, and with the membership in NP, ENTRY-SUPPRESSION is NP-complete for each fixed .
Worked example. Let , , and , , , so and .
| row | |||
|---|---|---|---|
| 1 | 0 | 1 | 1 |
| 2 | 0 | 2 | 2 |
| 3 | 0 | 3 | 0 |
| 4 | 4 | 0 | 0 |
| 5 | 5 | 0 | 0 |
| 6 | 6 | 0 | 6 |
The matching gives the classes , released as , and , released as , with cost 12. If is replaced by , no two edges are disjoint and no perfect matching exists. A search over all splits into classes of at least 3 rows then gives a least cost of 15, which is more than 12, as the proof says.
Sketch of Theorem 2 (cited, Meyerson and Williams 2004, Theorem 3.2). Suppressing a whole column is the same as full-domain generalization with a hierarchy of two levels, the value and . Meyerson and Williams prove NP-hardness of the least number of suppressed columns for by a separate reduction, which works with two values per cell. We do not repeat that construction here; see the paper.
Sketch of Theorem 3 (cited, Aggarwal et al. 2005, Theorem 1). The source problem is edge partition into triangles: can the edges of a graph be split into triangles? It is NP-complete, and Aggarwal et al. cite Kann (1994) for it. Take a graph with edges, so that a partition has triangles. A row stands for an edge and a column for a vertex, with a 1 at the two ends of the edge. A triangle of rows then needs 3 stars per row, so 9 per triangle. But a star of three edges at one vertex has the same cost, so a binary table cannot tell the two apart. The fix uses blocks of columns: in each block, the two ends of an edge get the values 1 and 2, in an order set by one bit of the number of the edge. Aggarwal et al. show that the table has a 3-anonymous suppression of cost at most if and only if the graph has a partition into triangles, and they extend the result to with partitions into cliques of vertices.
Consequences
- No exact polynomial algorithm, unless P = NP. Each algorithm that always finds the fewest stars, for some fixed , takes more than polynomial time on some inputs, unless P = NP. This is why the practical algorithms are heuristics, such as Datafly and Mondrian, or exact searches over a restricted space, such as Samarati's algorithm over the lattice of full-domain generalizations, whose size is exponential in the number of attributes.
- Full-domain generalization is also hard. By Theorem 2, the least number of suppressed columns is NP-hard to find, even with hierarchies of two levels. So the exponential size of the lattice in generalization and suppression is not only a weakness of the known searches.
- Approximation. Meyerson and Williams (2004) give an approximation, , in time exponential in , and an approximation in polynomial time, where is the number of columns. Aggarwal et al. (2005) give a polynomial approximation, the O(k) approximation for k-anonymity. Park and Shim (2007) improve the ratio to ; see their paper for the running time.
- No approximation scheme. For a binary alphabet with , and for rows of length at most 8 with , the problem is APX-hard (Bonizzoni, Della Vedova and Dondi). So there is no polynomial-time approximation scheme for these cases unless P = NP.
Tightness
- is needed. For each table is 1-anonymous with no stars. For , Blocki and Williams (2010) show that the problem is in P. So the condition of Theorem 1 cannot be dropped.
- The large alphabet is not needed. Theorem 1 uses values. Theorem 3 needs only three, and Blocki and Williams give another proof that 3-anonymity stays NP-hard with binary values. So the condition on the alphabet in Theorem 1 is a feature of that proof, not of the problem.
- Many columns are needed, or many values. Blocki and Williams show that with rows, values and at most columns, the problem is in P, and in time when and the number of columns are constants. With 27 columns, 3-anonymity is already MAX SNP-hard.
- Exponential in , not worse. For each , the problem can be solved in time (Blocki and Williams 2010).
History
Samarati and Sweeney introduced k-anonymity with generalization and suppression in 1998, and the early algorithms searched for the least generalization without a bound on their running time. Meyerson and Williams asked how hard the optimal version is and proved, at PODS 2004, NP-hardness for entry and attribute suppression with , together with the first approximation algorithms. Aggarwal, Feder, Kenthapadi, Motwani, Panigrahy, Thomas and Zhu brought the alphabet down to three values and gave the approximation at ICDT 2005. Bonizzoni, Della Vedova and Dondi proved APX-hardness for binary tables in 2007, and Blocki and Williams settled the case at ICALP 2010.
References
- Adam Meyerson and Ryan Williams, On the complexity of optimal k-anonymity, Proceedings of the 23rd ACM Symposium on Principles of Database Systems (PODS 2004), pp. 223 to 228, Theorem 3.1 (entry suppression), Theorem 3.2 (attribute suppression) and Section 4 (the approximation algorithms)
- Gagan Aggarwal, Tomas Feder, Krishnaram Kenthapadi, Rajeev Motwani, Rina Panigrahy, Dilys Thomas and An Zhu, Anonymizing tables, Proceedings of ICDT 2005, LNCS 3363, pp. 246 to 258, Theorem 1, NP-hardness for k = 3 over a ternary alphabet by a reduction from edge partition into triangles
- Jeremiah Blocki and Ryan Williams, Resolving the complexity of some data privacy problems, ICALP 2010, the abstract and the main results, 2-anonymity is in P, binary 3-anonymity is NP-hard, and 3-anonymity with 27 attributes is MAX SNP-hard
- Paola Bonizzoni, Gianluca Della Vedova and Riccardo Dondi, The k-anonymity problem is hard, the abstract and the main results, APX-hardness for a binary alphabet with k = 3 and for rows of length at most 8 with k = 4
- Michael R. Garey and David S. Johnson, Computers and Intractability, a guide to the theory of NP-completeness, W. H. Freeman, 1979, Section 3.1.2 and Appendix A3.1, problem [SP1], 3-dimensional matching
Where this leads
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W4 complete |
|
Tag H3YNYG Edit this page History Report an error Markdown