---
title: "Find closure (AG)+"
subject: "Database Management System"
chapter: 4
key: "semester_6/database_management_system:attribute-closure-ag"
source: https://www.bctengineer.com/q/semester_6/database_management_system/attribute-closure-ag
site: BCT Engineering
---

# Find closure (AG)+

Database Management System · Chapter 4: Database Constraints & Normalization

- Asked in: year not given
- Video: [Lec-26: Finding Closure of Functional dependency in DBMS | Easiest & Simplest way](https://www.youtube.com/watch?v=bSdvM_0hzgc) — Gate Smashers
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_6/database_management_system/attribute-closure-ag
- Whole chapter: https://www.bctengineer.com/md/semester_6/database_management_system/chapter-4

## Question

Find (AG)+ if R = (A, B, C, G, H, I) and F = {A → B, A → C, CG → H, G → I, B → H, CG → I}.

## Short answer

(AG)+ = {A, B, C, G, H, I}, which is all of R, making AG a superkey and candidate key (since neither A nor G alone is a key).

## Answer

The attribute closure (AG)⁺ is the set of all attributes functionally determined by A and G. Start with result = AG and keep adding right sides of FDs whose left sides are already inside the result.

F = {A → B, A → C, CG → H, G → I, B → H, CG → I}

| Step | FD used | Reason | result |
|---|---|---|---|
| 0 | | start | A G |
| 1 | A → B | A in result | A B G |
| 2 | A → C | A in result | A B C G |
| 3 | CG → H | C, G in result | A B C G H |
| 4 | G → I | G in result | A B C G H I |
| 5 | B → H, CG → I | nothing new | A B C G H I |

**(AG)⁺ = {A, B, C, G, H, I}**, which is all of R.

#### Conclusions
- AG is a **superkey** of R, because (AG)⁺ = R.
- It is also a **candidate key**: A⁺ = {A, B, C, H} lacks G and I, and G⁺ = {G, I} lacks the rest, so neither A nor G alone is a key. AG is minimal.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. How is the attribute closure (AG)+ computed?
   A. Start with AG and repeatedly add right sides of FDs whose left sides are already in the result
   B. List all FDs that contain A or G anywhere
   C. Add the left sides of FDs whose right sides are in the result
   D. Take only the FDs whose left side is exactly AG
   Answer: A. Start with result = AG and keep adding the right side of any FD whose left side is contained in the result until nothing changes. (Key point: Closure algorithm)

2. With F = {A->B, A->C, CG->H, G->I, B->H, CG->I}, what is (AG)+?
   A. {A, B, C, G}
   B. {A, G, H, I}
   C. {A, B, C, G, H, I}
   D. {A, B, G, I}
   Answer: C. A gives B and C, then CG gives H, and G gives I, so all six attributes are reached. (Key point: Result of (AG)+)

3. Why is AG a candidate key and not just a superkey?
   A. Because A+ and G+ do not contain all attributes, so neither A nor G alone is a key
   B. Because AG has exactly two attributes
   C. Because AG appears in an FD
   D. Because (AG)+ contains H
   Answer: A. A+ = {A,B,C,H} and G+ = {G,I} are not all of R, so no proper subset of AG is a key and AG is minimal. (Key point: Candidate key minimality)

## Related in other subjects

- [Rapid closure time and peak hammer pressure](https://www.bctengineer.com/question.md?key=semester_4%2Fhydraulics%3Acast-iron-pipe-rapid-closure-time-and-length) — Hydraulics, chapter 4
- [Hammer pressure for 4 s and 60 s closure](https://www.bctengineer.com/question.md?key=semester_4%2Fhydraulics%3Asteel-pipeline-61cm-hammer-4s-60s) — Hydraulics, chapter 4
- [Peak pressure for 4.5 s closure](https://www.bctengineer.com/question.md?key=semester_4%2Fhydraulics%3Avalve-closed-4-5s-peak-pressure-3200m) — Hydraulics, chapter 4
- [Penstock thickness with gate closure time](https://www.bctengineer.com/question.md?key=semester_7%2Fhydropower_engineering%3Apenstock-thickness-water-hammer-600m) — Hydropower Engineering, chapter 6
