# Functional Dependency Set Closure (F+)

Functional Dependency Set Closure of F is the set of all functional dependencies that are determined by it.

### Example of Functional Dependency Set Closure :

Consider a relation R(ABC) having following functional dependencies :

F = { A → B, B → C }

To find the Functional Dependency Set closure of F+ :

```(Φ)+   = {Φ}
⇒ Φ → Φ
⇒ 1 FD
(A)+   = {ABC}
⇒ A → Φ,   A → A,   A → B,   A → C,
A → BC,  A → AB,  A → AC,  A → ABC
⇒ 8 FDs = (2)3
... where 3 is number of attributes in closure
(B)+   = {BC}
⇒  B → Φ, B → B, B → C, B → BC
⇒  4 FDs = (2)2

(C)+   = {C}
⇒  C → Φ, C → C
⇒  2 FDs = (2)1

(AB)+  = {ABC}
⇒  AB → Φ,  AB → A,  AB → B,  AB → C,
AB → AB, AB → BC, AB → AC, AB → ABC
⇒  8 FDs = (2)3

(BC)+  = {BC}
⇒  BC → Φ, BC → B, BC → C, BC → BC
⇒  4 FDs = (2)2

(AC)+  = {ABC}
⇒  AC → Φ, AC → A, AC → C, AC → C,
AC → AC, AC → AB, AC → BC, AC → ABC
⇒  8 FDs = (2)3

(ABC)+ = {ABC}
⇒  ABC → Φ,  ABC → A,  ABC → B,  ABC → C,
ABC → BC, ABC → AB, ABC → AC, ABC → ABC
⇒  8 FDs = (2)3

So, the Functional Dependency Set Closure of (F)+ will be :

F+ = {
Φ → Φ, A → Φ, A → A, A → B, A → C, A → BC, A → AB, A → AC, A → ABC,
B → Φ, B → B, B → C, B → BC, C → Φ, C → C, AB → Φ, AB → A, AB → B,
AB → C, AB → AB, AB → BC, AB → AC, AB → ABC, BC → Φ, BC → B,
BC → C, BC → BC, AC → Φ, AC → A, AC → C, AC → C, AC → AC, AC → AB,
AC → BC, AC → ABC, ABC → Φ,  ABC → A,  ABC → B,  ABC → C, ABC → BC,
ABC → AB, ABC → AC, ABC → ABC
}

The Total FDs will be :
1 + 8 + 4 + 2 + 8 + 4 + 8 + 8 = 43 FDs```

Consider another relation R(AB) having following functional dependencies :

F = { A → B, B → A }

To find the Functional Dependency Set closure of F+ :

```(Φ)+   = {Φ}     ⇒ 1
(A)+   = {AB}    ⇒ 4 = (2)2
(B)+   = {AB}    ⇒ 4 = (2)2
(AB)+  = {AB}    ⇒ 4 = (2)2
Total = 13```