We have a relation R(A, B, C, D, E, F, G) & Functional Dependencies :
CD → G
A → BC
B → CF
E → A
F → EG
G → D
Now, let’s try by picking 1 element at a time :
$A^{+}$ = {A, B, C, D, E, F, G} = R
$B^{+}$ = {A, B, C, D, E, F, G} = R
$C^{+}$ = {C} $\neq$ R
$D^{+}$ = {D} $\neq$ R
$E^{+}$ = {A, B, C, D, E, F, G} = R
$F^{+}$ = {A, B, C, D, E, F, G} = R
$G^{+}$ = {G, D} $\neq$ R
Since, C, D & G fails in forming candidate key. Let’s try different combinations by picking any 2 of them :
$CD^{+}$ = {C, D, G} $\neq$ R
$CG^{+}$ = {C, D, G} $\neq$ R
$DG^{+}$ = {D, G} $\neq$ R
$\therefore$ All these 2 pair combination again fail.
At last, $CDG^{+}$ = {C, D, G} $\neq$ R.
So, A, B, E & F forms candidate key.
Total 4 Candidate Keys.