0 · Recall Warm-up
Answer from memory first. Answers are in the Answer Vault at the bottom.
- What is A⁺ under {A → C, C → D, B → E}? from Lesson 4.2.3
- Which axiom lets you add the same attributes to both sides of an FD? from Lesson 4.2.2
- What is a trivial FD? from Lesson 4.2.1
1 · The Hook
Two designers write the FDs of the same table differently. One writes {A → B, B → C, A → C}; the other writes {A → B, B → C}. Do they mean the same thing? And is AB → C "in" their FDs, even though neither wrote it? This lesson defines the closure of a whole FD set and the two tests built on it: membership and equivalence.
2 · Predict First
F = {A → B, B → C}. Is A → C in F⁺? Is G = {A → BC, B → C} equivalent to F?
Make a guess in your head. The answer opens Section 3.
3 · Core Concept
Predict First — the answer
A⁺ under F = ABC, so A → C ∈ F⁺. G implies A → B and B → C (decompose A → BC); F implies A → BC (A⁺ = ABC) and B → C. Each covers the other: equivalent.
Closure of an FD set: F⁺
F⁺ is the set of all FDs implied by F, trivial ones included. It is usually huge (it contains every X → Y with Y ⊆ X⁺), so we never list it; we test membership.
Membership test
X → Y ∈ F⁺ iff Y ⊆ X⁺ (closure computed under F). One closure per question.
Cover and equivalence
- G covers F (F ⊆ G⁺) if every FD of F is implied by G: for each X → Y in F, Y ⊆ X⁺ computed under G.
- F and G are equivalent (F ≡ G, F⁺ = G⁺) if F covers G and G covers F.
Procedure:
- For each FD in F, compute its left side's closure under G; check the right side is inside.
- For each FD in G, compute its left side's closure under F; check.
- Equivalent only if both directions pass.
Example
F = {A → B, AB → C, D → AC}, G = {A → BC, D → AB}.
- F's FDs under G: A⁺ = ABC ⊇ B ✓; AB⁺ = ABC ⊇ C ✓; D⁺ = DABC ⊇ AC ✓. G covers F.
- G's FDs under F: A⁺ = ABC ⊇ BC ✓; D⁺ = DACB ⊇ AB ✓. F covers G.
- Equivalent.
How many FDs are in F⁺? (rarely asked)
For each left side X there are 2^|X⁺| FDs X → Y (any Y ⊆ X⁺). Summing over all 2ⁿ left sides gives |F⁺|. With R(A, B) and F = {A → B}: ∅ → ∅ (1), A → {∅, A, B, AB} (4), B → {∅, B} (2), AB → 4 subsets (4): 11 FDs, including trivial ones.
4 · Visual
Equivalence test F = {A->B, AB->C, D->AC} G = {A->BC, D->AB}
F's FD closure of left side under G contains right side?
A -> B A+ = ABC yes
AB -> C AB+ = ABC yes
D -> AC D+ = ABCD yes => G covers F
G's FD closure under F
A -> BC A+ = ABC yes
D -> AB D+ = ABCD yes => F covers G => F ≡ G
5 · Worked Examples
Example 1 Easy
F = {A → B, B → C, C → D}. Is AD → BC in F⁺? Is D → A?
Solution
AD⁺ = ABCD ⊇ BC: yes. D⁺ = D: no.
Example 2 Medium
F = {A → B, B → C}, G = {A → B, A → C}. Equivalent?
Solution
G under F: both implied (A⁺ = ABC). F under G: B → C? B⁺ under G = B: not implied. Not equivalent: F covers G, but G does not cover F.
Example 3 GATE
F = {A → C, AC → D, E → AD, E → H}, G = {A → CD, E → AH}. Is F ≡ G?
Solution
F under G: A⁺ = ACD ⊇ C ✓; AC⁺ = ACD ⊇ D ✓; E⁺ = EAHCD ⊇ AD ✓, ⊇ H ✓. G under F: A⁺ = ACD ⊇ CD ✓; E⁺ = EADHC ⊇ AH ✓. Equivalent.
6 · GATE Traps
- Equivalence needs both directions.
- Compute closures under the other set when testing coverage.
- X → Y ∈ F⁺ is tested with X⁺, never by trying to spot a chain by eye.
- F⁺ includes trivial FDs.
7 · Memory Hook
"To test an FD, close its left side. To test two sets, cross-close both ways."
8 · Connect the Dots
Lesson 4.2.3 computed closures of attribute sets; this lesson used them to test FD membership and equivalence. Next: the smallest equivalent FD set, the minimal cover, which the 3NF algorithm needs as its input.
9 · Self-Test
GATE format. Try every question before opening the vault.
Q1 · MCQ · 1 mark(s) — Membership
F = {A → B, BC → D}. Which is in F⁺?
- (A) AC → D
- (B) B → D
- (C) A → D
- (D) D → A
Q2 · MCQ · 2 mark(s) — Equivalence
F = {A → B, B → C, C → A}, G = {A → BC, B → A, C → A}. Is F ≡ G?
- (A) No: G does not imply C → A
- (B) No: G does not imply B → C
- (C) Yes
- (D) No: F does not imply A → BC
Q3 · MSQ · 2 mark(s) — Coverage
F = {AB → C, C → D}, G = {AB → CD}. Which are true?
- (A) C → D ∈ G⁺
- (B) G covers F
- (C) F ≡ G
- (D) F covers G
Q4 · NAT · 2 mark(s) — Closure size
R(A, B) with F = {A → B}. How many FDs (including trivial ones) are in F⁺?
Numerical answer: ________
Q5 · MCQ · 1 mark(s) — Definition
F ≡ G means:
- (A) F ⊆ G
- (B) |F| = |G|
- (C) F = G as sets
- (D) F⁺ = G⁺
10 · Rule Card
- F⁺ = all FDs implied by F.
- Membership: X → Y ∈ F⁺ ⇔ Y ⊆ X⁺.
- G covers F ⇔ every FD of F is implied by G (closures under G).
- F ≡ G ⇔ each covers the other ⇔ F⁺ = G⁺.
- |F⁺| = Σ over X of 2^|X⁺|.
11 · Concept Ledger
Unlocked in this lesson. From here on, these terms may be used.
closure of an FD set F⁺membership testcover (G covers F)equivalence of FD sets
12 · Answer Vault
Reveal answers when you’re ready
Recall Warm-up
- ACD.
- Augmentation.
- One with Y ⊆ X.
Self-Test
Q1 Answer: (A) · 1 mark(s)
AC⁺ = ACBD.
- (B) is wrong: B⁺ = B.
- (C) is wrong: A⁺ = AB.
- (D) is wrong: D⁺ = D.
Re-read: Lesson 4.2.4 — Closure of an FD set; membership test; equivalence of FD sets
Q2 Answer: (C) · 2 mark(s)
Under G: A⁺ = ABC, B⁺ = BAC, C⁺ = CAB; under F the same. Each covers the other.
- (A) is wrong: It is in G.
- (B) is wrong: B⁺ under G = BAC.
- (D) is wrong: A⁺ under F = ABC.
Re-read: Lesson 4.2.4 — Closure of an FD set; membership test; equivalence of FD sets
Q3 Answer: (D) · 2 mark(s)
F implies AB → CD. G does not imply C → D (C⁺ under G = C), so G does not cover F.
- (A) is wrong: C⁺ under G is C.
- (B) is wrong: C → D is missing from G⁺.
- (C) is wrong: Only one direction.
Re-read: Lesson 4.2.4 — Closure of an FD set; membership test; equivalence of FD sets
Q4 Answer: 11 · 2 mark(s)
∅: 1, A: 4, B: 2, AB: 4.
Re-read: Lesson 4.2.4 — Closure of an FD set; membership test; equivalence of FD sets
Q5 Answer: (D) · 1 mark(s)
Same closure.
- (A) is wrong: Not required.
- (B) is wrong: Irrelevant.
- (C) is wrong: Too strong.
Re-read: Lesson 4.2.4 — Closure of an FD set; membership test; equivalence of FD sets