


Most NPcomplete problems look like they can be solved "easily", but looks here is very deceptive
Here is a list of NPcomplete problems: click here
Assume that R = (A_{1}, A_{2},..., A_{n}) SuperKeys := {}; for every possible subset X &sube {A_{1}, A_{2},..., A_{n}} do { if ( X^{+} == R ) SuperKeys := SuperKeys ∪ X; } Remove all nonminimal sets from SuperKeys to find all keys 
Example: The subsets of R = (A_{1}, A_{2}, A_{3}) are:
1. ()  empty set 2. (A_{1}) 3. (A_{2}) 4. (A_{3}) 5. (A_{1}, A_{2}) 6. (A_{1}, A_{3}) 7. (A_{2}, A_{3}) 8. (A_{1}, A_{2}, A_{3}) 
Find all keys in the following relations:
R(A, B, C, D, E, F) ℉ = { A → BC BD → EF F → A } 
The subsets of R(A, B, C, D, E) are:
() (A) (A,B) (A,B,C) (A,B,C,D) (A,B,C,D,E) (A,B,C,D,E,F) (B) (A,C) (A,B,D) (A,B,C,E) (A,B,C,D,F) (C) (A,D) (A,B,E) (A,B,C,F) (A,B,C,E,F) (D) (A,E) (A,B,F) (A,B,D,E) (A,B,D,E,F) (E) (A,F) (A,C,D) (A,B,D,F) (A,C,D,E,F) (F) (B,C) (A,C,E) (A,C,D,E) (B,C,D,E,F) (B,D) (A,C,F) (A,C,D,F) (B,E) (A,D,E) (A,C,E,F) (B,F) (A,D,F) (A,D,E,F) (C,D) (A,E,F) (B,C,D,E) (C,E) (B,C,D) (B,C,D,F) (C,F) (B,C,E) (B,C,E,F) (D,E) (B,C,F) (C,D,E,F) (D,F) (B,D,E) (C,B,D,E) (E,F) (B,D,F) (C,B,D,E) (B,E,F) (C,D,E) (C,D,F) (C,E,F) (D,E,F) 
Compute the closure set for every subset
